[BUG] Native members fixture waits before its original peers terminate #50
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/kernel#50
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The native running-members diagnostic reaches its sole-process deadline test while an original peer is still live. Kernel panics at the fixture's peer-terminal assertion, so the diagnostic never reaches its later acceptance markers. The same assertion fails on the original signed source graph and the current graph.
Reproduction
From a clean Integration checkout at
e108f76960cd6706134296fafd8209e41f50a12cusing its unchangedcomponents.kernel-lifetime.toml, select the maintained public Bootloader test fixture explicitly:One independent bounded run of the unchanged original graph and one run of the current signed graph both failed at the same assertion. This is not a statistical failure-rate claim.
Expected and actual behavior
The original server and caller must complete their real workloads and become execution-terminal before the foreign actor arms its sole-process deadline wait. The original hardware wake, EOI, ownership and cleanup checks must then pass.
Instead, the runner exits 1 because QEMU exits 37 rather than 33. Kernel reports
OWNED_INVOCATION_BEGIN, thenPANIC_STAGE=5: original Kernel line 192, current line 193. Both locations assert that the two original peers are execution-terminal. No native factory or member attenuation success marker precedes the panic.Environment and identity
e108f76960cd6706134296fafd8209e41f50a12c; Kernel:7e9ebf58d449961bed9b00376457e3896e6ec132; IPC:9c7b0a6d0fadd237255f453c624834d18aaee20b.0579c15ae294b01dd26dd06e0892dde25d6f4a9a; Kernel:3f9ba9cd357bcd4474e24e1d9cc62e83891b9dab; IPC:c2889b2384d6afada346422ed48384ba6cd0558a.3d528845a0514f3c5a5dc8b6d97369e5aa06c4f3020f555e3e90ace283ec2b47.kernel-running-members-positivescenario; release image; x86-64 QEMU/TCG; one CPU; unchanged 60-second deadline and marker/exit requirements.Evidence and prior checks
Both images authenticate and seal their actual dynamic imports before the panic. Original graph reproduction excludes the new attenuation implementation as the cause of this observed assertion failure. The foreign program's four fixed yields do not establish a native terminal receipt; replacing that timing assumption with actual original-peer terminal observations is the proposed fixture repair. No oracle has been removed or relaxed. Earlier dependency/signing-input refusals occurred before guest execution and are separate from this guest failure.
Tracking
Native terminal barrier before the sole-process deadline
The independent original signed graph and current signed graph both reach the foreign actor's TimedWait while an original peer remains execution-live. Four user YIELD calls do not attest terminal state. Preserve the assertion and replace the sequencing assumption with real terminal observations in the members diagnostic only.
Authority and scope
The members fixture already delivers the genuine Process SEND endpoint to the foreign actor at local slot 191 for later positive member/group drain. Reuse that held carrier for existing native ObserveProcessTerminalEvent and AcknowledgeProcessTerminalEvent operations. Add no capability, endpoint kind, opcode, wire format, mapper, observer registration, root selector or authority copied from a peer. The foreign actor keeps this already wanted route until its existing final drain and DROP. The independent non-members profiles are unchanged by this narrow repair; they need their own source evidence before any scope extension.
Setup passes the original actual server/caller staged process IDs and generations, plus their already declared exit statuses, as immutable descriptive expectations in installed code/data. These values confer no authorization. The successful genuine endpoint Call and current observer identity authorize the observation; the production terminal queue returns only a complete ready event. No Kernel hook manufactures an event or changes scheduling/run state.
User execution and bounded observation
After the foreign actor completes all existing conflict/denied selectors and any selected thread-exit observer handshake, execute a real user loop. Restore a complete canonical observe request in the actor's original writable packet before every Call through held slot 191. The packet remains in its independently mapped data page and has the actual unchanged published request/reply extent. Validate the outer syscall status/length and complete response operation/result/reserved fields. RETRY carries no event, performs no acknowledgement and yields through the ordinary native YIELD syscall before the next canonical observe Call. No fixed iteration limit is added; the original 60-second bounded VM remains the execution limit.
On success, check the returned full process/generation/kind/status tuple against exactly one of the two original expected exits. A two-bit private user scalar records only which expected receipts have already been acknowledged; a duplicate, foreign generation, wrong status/kind or malformed reply fails the actual user program. The original complete observation remains owned by the real observer while it constructs the exact acknowledgement from that reply. Acknowledge that same process/generation once, check the complete positive response, then record the bit. No successor is consumed by a failed or malformed acknowledgement. The loop ends only after both original positive receipts; there is no positive-success override for uncertainty.
The scalar mask is diagnostic progress, not authority or proof of backing disposal. Positive terminal receipts establish execution-terminal peers; the later existing drain still separately proves original member/context/backing/accounting cleanup. No process resources are released by observing or acknowledging scalar events.
Observer-only fixture hooks
The original instruction bytes include all conditional branches, request writes, response comparisons, acknowledgement and yields. Extend the immutable step description to record the finite poll-loop locations and its allowed real result branches. before_syscall continues checking actual caller, generation, RIP, syscall, exact registers and original mapped input. after_syscall observes the genuine outer result and response bytes to select only the branch already present in installed user code; it does not edit registers, user bytes, TCB state, terminal queue, wakeups or actual dispatch results. Replay refers to the same immutable loop and owned packet, without substituting a new identity. Keep all machine canary checks around each syscall.
The current slot-191 Call hook enters before_drain for every Call. Narrow that observation to the actual immutable DrainProcess request operation, so the new event observations do not accidentally claim drain evidence. The existing native before/after-drain checks and later slot DROP stay intact. Add independently authored host controls for valid event orders, RETRY branching, malformed replies, duplicate/wrong generation/wrong kind/status, acknowledgement ownership and complete immutable loop encoding. These host controls do not claim a guest execution.
Deadline and acceptance
Only after both actual native terminal receipts does the foreign actor read the real clock, arm its original deadline and execute the existing TimedWait. Preserve the pre-wait original-peer terminal assertion, the sole-runnable/blocked state checks, actual LAPIC EOI increase, GP/DF restoration, deadline expiry/cancel/absence, complete member/group drain, exact original markers, QEMU exit code, TCG/CPU/profile and hard/stall timeouts. Rebuild the exact signed graph and rerun the genuine bounded members scenario. Retain both earlier genuine failures. A repaired running-members scenario is distinct from the unexecuted full Posixd creation workload and all libc/join/detach acceptance.
Related: native member design. Preserve the full original running-members diagnostic and all later native oracles when repairing fixture sequencing.
The repair observes and acknowledges both original peer exits through the existing Process route before arming the timer. The unchanged release/TCG/one-CPU running-members scenario now exits 33 with all 13 original markers and deadline, EOI, GP/DF, member attenuation and group retirement checks intact. This resolves that fixture; Posixd creation and the separate exit/TLS profiles retain their own acceptance gates.