Skip to content

Correct unreproduced exit-reconnect gap note - #57

Merged
l1a merged 1 commit into
mainfrom
chore/correct-disconnect-gap-note
Jul 22, 2026
Merged

Correct unreproduced exit-reconnect gap note#57
l1a merged 1 commit into
mainfrom
chore/correct-disconnect-gap-note

Conversation

@l1a

@l1a l1a commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

Doc-only correction. PR #56's NOTES added a "Known gaps" entry claiming a server-side race where a clean remote-shell exit "sometimes reconnects forever" instead of quitting, attributed to a specific teardown ordering bug.

A follow-up investigation showed that diagnosis was wrong:

  • Could not reproduce the behavior in 24 controlled Windows→WSL trials, including a 300 ms delay injected into the shell-exit path to widen the suspected race window (pre-fix and fixed variants both exited cleanly, no reconnect).
  • Mechanism disproven: pty_writer_task does not finish on PTY-EOF — the PTY feeder in handle_connection only holds an Arc<Mutex<Option<Sender>>>, so the channel sender stays alive until the connection ends. ctrl_writer_task is therefore not aborted before it delivers the Disconnect; on clean shell exit the connection stays alive and the client exits cleanly.

This PR reframes the note as observed-once, unreproduced, mechanism-unconfirmed, and advises capturing etr -vvv + etrs logs from a real occurrence before attempting any fix. The wiki Troubleshooting entry is softened to match.

No code changes; the earlier speculative server-side fix was not shipped.

Test plan

  • just pr gate passes (fmt, clippy -D warnings, tests, man pages build).
  • Docs-only; nothing to verify at runtime.

Notes

The v0.6.5 NOTES claimed a "clean shell exit sometimes reconnects forever"
server-side gap with a specific teardown-race mechanism. A follow-up
investigation could not reproduce it in 24 controlled trials (incl. a 300ms
injected delay) and disproved the mechanism: pty_writer_task does not finish on
PTY-EOF (the PTY feeder keeps the channel sender alive), so ctrl_writer_task is
not aborted before delivering the Disconnect. Reframe the note as observed-once,
unreproduced, mechanism-unconfirmed, and say not to attempt a fix without logs
from a real occurrence. Wiki Troubleshooting softened to match.

Assisted-By: Claude Opus 4.8
@l1a
l1a merged commit 7f116fc into main Jul 22, 2026
5 checks passed
@l1a
l1a deleted the chore/correct-disconnect-gap-note branch July 22, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant