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
I was trying to make a test case and I ran into this panic. Seems like we clear_queue when receiving an RST_STREAM, which resets buffered_send_data, but the next time in pop_frame we don't see is_peer_reset() because the stream state is already Closed(Scheduled(CANCEL)).
Here's the test case that triggers the panic. It's a bit of a mess and it probably shouldn't pass as-is, but it shouldn't panic where it does.
Thanks for reporting the issue, @goffrie! I've managed to reproduce it using your test, and I think I may have a fix ready pretty soon.
As a side notes far as I can tell, the test you've posted will never terminate (if it weren't hitting the panic), the poll_fn always returns Async::NotReady:
futures::future::poll_fn(move || {trace!("POLLING CONN");match conn.poll(){Ok(Async::NotReady) => trace!("CONN: NOT READY"),
r => {trace!("CONN: READY {:?}", r);}}Ok(Async::NotReady)})
Since this has no case where it returns Async::Ready, it will be polled again and again forever.
Fixes#256.
This PR changes `state::recv_reset` so any closed stream with queued send is immediately reset (and thus, the queue is cleared) on receipt of a `RST_STREAM` frame from the remote.
This fixes the panic encountered by the test @goffrie posted in #256, where the stream is scheduled to close, receives a `RST_STREAM` frame, and sets the buffered capacity to 0, but isn't removed from the send queue, so we hit an assertion (or wrap, if debug assertions are disabled) when subtracting a sent frame's size from the buffered size.
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
I was trying to make a test case and I ran into this panic. Seems like we
clear_queue
when receiving anRST_STREAM
, which resetsbuffered_send_data
, but the next time inpop_frame
we don't seeis_peer_reset()
because the stream state is alreadyClosed(Scheduled(CANCEL))
.Here's the test case that triggers the panic. It's a bit of a mess and it probably shouldn't pass as-is, but it shouldn't panic where it does.
The text was updated successfully, but these errors were encountered: