Skip to content

cw-pause: only pass EOS with the last flushed piece - #23461

Closed
1rhino2 wants to merge 1 commit into
curl:masterfrom
1rhino2:cw-pause-eos-last-piece
Closed

1rhino2 wants to merge 1 commit into
curl:masterfrom
1rhino2:cw-pause-eos-last-piece

Conversation

@1rhino2

@1rhino2 1rhino2 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

cw_pause_write() strips CLIENTWRITE_EOS from every piece but the last when it splits a body write into CW_PAUSE_DEC_WRITE_CHUNK sized pieces, but cw_pause_flush() passed the buffer's type unchanged on each flushed piece, so a buffered EOS write was flushed as several EOS writes. No consumer behind the pause writer acts on it today (the decoders ignore the flag and cw-out only uses it to flush), this just makes the flush consistent with the write path: EOS goes with the last piece of the last buffer only.

cw_pause_write() strips CLIENTWRITE_EOS from every piece but the last
when it splits a body write into CW_PAUSE_DEC_WRITE_CHUNK sized pieces,
but cw_pause_flush() passed the buffer's type unchanged on each flushed
piece, so a buffered EOS write was flushed as several EOS writes. Keep
EOS for the last piece of the last buffer only.
@testclutch

Copy link
Copy Markdown

Analysis of PR #23461 at 4a23e37c:

Test ../../tests/http/test_60_h3_proxy.py::TestH3Proxy::test_60_12_quic_session_resumption failed, but it has been permanently failing lately, so it's probably NOT a fault of the PR. Note that this test has failed in 2 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (4, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Test ../../tests/http/test_32_ftps_vsftpd.py::TestFtpsVsFTPD::test_32_04_download_10_parallel[data-1k] failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 2 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (4, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR.

Generated by Testclutch

@bagder bagder closed this in f29c5d3 Oct 20, 2026
dkarpov1970 pushed a commit to dkarpov1970/curl that referenced this pull request Nov 18, 2026
cw_pause_write() strips CLIENTWRITE_EOS from every piece but the last
when it splits a body write into CW_PAUSE_DEC_WRITE_CHUNK sized pieces,
but cw_pause_flush() passed the buffer's type unchanged on each flushed
piece, so a buffered EOS write was flushed as several EOS writes. Keep
EOS for the last piece of the last buffer only.

Closes curl#23461

Backport notes:

- The release keeps pause buffers newest first (55ecaa5 not
  taken), so "more buffers follow" means the flushed buffer is not
  the list head.

(cherry picked from commit f29c5d3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants