Page MenuHomeFreeBSD

Provide process space virtualisation functionality for jails.
Needs ReviewPublic

Authored by bz on Jun 17 2018, 2:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 8, 3:25 PM
Unknown Object (File)
Thu, Apr 4, 3:45 PM
Unknown Object (File)
Thu, Apr 4, 6:04 AM
Unknown Object (File)
Sun, Mar 31, 7:05 PM
Unknown Object (File)
Jan 22 2024, 12:19 AM
Unknown Object (File)
Dec 23 2023, 3:22 AM
Unknown Object (File)
Dec 13 2023, 6:14 AM
Unknown Object (File)
Oct 19 2023, 8:13 PM

Details

Summary

This is the initial logic which will give a jail its own init,
have a dedicated kernel process "0" (swapper) per jail, its
own pid, etc. space if enabled.
Add ddb support to aid debugging as was done for vnet.

Obtained from: http://www.7he.at/freebsd/vps/files/diffs/vps-r215.diff

		(parts, originally as provided by iXsystems, Inc.)

Sponsored by: iXsystems, Inc.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17983
Build 17737: arc lint + arc unit

Event Timeline

sys/kern/init_main.c
708

Panicking seems harsh when kproc_create can fail simply because the process limit has been hit. Is there a way to just fail the jail creation, or if not that to destroy the jail? Perhaps with a warning - a sort of VPS panic.

sys/kern/kern_resource.c
1277

Is this something you've found to happen? I know that zombie jails often sit around indefinitely waiting for a cred hold to go away; perhaps it's something like that?

Follow-up on comments to @jamie

sys/kern/init_main.c
708

Yes. There's a few such situations; we would need to add a flag to the vps structure, check in between every sysinit invokation; in case of error, undo the exact bits we already allocated/initialised, and the return an error to jail creation. We never did for vnets; maybe it's time; but the cleanup can be "complex" to get fully symmetric. For the moment having well-defined errors (panic) seems better while developing.

sys/kern/kern_resource.c
1277

Yes I have but so far no one has ever tried to cleanly shutdown process space so (as with vnet) we expect to find certain leaks. I am sure that the buffer cache is a major problem for process space references. One thing at a time though. At the moment I am seeing linger DYING jails around with plain HEAD and not even vnets; took something over 50 days for one to go. Need a more general "tracker" which I do not want to intermix with this work.

  • Merge branch 'p2' into p3