Repository navigation
Conversation
Recover the managed-children registry from a poisoned lock in unregister, like its sibling accessors already do, so a PID whose waiter panicked while holding the lock cannot stay registered forever and be skipped by the orphan reaper after the PID is reused. Classify a missing /proc/self/task/<tid>/children file instead of treating every NotFound as a vanished task. When no task in a scan exposes the file (kernel built without CONFIG_PROC_CHILDREN, or restricted procfs), log a warning and emit an OCSF detection finding once per process instead of silently leaving the orphan reaper inert while zombies accumulate. Contain a panicking job on the workload launcher thread, the way the network broker contains handler panics: the panic is reported, the thread leaves its job loop, and the health flag turns false so every later spawn fails fast instead of hanging on a launcher that still reports healthy. Closes NVIDIA#5186 Signed-off-by: Emilien Macchi <emacchi@redhat.com>
This branch has not been deployed
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.
Summary
Three silent-failure paths in the sandbox, all found by reading the code: a managed-children registration leaks after a poisoned registry lock, the orphan reaper goes inert on kernels without
CONFIG_PROC_CHILDRENbecause every missingchildrenfile reads as a vanished task, and a panicking job kills the workload launcher thread whileis_alive()keeps reporting healthy.Related Issue
Closes #5186
Changes
managed_children::unregisterrecovers from a poisoned registry lock like its sibling accessors, so a registration can no longer leak after a waiter panics while holding the lockdirect_child_pidsclassifies a missingchildrenfile per task (vanished task vs missing support), only concludes missing support when no task in the scan listed one, and reports it once per process with a warning and an OCSF detection findingcatch_unwind, like the network broker's handler panics: the panic is logged, the thread leaves its job loop, andis_alive()turns false so later spawns fail fastRelease Notes
When no task under
/proc/self/taskexposes achildrenfile (kernel built withoutCONFIG_PROC_CHILDREN, or restricted procfs), the sandbox now reports the inert orphan reaper once instead of failing silently. A panicking workload-launcher job now stops the launcher with a clear error instead of leaving it reporting healthy.Testing
Checks appropriate to the affected code and behavior pass
Unit tests added/updated (if applicable)
E2E tests added/updated (if applicable)
cargo test -p openshell-sandbox --lib: 293 passed, including regression tests for each path (poisoned-lockunregister, children-file classification and reporting, panicking launcher job; the suite also passes withRUST_BACKTRACE=1)cargo clippy --workspace --all-targets -- -D warnings, theperf-harnessvariant, andcargo fmt --all -- --checkpassNo local e2e run: this host has no docker daemon and the k8s lane needs a full image build. The changed paths are failure paths not reachable on healthy kernels, and the launcher's normal spawn path is covered by tests that spawn real children through the filtered thread. CI lanes cover the rest.
uv-based checks (python format, license headers) skipped locally due to a host uv config break (2026-11-03 RPM update); this diff touches no manifests or Python files
Checklist