-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
HTTP/2 stream initialization fails on incoming preface of max concurrent stream = 1 #8692
Comments
@angn thanks for reporting. I have a fix here... Just working on a unit test now. |
normanmaurer
added a commit
that referenced
this issue
Dec 28, 2018
Motivation: In Http2FrameCodec we made the incorrect assumption that we can only have 1 buffered outboundstream as maximum. This is not correct and we need to account for multiple buffered streams. Modifications: - Use a map to allow buffer multiple streams - Add unit test. Result: Fixes #8692.
normanmaurer
added a commit
that referenced
this issue
Jan 14, 2019
Motivation: In Http2FrameCodec we made the incorrect assumption that we can only have 1 buffered outboundstream as maximum. This is not correct and we need to account for multiple buffered streams. Modifications: - Use a map to allow buffer multiple streams - Add unit test. Result: Fixes #8692.
normanmaurer
added a commit
that referenced
this issue
Jan 14, 2019
Motivation: In Http2FrameCodec we made the incorrect assumption that we can only have 1 buffered outboundstream as maximum. This is not correct and we need to account for multiple buffered streams. Modifications: - Use a map to allow buffer multiple streams - Add unit test. Result: Fixes #8692.
normanmaurer
added a commit
that referenced
this issue
Jan 14, 2019
Motivation: In Http2FrameCodec we made the incorrect assumption that we can only have 1 buffered outboundstream as maximum. This is not correct and we need to account for multiple buffered streams. Modifications: - Use a map to allow buffer multiple streams - Add unit test. Result: Fixes #8692.
millems
added a commit
to millems/netty
that referenced
this issue
Oct 15, 2019
…nnection that received a GOAWAY. Motivation: In netty#8692, `Http2FrameCodec` was updated to keep track of all "being initialized" streams, allocating memory before initialization begins, and releasing memory after initialization completes successfully. In some instances where stream initialization fails (e.g. because this connection has received a GOAWAY frame), this memory is never released. Modifications: This change updates the `Http2FrameCodec` to use a separate promise for monitoring the success of sending HTTP2 headers. When sending of headers fails, we now make sure to release memory allocated for stream initialization. Result: After this change, failures in writing HTTP2 Headers (e.g. because this connection has received a GOAWAY frame) will no longer leak memory.
normanmaurer
pushed a commit
that referenced
this issue
Oct 17, 2019
…nnection that received a GOAWAY. (#9674) Motivation: In #8692, `Http2FrameCodec` was updated to keep track of all "being initialized" streams, allocating memory before initialization begins, and releasing memory after initialization completes successfully. In some instances where stream initialization fails (e.g. because this connection has received a GOAWAY frame), this memory is never released. Modifications: This change updates the `Http2FrameCodec` to use a separate promise for monitoring the success of sending HTTP2 headers. When sending of headers fails, we now make sure to release memory allocated for stream initialization. Result: After this change, failures in writing HTTP2 Headers (e.g. because this connection has received a GOAWAY frame) will no longer leak memory.
normanmaurer
pushed a commit
that referenced
this issue
Oct 17, 2019
…nnection that received a GOAWAY. (#9674) Motivation: In #8692, `Http2FrameCodec` was updated to keep track of all "being initialized" streams, allocating memory before initialization begins, and releasing memory after initialization completes successfully. In some instances where stream initialization fails (e.g. because this connection has received a GOAWAY frame), this memory is never released. Modifications: This change updates the `Http2FrameCodec` to use a separate promise for monitoring the success of sending HTTP2 headers. When sending of headers fails, we now make sure to release memory allocated for stream initialization. Result: After this change, failures in writing HTTP2 Headers (e.g. because this connection has received a GOAWAY frame) will no longer leak memory.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
No error.
Actual behavior
IllegalStateException is fired.
Steps to reproduce
This error happens with hosts that sends a preface with max concurrent stream = 1, which was
api.development.push.apple.com
in my case.Digging the code, I found
frameStreamToInitialize
is not null opposed to the assertion at https://github.com/netty/netty/blob/netty-4.1.29.Final/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameCodec.java#L363Stacktrace:
Minimal yet complete reproducer code (or URL to code)
Netty version
4.1.29
JVM version (e.g.
java -version
)and 11.0.1
OS version (e.g.
uname -a
)and some linux machines.
The text was updated successfully, but these errors were encountered: