-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
fix: notify_recv after send_reset() in reset_on_recv_stream_err(), to ensure local stream is released properly #799
Conversation
Hey @seanmonstar , hope you're doing well! When you have a moment, could you take a look at my PR. The change itself is self-explanatory. Let me know if anything needs tweaking. Thanks a lot for your time. |
Looks like this aimed at 0.3.x, should be master? |
We identified this issue on h2 0.3.26 as we are still working with hyper 0.14.30. I am not sure whether master is affected or not. Looks like the pipeline isn't compatible with 0.3.x?
|
The 0.3.x branch doesn't see active development, so sometimes the checks get out of date (we only really backport important bug fixes). I've fixed up 0.3.x, if you want to rebase. I can port this to fix to master, too. |
…ensure local stream is released properly Similar to what have been done in fn send_reset<B>(), we should notify RecvStream that is parked after send_reset().
Please do. I’ve rebased this PR too. Could you do me a favor and trigger the pipeline again? Hopefully it should be ready for merge. |
Looks like a test is now running forever. |
Hey @seanmonstar , I need some help. In the test
I analysed the traces before and after the change (attached as 'good_trace.txt' and 'bad_trace.txt'), it seems the key differences are
src/proto/streams/streams.rs:455
if stream.state.is_local_error() {
// Locally reset streams must ignore frames "for some time".
// This is because the remote may have sent trailers before
// receiving the RST_STREAM frame.
tracing::trace!("recv_headers; ignoring trailers on {:?}", stream.id);
return Ok(());
} I am not sure how to fix this. Other tests and h2spec were passed. |
Hi @seanmonstar , could you provide some feedback or advice on my PR when you have a moment? Really appreciate your insights! |
Sorry for taking a bit to respond, I've looked into the failing test now. I pushed a fix in #816. I can squash that in once CI runs. |
Ok, this other PR was merged. Thanks for submitting the fix! |
Similar to what have been done in fn send_reset(), we should notify RecvStream that is parked after send_reset().
To fix an issue where if RecvStream is parked, server doesn't release the StreamRef properly after reset_on_recv_stream_err() and as a result Stream is never removed.