Handle zombie streams, when sending rst#76
Conversation
If QuicSession::OnStreamClosed is called on a stream with a pending outgoing fin, a zombie stream will be created. A call to QuicStream::OnStopSending afterward, which in turn calls QuicStream::MaybeSendRstStream should kill the zombie finally. But this route misses a call to session's session_->MaybeCloseZombieStream, so the stream is not removed from active streams. This triggers a quic_bug_12435_2 when OnConnectionClosed is finally called on session close. This commit adds the missing call to the MaybeCloseZombieStream.
|
Thank you for reporting the issue!
|
Test code is on the firefox side:
|
|
Thanks for the details. In addition to your PR in flight, it is a bug that session does not deliver RESET or STOP_SENDING to zombie streams. I am going to land a fix internally, if that sounds good to you? |
|
Yes, this sounds good. All I care about is that it is fixed in quiche. |
This is to fix a bug that a zombie stream is not closed when receiving STOP_SENDING. Credit to external report in #76 Protected by FLAGS_quic_reloadable_flag_quic_deliver_stop_sending_to_zombie_streams. PiperOrigin-RevId: 677548901
|
Thank you! I landed the fix in https://quiche.googlesource.com/quiche/+/93f3b29187f44d10a0b2563fb0a7b6b21e21b682 |
If QuicSession::OnStreamClosed is called on a stream with a pending outgoing fin, a zombie stream will be created. A call to QuicStream::OnStopSending afterward, which in turn calls QuicStream::MaybeSendRstStream should kill the zombie finally. But this route misses a call to session's session_->MaybeCloseZombieStream, so the stream is not removed from active streams. This triggers a quic_bug_12435_2 when OnConnectionClosed is finally called on session close. This commit adds the missing call to the MaybeCloseZombieStream.