Repository navigation
fix(process): prevent sibling wakes during targeted waits - #56
Merged
Merged
Conversation
Resolve the namespace-visible target before publishing Blocked, then scan again for reapable children so an exit during resolution cannot be lost. Recheck signals under the parent PCB lock and leave unresolved targets runnable for stale-child recovery. Share the PID-filtered wake operation between exit notification and the final switch-out handoff, and preserve targeted filters for group waits. Add five hosted interleaving/cleanup tests and repeat the Ring-3 selective wait check sixteen times, including the nested wait counter assertion. Fixes: 0a42bd8 (feat(sched): selective wait wake, guard-free SCHED-TRAP and a switch sentinel)
YUZHEthefool
marked this pull request as ready for review
November 1, 2026 05:04
Exercise the production group wait loop and notifier with deterministic hosted interleavings: sibling exit after blocking, target exit after the scan, and target exit after the final event-counter check. Verify waiting for another thread's child, namespace PID translation, and group isolation. Keep synchronization hooks confined to hosted unit tests and update the count-pinned hosted gate to include the three regressions. Validation: - Hosted gate: 616 unit tests, CpuLocal doctests, 3 compile checks. - All three new regressions pass in debug and release profiles. - Broad-filter and missing-event-check negative controls fail as expected. - make fmt-check lint clippy build; ABI oracle: 11 structs, 100 values, 17 tripwires.
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.
A PID-targeted
wait4/waitidbriefly publishedwaiting_child = Some(0)before narrowing the filter after its child scan. A sibling exiting in that window could wake the parent, and each retry reopened the window. Remote diagnostics reproduced two extra wakes while waiting for PID 55: sibling PID 54 woke it once at exit notification and again at the final switch-out handoff. This resolves the residual selective-wait issue recorded in #49.Resolve the target's global PID before publishing
Blocked, using the child's retained namespace identity, then scan again for reapable children. An exit during resolution is therefore observed by the scan or wakes the already-published wait. Signal/kill checks remain under the parent PCB lock, and an unresolved target stays runnable for stale/incomplete child-list recovery.Fixes: 0a42bd8 (feat(sched): selective wait wake, guard-free SCHED-TRAP and a switch sentinel)
Validation
Executed on the requested remote host with Ubuntu 22.04.5, QEMU 6.2.0, OVMF and the pinned Rust toolchain.
make fmt-check lint clippy build, syscall and musl feature buildsFinal guest images were built in a fresh source/build directory and frozen separately for each feature. Modified source files and the syscall-fixture hashes match the submitted tree. An earlier incremental-image run reused stale objects because archive timestamps predated the build; that result is excluded. A musl launch initially selected the default ESP and is also excluded; the corrected run uses the isolated musl artifact with its packaged SHA-256 verified. Diagnostic/Ring-3 serial evidence, gate verdicts and source/image hashes are retained privately. Qualified boot/runtime gates remain qualified; no hardware qualification is claimed.
Source/regressions:
d1dcc62; generated syscall fixture:6683ae9. All selected remote checks are complete with the qualified limits above. CI for6683ae9is running.