[FEATURE] Observe native thread departure and retire initial private state #52
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#52
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?
Problem and motivation
Posixd can start an ordinary native member and read its genuine exit value, but it cannot wait for departure through its activity epoch. It also cannot observe the process's initial execution through a Member carrier. The initial TCB anchors shared process custody, so releasing it like a member would destroy the surviving process or lose its permanent quota charge.
Add native observation and private initial-execution cleanup so a mediator can wait without polling, distinguish departure from accounting quiescence, and reclaim execution storage while preserving shared process authority. A callback's returned-value publication is not departure evidence.
Proposed behavior and scope
Kernel and LibIPC add a source-bound native execution watch and pure initial-exit observation. Posixd adopts them through its counted execution rows; ordinary join/detach policy follows separately. Existing Member READ observation at syscall 0x64 and ordinary current-slot DROP remain unchanged. There is no new member-reap operation.
A watch captures the actual Running registrar's complete native identity/CSpace and its original current-local READ Member or Factory binding. Factory selection follows the genuine private factory/process owner to its retained initial execution. An open observation reports the original process/thread pair, full pointer-sized result and genuine quiescence. The initial subject additionally reports completed private cleanup. Running, prepared and last-thread-finalizer subjects do not report departure; zero is a valid departed result.
Use native syscall 0x66 for registration, 0x67 for watch observation, 0x68 for unwatch, 0x69 for pure initial observation and 0x6a for read-only acquisition recovery. All prior numbers and packet shapes remain intact.
Registration/recovery input is 32 bytes: magic, source kind (1 Member, 2 Factory), local source slot, zero word, nonzero expected serial and nonzero acquisition intent. Their request/reply magics are NEW1/NWA1 and NEC1/NED1. The 64-byte reply contains magic/flags, owned watch, original source serial, complete original process/thread pairs, full result, source kind, zero word and acquisition intent. Register/recovery packets are 96 bytes. Watch query NEQ1 and unwatch NEU1 use 24-byte inputs containing magic, zero word, watch and zero trailing word. Query returns NEO1/64 bytes, packet 88; unwatch returns NEA1/24 bytes with the exact watch, packet 48. Pure initial NIO1 uses 24 bytes containing the actual Factory slot/serial; NIX1 returns the 64-byte observation with watch/intent zero, packet 88.
Observation flags are DEPARTED=1, QUIESCENT=2, INITIAL_PRIVATE_RETIRED=4, CLOSED=8 and RESULT_RETIRED=16. RESULT_RETIRED is valid only for an initial subject with the three completed departure/private flags (23), with result zero and no retained scalar. It is distinct from genuine available result zero; Member subjects reject it. QUIESCENT requires genuine ThreadExited plus no accounting or machine-return interval. INITIAL_PRIVATE_RETIRED requires the initial subject, departure, quiescence and positive automatic cleanup. CLOSED excludes all other flags and returns result zero. Result zero without DEPARTED means pending, while DEPARTED/result 0 without RESULT_RETIRED means successful zero-valued departure. Refuse every other flag/reserved/extent/register combination.
Initial private cleanup runs automatically at existing safe return/idle boundaries. Release only that departed execution's mapping references, initial TLS/input/template, private machine/register images, startup arguments and resume/fault/wake fields. Retain its native ID/generation, CPU counters, initial quota charge, original factory and complete shared process custody. Retain its exit value only through still-cancellable logical waiting; a separate post-consumption transition erases it. Split private architecture erasure from exit-result retirement because the existing machine retirement helper currently removes both.
The actual allowed Factory mask currently is READ|MINT|MANAGE|GRANT; preparation requires MINT, not WRITE. Add WRITE as permission for exactly initial-result retirement, independently of READ and MINT. It grants no construction, process management, factory freeze, member effects, mapping or delegation. Leave unrelated factory requests and disabled factory policy unchanged. For this wanted ordinary lifecycle, Procd explicitly requests the realm source mask READ|WRITE|MINT|GRANT (0xc03 instead of 0xc01), Launchd receives that uniquely moved original source and delivers READ|WRITE|MINT (0x803 instead of 0x801) to the sole Posixd recipient. Launchd removes GRANT during delivery and independently proves source absence; neither recipient MANAGE nor an alias is added. Actual Procd, Launchd and Posixd inventory/native observations must agree on their exact selected masks, serial, original scope and capacity. Mixed old/new roles refuse before operational admission.
Initial Posixd configuration/census requires exact READ|WRITE|MINT. Positive initial-result retirement atomically removes spent WRITE in the same genuine carrier slot, preserving any current READ/MINT and native serial. Later member births and runtime factory verification require genuine READ|MINT (0x801), backed by the original acknowledged result-retirement receipt and independent current cap/native observation. Keep the initial provisioning descriptor as immutable history and a separate current-rights phase; historical receipt bytes cannot restore WRITE or force live verification to compare against the old mask. A reduced binding without its genuine retirement proof is not accepted. There is no generic factory-attenuation API, new slot, restoration or delegation.
Native initial scalar retirement is a separate 0x6b operation: NIF1/48-byte request contains magic/zero word, factory slot/zero word, original serial, complete expected process and initial-thread pairs, and nonzero retirement intent. NIA1/48-byte reply contains magic/RESULT_RETIRED, serial, complete pairs, intent, acknowledged rights without WRITE and a zero word; packet 96. Read-only 0x6c uses NIP1 with the same exact original selection and NIK1 with that authority-free receipt, also packet 96. All offsets are respectively 0,4,8,12,16,24,32,40 for request fields; reply fields start 0,4,8,16,24,32,40,44. Neither response contains the scalar.
Authority, security and reliability
The watch is a narrow subscription bound to the original actual READ source. Every open query revalidates that source and original noncopy native association. It cannot Start, stop, enumerate peers, join, dispose, map or delegate. No Process, endpoint, mapper, root, GRANT, member alias or mask is delivered by the watch. Copying a watch or native identity cannot authorize another execution/generation.
Native carriers are unique. Movement/removal of this original binding, loss of READ, actual removal/revocation intent, or original process/factory invalidation closes its watches monotonically. An unrelated endpoint alias deletion does not. Generic lineage revocation already invokes actual CSpace/native removal; close the subscription at that native intent boundary even when disposal refuses and metadata is restored. Rollback cannot revive a closed result route. A closed watch retains only its original actor's cleanup handle/correlation until unwatch or observer death. It returns no result or readiness and cannot follow a replacement or relocated source.
Reserve all fallible entry/index/serial storage before registration. Intrusive source, subject, observer and pending links use already admitted entries, with no private watcher/thread ceiling. Hooks allocate nothing and never hold a registry guard across TCB/CSpace/backing operations. Registration reconciles only the same actual actor and complete original selection; a closed original owner cannot be reactivated.
Missing/malformed registration output retains the immutable acquisition selection. Recovery reads only the same actual registrar's existing original owner or canonical absence; it never registers or adopts a successor. Unknown unwatch retains the exact original handle; a read-only query can establish retained original custody or original absence. Never repeat an uncertain registration/removal or start a successor before positive original cleanup. All packets have complete zeroed response capacity and validated current writable spans before effects; compare unchanged complete input and complete correlated replies afterward.
Register before reading the real activity epoch, inspecting subjects and entering WAIT_ACTIVITY. Genuine departure, accounting/machine quiescence, private cleanup and closure coalesce notifications to exact original registrars. Flush a finite admitted batch after object/registry guards end; registration supplies no synthetic ready wake. Observer death removes its watches and even pending notifications. Subject/source invalidation detaches before native ID/backing reuse. A wake or CLOSED is data, never an absence receipt.
Before initial private cleanup, validate the exact ThreadExited initial anchor, genuine process/membership bindings, retained exit intent and every private owner. Exclude current/active execution and machine-return ownership. Saved GPR custody is the actual private Box held within the original TCB occupation; compare its live base with the saved resume pointer without dereferencing a scalar input. Startup arguments retain the exact stage generation. Reuse VSpace's positive-prefix release mechanism; backing refusal retains all original duty/result/identity and already completed release progress. No fallible step follows INITIAL_PRIVATE_RETIRED. Preserve CPU counters on the retained anchor without folding them twice. Old TLS initialization must refuse through genuine Created-stage admission after its input is erased, before allocation/reset. Whole-group cleanup accepts already retired private state and removes the exit intent before identity reuse.
Posixd keeps the active watch until genuine departure/quiescence and all original target call/provider/mask obligations settle. It then unregisters, rechecks original READ/result, performs existing DROP, and independently proves absence. ThreadExited cannot reopen an execution interval; quiescence is monotonic. Before quiescence no DROP is attempted. A contradictory accounting RETRY afterward freezes the continuation, while backing failure retains cleanup-only carrier custody and independent controller cleanup.
The narrow scalar transition requires actual local Factory WRITE independently of READ/MINT, original serial/private process/initial association, genuine ThreadExited, accounting/machine quiescence and completed initial private cleanup. Preflight complete packet/spans, current metadata, all original state and receipt storage before any effect. Under the original lease and preflighted CSpace commit guard, erase the scalar, publish its authority-free retired marker/receipt and atomically remove spent WRITE in the same slot. Nothing fallible follows the first effect. Keep shared process/factory admission, all members, CPU counters and charge 1 unchanged. This is not a generic factory attenuation API. Removing WRITE alone must not close a watch that still depends on retained READ; it marks the genuine retired observation instead.
A lost acknowledgement retains only the actual original retiring actor/generation/CSpace and immutable original selection. Read-only reconciliation returns that actor's existing retired metadata without requiring surviving WRITE/READ/MINT or the old source binding; it returns no shadow scalar and performs no effect. Foreign actor, changed selection or absent original receipt cannot supply recovery. NOT_FOUND is not scalar-erasure evidence. Never repeat an uncertain retirement. Source-revoked/closed watches remain closed; their cleanup metadata cannot reveal the result. If source revocation preceded erasure and no original receipt exists, only acknowledged original whole-process disposal can settle the duty. Original actor death removes its receipt history; group disposal clears the retired anchor marker before ID reuse.
Posixd reserves a dormant counted cleanup duty before the logical reply. Only correlated positive original CommitJoin/Detach COMPLETE arms it through infallible local assignments. No fallible mutation or scalar-retirement call follows COMPLETE in that service transaction. Refused/cancelled/uncertain completion retains the independently wanted cached/native result and never arms retirement. Live initial detach waits for actual departure and positive private cleanup. A later fair turn executes original retirement once, verifies the genuine reduced mask/retired metadata separately, and settles the source/watch duty before any logical row reuse. The original accepted caller result remains separately owned; no scalar copy enters the retirement history.
Acceptance criteria
Alternatives and tradeoffs
Repeated pure READ cannot wake a mediator and would require polling or unrelated clock authority. A detached result capability would complicate source revocation and leave unnecessary access after carrier loss. Source-bound subscriptions give the mediator the wake it needs while preserving a clear revocation boundary.
Existing member DROP already performs positive original resource/quota retirement. Adding a broader reap operation would duplicate it. Initial cleanup must be automatic Kernel-owned private retirement because Factory READ is observation authority and the process anchor must survive.
Tracking and rollout
Consumer: ordinary join and detach.
This continues the native lifecycle work in Kernel#47 and Posixd#34, tracked by Integration#65. Publish the native interface and cleanup contract first, then implement Kernel/LibIPC controls, adopt exact signed dependencies, and add Posixd ordinary lifecycle policy. The full Posixd VM keeps its existing Exsh frame gate; a narrower native diagnostic does not close ordinary join/detach or full pthread acceptance.
Bounded native guest witnesses
These focused guest fixtures will exercise the native contract through actual
CPL3 instructions. Ordinary join/detach, libc finalizers and the complete Posixd
workload retain their separate acceptance criteria.
Existing member departure scenario
Add a separately selected member-watch case using the maintained thread-exit
fixture with genuine Member READ register/recover/query/unwatch packets. Preserve its original NTO result reads,
directed rendezvous grants, member-only exit, surviving initial execution and
all fourteen original ordered/unique markers. Its generic factory remains
READ|MINT; this fixture has no reason to receive WRITE. Add independent malformed
register, exact extent, reserved output and resident read/write span refusals.
The older thread-exit scenario keeps its exact installed program when this new
selector is off. The member watch retains the original serial/process/thread/intent
and full result, reach genuine accounting/machine quiescence before unwatch, and become
canonically absent afterward. New user instructions and observer-only hooks
must agree; no hook registers, wakes, exits, clears data or changes native state.
Initial departure scenario
Add a separately selected execution-watch fixture using the existing owned
invocation framework, initial TLS and actual additional-member construction.
Its older scenarios retain the same installed programs and factory masks when
this selector is off. Select one CPU, TCG, release, the existing sixty-second
budget, normal complete boot/image builders, original protection and native
machine checks, and actual repository-test signing inputs. Do not waive any
older VM or frame gate.
Only this new fixture asks for READ|WRITE|MINT in the actual supervisor's Factory
creation request. The source is the same genuine Created target Process SEND
and stage GRANT, both positively dropped before ordinary service work. No mapper,
GRANT, MANAGE, new root selector or peer-stop authority reaches the Factory.
The current two-occupation budget still includes initial plus the actual member.
The existing foreign observer keeps only its separately declared Process SEND
route for the original positive whole-group drain.
Keep the new Factory and actual Member READ carrier while their lifecycle duties
are wanted; after Start the member retains only READ. The target's initial
stack/TLS and member stack/TLS stay distinct and producer-owned, with the actual
unmapped guard. Member code uses its own initialized register arguments, TLS and
shared producer data, and borrows no creator stack/startup after publication.
The original invocation/cancellation/receiver/legacy wake checks run first.
Before releasing the initial execution, the supervisor registers a source-bound
Factory watch and records the returned complete original initial association.
The initial waits on a genuinely supplied directed registration-ready receive
route. A separately supplied supervisor-to-member SEND/RECV route keeps the real
started member blocked and alive; the initial's thread-only self-exit therefore
cannot be mistaken for last-thread finalization. These narrow diagnostic grants
are positively dropped at their original last use. They confer no management.
The initial returns its complete selected opaque word through the actual native
self-exit syscall and must never resume its original user frame. One fixture uses
zero; another uses a full-width high-bit value. The same source handles both:
a separately selected diagnostic feature supplies the expected literal. Neither
value comes from a hook or host verdict.
The supervisor waits through the native watch/activity mechanism, not a fixed
yield count. Its installed loop reads the real activity epoch, clears only the
counted query output, invokes NEQ1 and branches on the actual canonical returned
state. Pending arms WAIT_ACTIVITY with that captured epoch and loops after a
real change; available departure without complete quiescence/private cleanup
also keeps the same watch and waits. Only the complete original initial flags7
and exact full result leave the loop. Epoch saturation/refusal is a real failure,
not a timer-based readiness substitute. The original sixty-second VM deadline
bounds progress without adding a runtime watch/thread/count restriction.
The observer records the same installed branch and actual returned packet at
its production syscall boundary. A pending/readiness branch moves only its own
fixture cursor; no hook changes registers, memory, scheduling, kernel
state or the user instruction pointer. Derive byte controls for both back edges,
all exact immediate inputs and the positive successor. The existing genuine
terminal observation loop is the model for this observer-only reconciliation;
do not duplicate or weaken the parser merely to accept the new fixture.
Automatic initial private cleanup must positively release original execution
mapping leases and erase copied TLS input, machine image, private saved frame,
startup and entry/stack/fault/wake fields. The genuine process anchor, shared
inventory/backing, peer, factory association, CPU totals, initial charge and
wanted result remain. The observer checks actual retained records and original
positive private completion after the real return boundary; callback publication
is never departure evidence.
After checking the wanted original result, the supervisor executes one complete
NIF1 against its real WRITE factory and unchanged complete original association.
It verifies NIA1's full metadata, same slot/serial and actual reduced READ|MINT
binding. NIX1/NEQ1 must now report RESULT_RETIRED with zero scalar, while the READ
watch remains open. Exact NIP1 verifies the original actor's metadata-only receipt;
wrong actor/selection and repeated NIF1 after spent WRITE refuse. The native
receipt contains no scalar shadow. These are native mechanism controls, not a
claim that Posixd's positive logical COMPLETE has already been implemented.
The supervisor positively unwatches and drops last-used carriers/grants. It then
wakes the genuine surviving member through its explicit rendezvous. The member
checks its own original machine/TLS state and obtains the real last-execution
finalization disposition before process exit zero. The foreign observer uses
actual original process terminal observations/acknowledgements and its already
held Process SEND route for positive group disposal. The new fixture expects
this target's real exit-zero event; old fixtures keep their original status19.
All original GP/DF, EOI, deadline, original terminal/ack and positive drain
requirements remain. Add focused lifecycle markers; do not redefine the older
member-only departure marker or substitute host/source controls for guest runs.
Source and evidence scope
Kernel changes are confined to diagnostic feature declarations, the scoped
factory request mask, new lifecycle packets/user routines, branch emission and
observer-only outcomes, actual setup grants/inventory and final native oracles.
Runtime watch/cleanup/scalar code remains a separate implementation slice. Integration
adds explicit native scenario booleans with strict canonical fixture/combination
checks, maintained registry entries and the two bounded scenarios; standard and
direct builders must select the same actual features. Existing aliases, targets,
source selectors and scenario inputs remain unchanged except the genuine signed
Kernel/Integration adoption coordinated by the coordinated component graph.
Keep every original failure/input refusal. Hash the exact signed graph, selected
catalog, scenario/registry, fixture, boot image, actual ELF/SO and complete guest
logs. Real zero and full-width runs remain separate receipts. Run older members
and thread-exit scenarios independently after publication to find regressions.
Do not count the native prerequisite complete until the new guest witnesses
exist; the ordinary consumer and full Posixd scenario stay open.
Exact producer selectors
kernel-member-watch-selftestdepends onkernel-thread-exit-selftest. ItsIntegration boolean is
kernel_member_watch_test; the canonical scenario istests/native-scenarios/kernel-member-watch-positive.toml. Require ownedinvocation, protection keys, additional members and thread exit; refuse initial
TLS and either initial-watch selector in this exact fixture. Preserve every
original thread-exit marker and add NATIVE_EXECUTION_WATCH_OK.
kernel-execution-watch-selftestdepends onkernel-initial-tls-selftest. ItsIntegration boolean is
kernel_execution_watch_test; the canonical full-widthscenario is
tests/native-scenarios/kernel-execution-watch-positive.toml. Requireowned invocation, protection keys, additional members and initial TLS; refuse
thread exit and member-watch in this exact fixture.
kernel-execution-watch-zero-selftestdepends onkernel-execution-watch-selftest. Its Integration boolean iskernel_execution_watch_zero_test, valid only with execution-watch true; itscanonical scenario is
tests/native-scenarios/kernel-execution-watch-zero-positive.toml. The full-wordscenario requires the zero flag false, and the zero scenario requires it true.
Both initial cases retain every original initial-TLS marker in the same relative
order and add NATIVE_EXECUTION_WATCH_OK, NATIVE_INITIAL_PRIVATE_CLEANUP_OK and
NATIVE_INITIAL_RESULT_RETIREMENT_OK between member and machine-state markers.
All three new booleans default false and accept only actual booleans. All new
scenarios use the same original profile/CPU/TCG/timeout and no-rootd mode. Standard
and direct builders select the identical features; existing inputs and programs
are unchanged when these new selectors are false.
Directed rendezvous repair
The carrier refusal mismatch comes from overlapping fixture inputs. The original preparation controls install their NTO1 packet at data(actor) + 0xf80. The thread-exit fixture later writes a Notify message to that same address during setup, before any user instruction runs. Kernel correctly rejects its different magic with INVALID_ARGUMENT. Keep the original negative packet, expected DENIED result and all immutable byte checks intact. Move only the directed rendezvous input/output into an explicitly producer-mapped private page at readonly(actor) + 4096, separately retained in the existing mapping custody vector for each selected actor. Its input occupies offset 0 and its receive output starts at offset 128; validate complete extents, original process separation and disjointness from all earlier packet, stack, code, TLS and guard regions. No ordinary image or selector-off member program gains this page.
The initial watch member's receive mismatch is actual RETRY from a nonblocking call. The native source and RECV grant were admitted, but its supervisor's message may legitimately arrive later. Use the same original directed RECV with its existing positive blocking selector. Add a diagnostic DirectedReceive outcome, distinct from an exact immediate result: an immediate receive must return (0, exact_extent); an armed native receive may report (RETRY, 0) only while the genuine original TCB is BlockedRecv, retaining its original association and saved frame with no wake result. The user instructions following the syscall still require status zero, the complete original extent and exact message payload; a failed or timed-out wake cannot pass them. The hook does not supply a result, choose a peer, advance a blocked execution, copy payload bytes or perform a receive effect. Existing production dispatch registers the original receiver, blocks it and returns to another genuine runnable actor. A later real Notify writes only the original counted output and resumes the original saved frame.
Use that same helper for the existing thread-exit directed rendezvous, which has the same scheduling assumption, and both initial-watch creator/member receives. Each stream retains its original payload checks and positive last-use grant disposal. Keep all terminal/observation/acknowledgement, timer/EOI, GP/DF, machine/protection, group-drain and completion oracles. Keep the unchanged bounded VM timeout, CPU and profile. Add independent canonical/disjoint packet controls and emitted receive-byte/native-blocked-state controls. Preserve the genuine failed signed graphs and prior selector-off byte hashes as provenance; refresh only the hashes of programs whose actual fixture defect is corrected. The old members selector remains byte-identical.
The actual guest mismatch is tracked in #54.
Packet and lifecycle ordering
The repaired native diagnostics now pass their earlier packet and directed-RECV
boundaries, then expose three later fixture defects. The original failures and
successful older members run remain evidence for their exact signed inputs.
This extension changes diagnostic packet placement and real userspace ordering;
it changes no native authority, syscall, packet grammar or expected result.
Give NXR its own exact 72-byte reservation at
native_context::packet_address() + 0xe80, and its denied read-only copy atreadonly(0) + 0xe80. The existing NMA attenuation packet remains at+0x900with its original 56-byte grammar and byte controls. Setup currently installs
NXR first, then overwrites it with NMA at that same offset. The actual pending
NXR syscall therefore correctly rejects the different magic/input layout as
INVALID_ARGUMENT. Both new NXR reservations remain wholly inside their
existing counted 4096-byte actor-owned pages (end offset
0xec8), disjointfrom context
0..288, enrollment+0x700, Start+0x800, attenuation+0x900, member-watch packets+0xa00..+0xbb0, and original boundary-controlsuffixes. No new mapping, allocator, grant or borrowed page is introduced.
Clear exactly the 48-byte reply before each READ and retain the original
independently returned member serial and every malformed-register/span,
pending and full-width departed-result oracle.
Register the member watch only after both original positive Start calls and
their complete user-side identity checks. Its source is still the same
actually held READ member and genuine positive context/enrollment/Start.
Native
ObservedExecution::stateintentionally usesprocess_lifetime::validate_execution, which requires genuine startedadditional membership. The fixture currently calls Watch before Start, so
DENIED is the correct admission result. Move only this selected Watch block
from the pre-Start NXR pending controls to the positive-Start successor. The
member's original user program retains the actual WAKE RECV and blocks on it
before departure; the custodian does not send WAKE until registration and all
its old work finish. Consequently the post-Start watch genuinely observes
Pending, without hooks supplying readiness or imposing an execution delay.
Keep pre-Start NXR pending READ and every malformed Watch control unchanged.
Strengthen source/byte controls to bind Watch order to actual positive Start
and the original held-WAKE blocking path.
Preserve the caller's original SUBMIT/NOT_FOUND oracle through genuine
receiver retirement in the initial-watch cases. These cases intentionally
keep the supervisor alive until the initial execution departs and private
cleanup/scalar retirement finish. The earlier caller tail assumes that the
supervisor has already exited; actual SUBMIT success proves its original
registered receiver is still live. For these cases only, after all original
serving duties and receiver-watch removal are positively complete, the
supervisor drops its own recorded RECV/GRANT binding at slot 170 through the
existing production DROP operation. Existing native binding removal retires
that exact original registration; the foreign actor's equal RECV alias cannot
substitute for the recorded registration. No operation uses this supervisor
binding afterward. All source descriptors, original invocation retirement
and the member/factory duties remain independently owned.
The supervisor performs this positive DROP before sending the already held
directed READY Notify. Move the unchanged exact caller SUBMIT/NOT_FOUND
control into its real READY-receive successor, after complete message/payload
verification and before actual initial self-exit. The receiver therefore is
genuinely retired before that oracle, while the supervisor remains live for
watch/private/scalar cleanup. The READY message and route are unchanged; no
extra grant, timer, callback, yield count or hook result proves ordering.
This cannot deadlock: READY is sent after receiver retirement and registration,
without waiting for initial departure; the initial performs the negative
probe and then its actual self-exit, which wakes the supervisor's original
activity/watch wait. Preserve the old location and byte stream for every
selector-off scenario. Add an independent actual native host control showing
that dropping the original recorded receiver causes new SUBMIT to return
NOT_FOUND while the original server is still Running and the foreign equal
RECV alias remains present. Add a byte-order control for positive DROP before
READY and the unchanged ABSENT probe after genuine READY.
The selected diagnostic source impact is
native_exit_observation.rs,native_member_watch.rs,native_start.rs,native_initial_watch.rs,plans.rs, diagnostic controls and the exact thread-exit compatibility digests,plus concise diagnostic documentation. Existing native production handlers and
rights masks remain unchanged. Old members/TLS selector-off program hashes,
every deadline/EOI/GP/DF/machine-state/group-drain oracle, the six original
scenario envelopes, explicit signer, release/TCG/one-CPU/60-second guest settings
and genuine cleanup requirements remain unchanged. Host byte extraction is not
a VM result. Only newly signed bounded real runs can establish guest acceptance.
The two remaining native diagnostics still probe receiver absence before its
actual retirement. On signed Kernel
594c843469,thread-exit and member-watch both reach actor 1, step 0x47, SUBMIT 0x4d and return
(status, value) = (0, 6), while the unchanged oracle requires (NOT_FOUND, 0).
Both actual QEMU runs exit 37; original runner cleanup completes without
quarantine. The initial full/zero cases and older members/TLS pass that same
signed graph. All archived failures and their original inputs remain evidence.
plans::callerstill places the old absent-receiver probe before the selectedthread-exit creator rendezvous.
plans::serverretires slot 170 before READYonly for the initial-watch selector. In the two member-departure cases, its
custodian intentionally stays alive for the actual member's departure, full
result READ and optional source-bound watch removal, then sends CREATOR_ACK.
Neither server exit nor original receive-binding removal precedes the current
caller probe. Native SUBMIT therefore correctly finds its still-live original
registration and returns a new owned selector. This is diagnostic sequencing,
not a reason to change native admission or the expected refusal.
Extend the same genuine retirement boundary to both selected departure families.
After all original serving duties and positive receiver-watch removal, the
supervisor positively drops its own recorded slot-170 RECV/GRANT binding before
entering the member or initial custodian rendezvous. Keep the existing exact
DROP success check and all earlier native custody unchanged. No operation uses
that receive binding afterward. Native
binding_removedretires the exactrecorded registration; the foreign actor's equal RECV alias cannot replace it.
Member result/watch reads still use the independently held genuine READ member;
they acquire no receiver, factory, mapping or process-management authority.
For thread-exit/member-watch only, move the unchanged exact SUBMIT/NOT_FOUND
control out of the early caller tail into the original CREATOR_ACK receive
successor. The receive still requires its full 48-byte message and unchanged
departedpayload. The caller then performs its original refusal probe beforesending OBSERVER_ACK and eventually requesting process exit with status 19.
The existing creator acknowledgement is sent only after the custodian's result
and optional watch duties, which now follow its positive receive-binding DROP.
No yield count, hook result, callback word or numeric identity supplies this
ordering. No new route, mapping, capability, timer or packet is needed.
This cannot deadlock: receive-binding retirement happens after the old serving
protocol and before custodian WAKE. The member's existing actual WAKE/DEPARTURE
routes remain held until their original positive uses; the custodian can observe
its genuine self-exit and send CREATOR_ACK without waiting for the caller's
absence probe. The caller receives that acknowledgement, probes the retired
original registration, sends OBSERVER_ACK and continues the existing process
exit. The foreign observer retains its original terminal acknowledgement,
hardware deadline/EOI, machine state and positive group drain.
The proposed code scope is the existing selector guards in
plans.rs, theunchanged refusal check moved into
native_exit_observation::creator, focusedordering controls, derived exact thread-exit compatibility bytes and concise
diagnostic documentation. Native production handlers, wire/register grammar,
rights masks, held routes and mapping custody remain unchanged. Initial full/zero
programs and older members/TLS streams must retain their exact current bytes.
Thread-exit retains the same refusal registers/result; only its real prerequisite
order and the new positive original receiver DROP change the selected stream.
Extend the actual generated-stream controls to check that positive slot-170 DROP
follows all old serving/watch duties, precedes the custodian's WAKE/CREATOR_ACK,
and has no later CLAIM/COMPLETE use; require original CREATOR_ACK receive before
the unique unchanged absent probe and that probe before OBSERVER_ACK/exit. Keep
the actual native live-server/foreign-RECV-alias retirement control and every
existing Start/WAKE/packet/register/span/full-result/quiescence/watch control.
Derive revised selected byte hashes from the genuine original generator, without
crediting private extraction as a run. Preserve the original six mode selectors,
release/TCG/one-CPU/60-second guest settings, explicit public test signer, markers,
hardware deadline, timeout and cleanup requirements. Only fresh signed bounded
native runs can establish acceptance of these two repaired cases.
Native execution watches, initial private cleanup and initial-result retirement are implemented at
a5693bed1067ac4643dadf6461d7a6c2dec08250. The CPL3 diagnostics are at5f646535d996aa02e39a321a4fc289a3799e84bf, selected by Integration42b90e2420c9df22cac37c288c1f402bebf3558d.The three new guest cases currently fail an exact syscall-result assertion before factory completion. The original failures are retained; I am tracing the mismatch. The older member and thread-exit scenarios are running separately. Full guest acceptance remains open.
All six bounded native lifecycle VMs now pass on the signed Kernel/Integration graph, including full-width and zero initial results, private cleanup and scalar retirement. The actual CPL3 notification/WAIT criterion is checked; all original marker, machine-state, timer/EOI, drain and process-exit gates remain. The diagnostic regression is closed.
Measured lifecycle profiling is the next pass. Full ordinary Posixd/libc and both EriX plus Rust/LLVM guest build requirements remain open.