quiche icon indicating copy to clipboard operation
quiche copied to clipboard

FINISHED vs RESET

Open icing opened this issue 2 weeks ago • 8 comments

In curl we have test cases against an nghttpx server that resets stream responses after the first 16k of DATA. This works reliably with curl using ngtcp2. Using quiche as the backend, we sometimes see FINISHED events instead of a RESET and assume wrongly that the transfer was complete.

Is there anything we might have missed in our quiche usage here? Or is this a bug in quiche's RESET handling? Thanks for the help.

Tested with quiche 0.24.4

icing avatar Dec 09 '25 10:12 icing

Finished should fire if you've read all the data sent on the stream up until the Fin.

Do you have a pcap or qlog of the case where you see a Finished when you'd expect a reset?

LPardue avatar Dec 09 '25 10:12 LPardue

6a5e1f05d4b1e353b26411b4f87cae6c38ab740d.sqlog.txt

Attached a qlog where stream 72 gives FINISHED event and the qlog lists:

[{"frame_type":"reset_stream","stream_id":72,"error_code":258,"final_size":13992},{"frame_type":"padding","payload_length":1399}]

icing avatar Dec 09 '25 10:12 icing

Hmm, that does seem weird. Do you have any instructions for running this test setup that would allow us to try and repro?

LPardue avatar Dec 09 '25 11:12 LPardue

Well, you'd need the whole curl test environment for that. A httpd, an nghttpx with h3, pytest, etc.

If you want I can point you to the details, but it might take a bit.

icing avatar Dec 09 '25 14:12 icing

I don't have many spare cycles to get anything complicated running, which is going to make investigating this hard. Maybe you can provide a curl trace log too just so I can see what the sequence of events is?

LPardue avatar Dec 09 '25 21:12 LPardue

I think I might have emulated the sequence in https://github.com/cloudflare/quiche/pull/2278 but it would be great to see if curl client sees the same order of events.

LPardue avatar Dec 09 '25 23:12 LPardue

Confirming the fix makes the issue no longer reproduce on my system. Thanks.

icing avatar Dec 10 '25 10:12 icing

Nice!

vszakats avatar Dec 10 '25 11:12 vszakats