DIAGNOSTICS ONLY — DO NOT MERGE: trace Linux outbound attach release - #30
DIAGNOSTICS ONLY — DO NOT MERGE: trace Linux outbound attach release#30myobie wants to merge 2 commits into
Conversation
Instruments the one test that fails on Linux and only Linux, to locate which link of the teardown chain stalls: local EOF, client send-close, remote PTY child exit, server close, client observing remote-close, attach return, gauge decrement. The client gauge is the observable for the end of that chain and the server's tunnel session stats are the observable for its middle, so a stall in the server detaching is distinguishable from a stall in the client's attach returning. The observation window is widened from 20s to 40s on purpose, so a slow but working release is distinguishable from a permanent stall. Also adds a bounded control proving the instrumentation does not itself release the gauge: it holds a live outbound session, runs the same polling shape, and asserts the gauge stays up throughout and the session still answers afterwards. Without that, the trace could be measuring its own side effects. No production behaviour change. macOS locally: releases at 251ms with the server showing detached=1, and the control holds at gauge=1 across 3s of polling.
The previous Linux run PASSED this test with the widened 40s window, which is itself the headline finding: the gauge does release on Linux, so 20s was too tight rather than the release being broken. But cargo only shows a test's captured output when it fails, so passing hid the actual timing. This panics with the measured numbers so they reach the log either way. Local macOS baseline: released=true elapsed_ms=290, server detached=1.
|
Closing: this did its job. What it proved. Forced tracing on Linux CI showed the outbound tunnel teardown was a product defect, not a test oracle defect: What fixed it. The permanent guard is Superseded, not abandoned. Deleting the branch now. |
Diagnostics-only branch to run the exact Linux CI job and locate where the outbound attach teardown stalls on Linux.
Do not merge. No production behaviour change; instrumentation and one control test only.
Context:
attached_outbound_session_blocks_recycle_and_a_dead_one_does_notfails on Linux only, at its negative control. Measured locally on macOS the gauge releases in ~53ms (3/3 runs); Linux CI did not release within 20s — ~380x, so not runner slowness.This branch traces the chain (local EOF → client send-close → remote PTY child exit → server close → client observes remote-close → attach return → gauge decrement) using the client gauge and the server's tunnel session stats, over a widened 40s window so a slow-but-working release is distinguishable from a permanent stall. It also adds a bounded control proving the instrumentation does not itself release the gauge.