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: HTTP/2: Fix stream stall when toggling auto-read on a child channel by netty-project-bot · Pull Request #17646 · netty/netty Conversation
Contributor
Auto-port of #17617 to 4.1 Motivation: When This issue is described in #17600. Modification: Modified
This ensures thread-safe, EventLoop-confined updates to the auto-read state, preventing races with concurrent read-processing. Added a comprehensive test Result: Fixes #17600. Http2StreamChannel can now safely have its auto-read state toggled from any thread without risking a stalled stream. The fix maintains EventLoop-confinement for all state changes while allowing cross-thread calls to proceed safely.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…17617) Motivation: When `setAutoRead()` is called on an `Http2StreamChannel` from a different EventLoop than the one the channel is registered to (e.g., a proxy mirroring writability state between streams on different connections) we can end up not flushing the window update frame. Modification: - Ensure the window update frame is always flushed - Add unit tests Result: Fixes #17600. --------- Co-authored-by: Norman Maurer <[email protected]> (cherry picked from commit ee269f5)
|
There was an error while loading. Please reload this page.
🚨 All tests passed but jobs failed 🚨Failed Jobs without Test Failures❌ Build PR / linux-x86_64-java11-boringssl build 🏷️ Commit: 6b4fb23 Rerun ControlsClick the checkbox to trigger a rerun:
Learn more about TestLens at testlens.app/docs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…child channel (netty#17646) Auto-port of netty#17617 to 4.1 Cherry-picked commit: ee269f5 --- Motivation: When `setAutoRead()` is called on an `Http2StreamChannel` from a different EventLoop than the one the channel is registered to (e.g., a proxy mirroring writability state between streams on different connections), a race condition can occur. This leaves the stream stalled indefinitely because the auto-read state change may be reordered against or race with read-processing on the stream channel's own EventLoop, preventing the channel from resuming reads and sending flow-control WINDOW_UPDATE frames. This issue is described in netty#17600. Modification: Modified `AbstractHttp2StreamChannel.Http2StreamChannelConfig.setAutoRead()` to ensure the auto-read state change is always applied on the channel's own EventLoop, similar to how `AUTO_STREAM_FLOW_CONTROL` is handled. The method now: 1. Checks if the channel is registered and if the current thread is on the channel's EventLoop 2. If so, applies the change immediately via `setAutoRead0()` 3. If not, schedules the change to run on the channel's EventLoop via `execute()` This ensures thread-safe, EventLoop-confined updates to the auto-read state, preventing races with concurrent read-processing. Added a comprehensive test `crossThreadSetAutoReadResumesStalledStream()` that reproduces the issue: it disables auto-read before data arrives (causing the stream to stall once the 64KiB flow-control window is exhausted), then re-enables auto-read from a foreign EventLoop. The test verifies that the stream resumes and delivers the complete response body. Result: Fixes netty#17600. Http2StreamChannel can now safely have its auto-read state toggled from any thread without risking a stalled stream. The fix maintains EventLoop-confinement for all state changes while allowing cross-thread calls to proceed safely. --------- Co-authored-by: pandareen <[email protected]> Co-authored-by: Norman Maurer <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.