-
-
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 UniformStreamByteDistributor can get into an infinite loop #4588
Comments
I ran into this issue while attempting to use |
@nmittler - FYI |
@Scottmitch good find! Do you have a PR pending? |
Scottmitch
added a commit
to Scottmitch/netty
that referenced
this issue
Dec 18, 2015
…on broken Motivation: DefaultHttp2RemoteFlowController.ListenerWritabilityMonitor no longer reliably detects when a stream's writability change occurs. Modifications: - Ensure writiability is reliabily reported by DefaultHttp2RemoteFlowController.ListenerWritabilityMonitor - Fix infinite loop issue (netty#4588) detected when consolidating unit tests Result: Reliable stream writability change notification, and 1 less infinite loop in UniformStreamByteDistributor. Fixes netty#4587
Scottmitch
added a commit
that referenced
this issue
Dec 21, 2015
…on broken Motivation: DefaultHttp2RemoteFlowController.ListenerWritabilityMonitor no longer reliably detects when a stream's writability change occurs. Modifications: - Ensure writiability is reliabily reported by DefaultHttp2RemoteFlowController.ListenerWritabilityMonitor - Fix infinite loop issue (#4588) detected when consolidating unit tests Result: Reliable stream writability change notification, and 1 less infinite loop in UniformStreamByteDistributor. Fixes #4587
Resolved with #4599 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
UniformStreamByteDistributor loops over a queue until empty. It is possible for a stream state to continuously be added to a the queue and cause this loop to continue indefinitely.
A state is popped off the queue, and written. During that write process the
updateStreamableBytes
method is called by the flow controller. IfhasFrame()
returns true, then the state is enqueued. If the connection window is larger than the stream window, it is possible that the stream's window has become collapsed such thatstreamableBytes
goes to 0 buthasFrame()
will return true. An exit criteria on the loop is to check formaxBytes
transitioning to zero, but this may never happen if the streams can not consume all of the connection window, and so the loop will never terminate.This was discovered as part of the fix for #4587.
The text was updated successfully, but these errors were encountered: