roadmap NOT-STARTED

496. A dying program's last words reach nobody

(Number provisional until the merge queue lands it.) Promoted from the proposal a-dying-programs-last-words-reach-nobody, filed 2026-09-20, on calef's instruction of 2026-09-20 to give every proposal on main a number. The text below is the proposal's own, unedited, by the promotion rule. Written by the lane for milestone 442 (a crypto provider rustls can use on all three bare- metal targets), which lost most of a day to this and then found that the thing it was chasing did not exist.

Everything needed to reproduce it is in the tree.

The correction this file exists to record

This proposal said something else on 2026-09-19. It claimed that a std program calling poly1305::Poly1305 directly died before executing the first statement of main, and it laid out the evidence: an abort at __rust_start_panic, a clean three-segment binary, the failure surviving every compiler flag. That claim was false, and the way it was false is the finding.

The program did not die early. It ran, printed six correct lines, reached a failing vector, panicked with a perfectly clear message naming both values, and nobody could read any of it.

What actually happens

kernel/src/user/std_tests.rs's drain_sink reads the sink endpoint in a loop and stops on the end-of-stream marker. That marker is sent by the std runtime's cleanup, which runs after main returns. Under panic = "abort", which every nife program uses, a panic runs the hook and then executes a trap, so cleanup never runs and the marker is never sent.

So the reader blocks forever on an endpoint whose writer is dead, the watchdog eventually fires, and the test prints nothing at all. Every byte the program wrote was delivered to that rendezvous and thrown away.

The symptom is indistinguishable from a program that never started, which is exactly how it was read, for a day, through a bisection that produced a coherent and entirely wrong story.

Why it is worth a lane

It defeats the one debugging tool a program has. A nife program's only way to say anything is println!, and this makes the failure case the case where that stops working. Every future lane debugging a crashing std program will meet it, and the evidence it presents actively argues for the wrong conclusion.

The workaround belongs at the wrong layer. cryptography_exerciser now installs a panic hook that prints and calls process::exit, which makes cleanup run and the marker arrive. That works and it is eight lines, but it is opt-in, per program, and remembered rather than enforced, which AGENTS.md's ladder calls rung four.

The shapes a fix could take

BUGS

Index row

This proposal said something else on 2026-09-19.