GeezerVison is showing github.com — HTTP/2: Drain queued frames stranded by a writability change during flush (#17279) by normanmaurer · Pull Request #17281 · netty/netty
Conversation
Motivation:
The inFlush guard added in #17266 (fixing livelock #17256) drops a
flush that
re-enters via a synchronous writability change. But when
writePendingBytes()
leaves frames queued and the following ctx.flush() drains the transport
and
flips the channel writable mid-flush, that dropped flush was the only
signal to
write the rest — so large writes (e.g. a multi-MiB gRPC body) hang.
Modification:
- Gate the writability-driven flush: channelWritabilityChanged only
flushes when
the remote flow controller still has frames queued, so a writability
toggle
with nothing to write (e.g. SslHandler during setup) can't drive the
flush -> writability -> flush livelock (Netty HTTP/2 client livelock — reentrant flush during pipeline setup #17256).
- flush() re-runs while a flush was requested reentrantly while it was
running,
honoring it regardless of writability; the inFlush guard turns that
reentrancy
into iteration rather than recursion.
Result:
Large HTTP/2 writes no longer stall on a mid-flush writability flip, and
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…lush (#17279)
Motivation:
The `inFlush` guard added in #17266 (fixing livelock #17256) drops a
flush that
re-enters via a synchronous writability change. But when
writePendingBytes()
leaves frames queued and the following ctx.flush() drains the transport
and
flips the channel writable mid-flush, that dropped flush was the only
signal to
write the rest — so large writes (e.g. a multi-MiB gRPC body) hang.
Modification:
- Gate the writability-driven flush: channelWritabilityChanged only
flushes when
the remote flow controller still has frames queued, so a writability
toggle
with nothing to write (e.g. SslHandler during setup) can't drive the
flush -> writability -> flush livelock (#17256).
- flush() re-runs while a flush was requested reentrantly while it was
running,
honoring it regardless of writability; the inFlush guard turns that
reentrancy
into iteration rather than recursion.
Result:
Large HTTP/2 writes no longer stall on a mid-flush writability flip, and
testlens-app
Bot
commented
Aug 13, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
🚨 TestLens detected 1 failed test 🚨
Here is what you can do:
- Inspect the test failures carefully.
- If you are convinced that some of the tests are flaky, you can mute them below.
- Finally, trigger a rerun by checking the rerun checkbox.
Test Summary
| Test |
Runs |
Flakiness |
| KQueueDatagramUnicastIPv6MappedTest > testSimpleSendCompositeDirectByteBuf(TestInfo) |
❌ ✅ |
5% 🟠 |
| KQueueDatagramUnicastIPv6MappedTest > testSimpleSendCompositeHeapByteBuf(TestInfo) |
❌ ✅ |
1% 🟡 |
| Test |
Runs |
Flakiness |
| KQueueDatagramUnicastIPv6MappedTest > testSimpleSendCompositeHeapByteBuf(TestInfo) |
❌ ✅ |
1% 🟡 |
| Test |
Runs |
Flakiness |
| SlicedByteBufTest > testCopyMultipleThreads0() |
⚠️ 🚫 |
0% 🟢 |
| Test |
Runs |
Flakiness |
| AutoScalingEventExecutorChooserFactoryTest > testScaleUp() |
✅ ❌ |
1% 🟡 |
🏷️ Commit: 5885648
▶️ Tests: 2973 executed
⚪️ Checks: 12/12 completed
Test Failures
AutoScalingEventExecutorChooserFactoryTest > testScaleUp() (Netty/Common in Build PR / windows-x86_64-java25-boringssl)
org.opentest4j.AssertionFailedError: Should scale up to 2 after stressing one executor. ==> expected: <2> but was: <3>
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:563)
at io.netty.util.concurrent.AutoScalingEventExecutorChooserFactoryTest.testScaleUp(AutoScalingEventExecutorChooserFactoryTest.java:152)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
Muted Tests
Select tests to mute in this pull request:
- AutoScalingEventExecutorChooserFactoryTest > testScaleUp()
- KQueueDatagramUnicastIPv6MappedTest > testSimpleSendCompositeDirectByteBuf(TestInfo)
- KQueueDatagramUnicastIPv6MappedTest > testSimpleSendCompositeHeapByteBuf(TestInfo)
- SlicedByteBufTest > testCopyMultipleThreads0()
Reuse successful test results:
- ♻️ Only rerun the tests that failed or were muted before
Click the checkbox to trigger a rerun:
Learn more about TestLens at testlens.app.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Development
Successfully 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.