Make desktop process state and lifecycle truthful#886
Open
brandonpayton wants to merge 4 commits into
Open
Conversation
Make host-delegated pipe readiness reflect buffered data, open-empty state, EOF, and write capacity, while preserving finite select/pselect deadlines through retries and finalizing timeouts through the kernel. Default omitted non-PTY browser VFS launches to finite EOF and reap only exited ppid=0 processes after Node/browser worker teardown. Guest-child zombies remain owned by waitpid. Add Rust and host regressions for readiness, deadline copyback and mask restoration, process reaping, and browser spawn protocol behavior. The host/kernel ABI surface is unchanged.
This was referenced Jul 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Linux desktop consumers need a truthful process view, not demo-authored rows or invented resource measurements. lxtask could enumerate numeric PIDs but discarded every row because Kandelo lacked the procfs files it reads. Separately, the LXDE browser workload exposed two lifecycle mismatches: an omitted non-PTY stdin remained open and stalled Leafpad before its GTK loop, and top-level host-owned exits remained as unreaped
ppid=0zombies after the host had consumed their statuses.The fixes belong in shared kernel/host behavior. Node and browser remain peers, guest-owned zombies remain governed by
wait()/waitpid(), and unsupported CPU/RSS/system-memory accounting stays explicitly unavailable.What changed
/proc/stat,/proc/meminfo,/proc/<pid>/statm, and/proc/<pid>/task/<tid>views./proc/<pid>/statfield positions and report authoritative nice, thread-count, state, credentials, and kernel-tracked logical virtual size.PR_SET_NAMEstate per thread so a worker rename cannot replace the process leader identity.PIPE_BUFatomicity andEPIPE/SIGPIPE.ppid=0processes after Node/browser worker teardown and channel deactivation. Rust validates ownership, so guest-child zombies remain wait-owned.poll/ppollandselect/pselect6calls.ppoll/pselect6masks are restored before copyback.Accounting and lifecycle boundaries
Logical virtual size is the kernel-tracked address-space prefix through
brkplus active guestmmapranges, without overlap double-counting. It is not RSS.CPU counters, resident pages/RSS, and system physical/free/cache totals are zero in procfs by documented contract to mean unavailable. The LXDE port renders those values as
unavailable/N/A; this PR does not synthesize measurements.Host-owned reaping is deliberately limited to exited
ppid=0processes whose host status has been consumed. This does not implement general orphan reparenting and does not bypass guestwaitpid()ownership.Validation
Every build/test/validation command below ran through
bash scripts/dev-shell.sh -- ....revents, unchanged guest timespec input, and restoredppollmask./procentry disappeared while lxtask remained live;/procentry disappeared;The Open POSIX and Sortix suites were considered; this repository has no direct external case for the host-managed procfs/accounting or timeout-finalization paths changed here. No broad POSIX-conformance or performance claim is made.