-
-
Notifications
You must be signed in to change notification settings - Fork 300
Panic with "poll_response called after response returned" #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It is a bit unfortunate that there is no way to see if the event that caused the panic was an |
In #521 h2 started ignoring informational frames. Lines 229 to 239 in bcaaaf6
AFAIK this code can be reached from a stream whose state was Line 164 in bcaaaf6
Lines 144 to 155 in 89d91b0
I'm wondering if the stream can be then passed to This wouldn't trigger: Lines 542 to 552 in bcaaaf6
Because Lines 385 to 393 in 89d91b0
So we end up pushing an Lines 627 to 629 in bcaaaf6
|
#524 Co-authored-by: Kornel <[email protected]>
Fixed in #527. |
hyperium#524 Co-authored-by: Kornel <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
We have a panic deep in h2, I looked into it for a bit and AFAIK the panic message is wrong and the future did not get polled twice and this is instead a protocol bug where h2 popped an event which it expected to be a headers event but it got data or trailers instead.
h2/src/proto/streams/recv.rs
Lines 302 to 313 in bcaaaf6
I concluded that the panic didn't actually happen because the future was polled twice because the future is only ever polled by Hyper from behind a
futures_util::future::future::Map<T>
, as shown in the attached stacktrace (see below):That mapping is done in Hyper itself:
https://github.com/hyperium/hyper/blob/237b2ce08341266b62a8d1cfa974779c511a0710/src/proto/h2/client.rs#L269-L288
In this snippet,
fut
infut.map
is theResponseFuture
whosepoll
method panicked, as you can see there is no opportunity to poll it twice, as<Map<T>>::poll
would have panicked already:https://github.com/rust-lang/futures-rs/blob/2fa7babdf92e4e6b1e874054a2773c5c330a3299/futures-util/src/future/future/map.rs#L53-L64
Click to expand stacktrace
The text was updated successfully, but these errors were encountered: