Skip to content

diag(io): name a backpressure end the transport ignores (#310 follow-up) - #324

Merged
superuser404notfound merged 1 commit into
mainfrom
fix/310-followup
Aug 7, 2026
Merged

superuser404notfound merged 1 commit into
mainfrom
fix/310-followup

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Follow-up to #317 (merged). Re #310, which stays open until the change is confirmed on a released build.

A witness for the next round. Every mechanism in this area has failed the same way exactly once: #174 delegate-blocking left the socket reading, #220 measured suspend() advisory with 911 MB arriving after it. Ending the connection is the third mechanism, and if some transport ignores the cancel the way it ignored the suspend, today's only evidence would be a memprobe window climbing with Parked=1. Bytes arriving after the end are now counted per generation and named once when they pass the high water:

[AVIOReader] pump gen=7 19MB delivered AFTER the backpressure end; the cancel is not stopping this transport

The #295 guard, priced again. Strictly increasing request starts is the right shape now that a cancelled range's undelivered tail is legitimately re-requested, but it cannot catch a re-fetch that starts above its predecessor, and the defect was a byte volume (1.97x what was read). The volume is counted on the reader side rather than the origin's: bytes the origin wrote into a socket we then cancelled were never delivered, so bytesWritten would make a healthy high-water end look like a re-fetch. Measured margin on that fixture is the 64 KB tail probe, so the slack is set at 2 MB, which still fails on one 4 MB detour block.

Also here: the CHANGELOG entry for #310 (the PR carried none).

Merge note. #317 was cut before pumpIOWindow landed on main (#306 telemetry), so the textually clean merge did not compile: that call site still declared the old four-field window tuple. Fixed inside the merge commit (1e45bf7), not here.

Test plan: swift test on macOS 26, 1544 tests / 230 suites green; the retightened #295 test run three times for stability, and verified to report a 64 KB margin when its bound is forced to fail.

Each mechanism in this area has failed the same way once: #174 blocking left the
socket reading, #220 measured suspend() advisory with 911 MB arriving after it.
Ending the connection is the third, and if a transport ignores the cancel too,
the only evidence today would be a memprobe window that keeps climbing with
`Parked=1`. Count what arrives after the end and say it once per generation when
it passes the high water: the next round then starts from a named line instead of
a re-derivation.

Also prices the #295 no-refetch guard again. Direction (strictly increasing
request starts) is the right shape now that a cancelled range's undelivered tail
is legitimately re-requested, but it cannot catch a re-fetch that starts above
its predecessor, and the defect was a byte volume: 1.97x what was read. The
volume is counted on the reader side, since bytes the origin wrote into a socket
we then cancelled were never delivered and would make a healthy high-water end
look like a re-fetch. Measured margin on the fixture is the 64 KB tail probe;
the slack is set so one 4 MB detour block still fails it.

CHANGELOG entry for #310 added (the PR carried none).

Re #310.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE
@superuser404notfound
superuser404notfound merged commit 6bbeee0 into main Aug 7, 2026
3 checks passed
@superuser404notfound
superuser404notfound deleted the fix/310-followup branch August 7, 2026 10:06
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