GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Auto-port 4.1: Reconcile `AbstractCoalescingBufferQueue` readableBytes when it drains, and fail stuck HTTP/2 streams instead of spinning empty DATA frames by netty-project-bot · Pull Request #16997 · netty/netty Conversation
Contributor
Auto-port of #16947 to 4.1 Motivation: On a proxy doing HTTP/2 egress we OOMed when the remote flow controller spun writing empty DATA frames (~134M) into an already-unwritable channel. This is the OOM from #11959, still reachable on
Full investigation and heap dump in #16946. Modification:
Result: The queue can't report bytes it can't produce, and the flow controller can't emit empty DATA frames unboundedly - a wedged stream fails cleanly instead of OOMing the connection. No public API change. Fixes #16946
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…s, and fail stuck HTTP/2 streams instead of spinning empty DATA frames (#16947) **Motivation:** On a proxy doing HTTP/2 egress we OOMed when the remote flow controller spun writing empty DATA frames (~134M) into an already-unwritable channel. This is the OOM from #11959, still reachable on `4.2.12.Final` despite #14220 - that fix only closed the exception-in-`remove` route and left two gaps: * `CoalescingBufferQueue.remove(...)` can leave `readableBytes > 0` with an empty deque -> it decrements by a buffer's *live* readable bytes, and its empty-queue early return asserts rather than reconciles * Also `writeAllocatedBytes` re-writes a frame that makes no progress without ever checking channel writability. Full investigation and heap dump in #16946. **Modification:** * `AbstractCoalescingBufferQueue` - add a `reconcileReadableBytes()` (called at the `remove(...)` early return and after the drain loop) so an empty queue always reports 0 readable bytes. * `DefaultHttp2RemoteFlowController.writeAllocatedBytes` - if the head frame is given a positive budget but is neither removed nor shrinks across two consecutive iterations, fail the stream via cancel path instead. * Tests cover the queue desync, the stuck-frame spin (failing the stream), and a single no-progress pass (tolerated). **Result:** The queue can't report bytes it can't produce, and the flow controller can't emit empty DATA frames unboundedly - a wedged stream fails cleanly instead of OOMing the connection. No public API change. Fixes #16946 --------- Co-authored-by: Norman Maurer <[email protected]> (cherry picked from commit a5d4f28) Uh oh!
There was an error while loading. Please reload this page.
lltopk
pushed a commit
to lltopk/netty
that referenced
this pull request
…s when it drains, and fail stuck HTTP/2 streams instead of spinning empty DATA frames (netty#16997) Auto-port of netty#16947 to 4.1 Cherry-picked commit: a5d4f28 --- **Motivation:** On a proxy doing HTTP/2 egress we OOMed when the remote flow controller spun writing empty DATA frames (~134M) into an already-unwritable channel. This is the OOM from netty#11959, still reachable on `4.2.12.Final` despite netty#14220 - that fix only closed the exception-in-`remove` route and left two gaps: * `CoalescingBufferQueue.remove(...)` can leave `readableBytes > 0` with an empty deque -> it decrements by a buffer's *live* readable bytes, and its empty-queue early return asserts rather than reconciles * Also `writeAllocatedBytes` re-writes a frame that makes no progress without ever checking channel writability. Full investigation and heap dump in netty#16946. **Modification:** * `AbstractCoalescingBufferQueue` - add a `reconcileReadableBytes()` (called at the `remove(...)` early return and after the drain loop) so an empty queue always reports 0 readable bytes. * `DefaultHttp2RemoteFlowController.writeAllocatedBytes` - if the head frame is given a positive budget but is neither removed nor shrinks across two consecutive iterations, fail the stream via cancel path instead. * Tests cover the queue desync, the stuck-frame spin (failing the stream), and a single no-progress pass (tolerated). **Result:** The queue can't report bytes it can't produce, and the flow controller can't emit empty DATA frames unboundedly - a wedged stream fails cleanly instead of OOMing the connection. No public API change. Fixes netty#16946 Co-authored-by: Gavin Bunney <[email protected]> Co-authored-by: Norman Maurer <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |