You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
h1: a file region sent on compio intermittently arrives with the wrong bytes #159
skyzen's file_regions_and_their_ranges_go_through_send_file (tests/static_files.rs) failed once on Linux CI: a file above the static cache's inline limit, served as a FileRegion by http-kit-h1 0.6.1 over Compio::default() (http-kit-io 0.6.1) arrived with a body that differs from the file, on a plain loopback connection with no TLS. The same test passed on the previous runs of the same code, so the corruption is intermittent. The failing run: https://github.com/zen-rs/skyzen/actions/runs/43082231808/job/130737510855.
Candidates touched since the test last changed are the pipe reuse between frames (#154), registered files (#153) and SEND_ZC on the head (#152), each of which can put bytes out of order or reuse a buffer before the kernel is done with it.
Scope
Find the root cause in the send path of a file region on compio and fix it, with a regression test in this repository that fails without the fix.
Done when
The fix is merged and the regression test passes on Linux CI.
Recurred with the server log printed (skyzen run 43110446903, Linux): the client read the 200 head, then 0 of 1,540,000 body bytes and a clean EOF. The server's last record is
TRACE http_kit_h1::conn: sending a file region offset=0 len=1540000
with nothing after it at the time the client saw EOF — no connection error, no close. So the whole region went out as nothing and the connection ended without an error being reported, which points at a send path that finishes a region on a zero-byte result (for example a splice that reads at the descriptor's shared offset, or an Ok(0) taken as done) rather than at bytes being reordered.
Activity
lexoliu commentedon Nov 11, 2026
Recurred with the server log printed (skyzen run 43110446903, Linux): the client read the 200 head, then 0 of 1,540,000 body bytes and a clean EOF. The server's last record is
with nothing after it at the time the client saw EOF — no connection error, no close. So the whole region went out as nothing and the connection ended without an error being reported, which points at a send path that finishes a region on a zero-byte result (for example a splice that reads at the descriptor's shared offset, or an
Ok(0)taken as done) rather than at bytes being reordered.chore(io): check a compio stream's descriptor still names its socket
test(io): bring SendFile into scope for the reused-descriptor test on…
fix(io): check the descriptor only where an operation names it