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 — Use LocalIoHandler instead of DefaultEventLoop for LocalChannel tests in codec-http2 by normanmaurer · Pull Request #17697 · netty/netty Conversation
Member
Motivation: Http2MultiplexTransportTest failed on CI in the LeakPresenceExtension Several tests run LocalChannel / LocalServerChannel on a DefaultEventLoop Modification:
Result: Channels of the LocalChannel tests are always closed when their event
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions… in codec-http2
Motivation:
Http2MultiplexTransportTest failed on CI in the LeakPresenceExtension
afterAll check ("Possible memory leak detected for resource scope")
although every test in the class passed. The check waits up to 5 seconds
for resources to be released, so something stayed open for good rather
than just shutting down slowly.
Several tests run LocalChannel / LocalServerChannel on a DefaultEventLoop
and then call shutdownGracefully() without waiting. Unlike
LocalIoHandler (and NioIoHandler for the other tests in the class),
DefaultEventLoop does not close the channels registered with it when it
shuts down. A server-side child channel is therefore only closed if the
peer-close task still runs before the loop terminates. If it does not,
the channel and whatever it still holds (for example the large wrapped
payloads written by the auto-read tests added in #17617) is never
released, which the leak presence detector reports.
Modification:
- Use `new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory())`
instead of `new DefaultEventLoop()` in the LocalChannel based tests of
Http2MultiplexTransportTest, Http2MultiplexCodecBuilderTest and
Http2StreamChannelBootstrapTest. LocalIoHandler closes all registered
channels when the group shuts down. A single thread is kept so server
and client still share one event loop as before.
Result:
Channels of the LocalChannel tests are always closed when their event
loop group shuts down, which removes one possible source of the flaky
leak report.
|
There was an error while loading. Please reload this page.
🚨 TestLens detected 1 failed test 🚨Here is what you can do:
Test SummaryBuild PR / macos-x86_64-java11-boringssl build > Netty/Transport/Native/KQueue
🏷️ Commit: cb6eb7f Test FailuresKQueueDatagramUnicastIPv6MappedTest > testSimpleSendCompositeMixedByteBuf(TestInfo) (Netty/Transport/Native/KQueue in Build PR / macos-x86_64-java11-boringssl build)Rerun ControlsSelect tests to mute in this pull request:
Reuse successful test results:
Click 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.
|
Auto-port PR for 4.1: #17708 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Could not create auto-port PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Port for 5.0 #17709 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…alChannel tests in codec-http2 (#17708) Auto-port of #17697 to 4.1 Cherry-picked commit: d3817ad --- Motivation: Http2MultiplexTransportTest failed on CI in the LeakPresenceExtension afterAll check ("Possible memory leak detected for resource scope") although every test in the class passed. The check waits up to 5 seconds for resources to be released, so something stayed open for good rather than just shutting down slowly. Several tests run LocalChannel / LocalServerChannel on a DefaultEventLoop and then call shutdownGracefully() without waiting. Unlike LocalIoHandler (and NioIoHandler for the other tests in the class), DefaultEventLoop does not close the channels registered with it when it shuts down. A server-side child channel is therefore only closed if the peer-close task still runs before the loop terminates. If it does not, the channel and whatever it still holds (for example the large wrapped payloads written by the auto-read tests added in #17617) is never released, which the leak presence detector reports. Modification: - Use `new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory())` instead of `new DefaultEventLoop()` in the LocalChannel based tests of Http2MultiplexTransportTest, Http2MultiplexCodecBuilderTest and Http2StreamChannelBootstrapTest. LocalIoHandler closes all registered channels when the group shuts down. A single thread is kept so server and client still share one event loop as before. Result: Channels of the LocalChannel tests are always closed when their event loop group shuts down, which removes one possible source of the flaky leak report. Co-authored-by: Norman Maurer <[email protected]>
… tests in codec-http2 (#17697) (#17709) Motivation: Http2MultiplexTransportTest failed on CI in the LeakPresenceExtension afterAll check ("Possible memory leak detected for resource scope") although every test in the class passed. The check waits up to 5 seconds for resources to be released, so something stayed open for good rather than just shutting down slowly. Several tests run LocalChannel / LocalServerChannel on a DefaultEventLoop and then call shutdownGracefully() without waiting. Unlike LocalIoHandler (and NioIoHandler for the other tests in the class), DefaultEventLoop does not close the channels registered with it when it shuts down. A server-side child channel is therefore only closed if the peer-close task still runs before the loop terminates. If it does not, the channel and whatever it still holds (for example the large wrapped payloads written by the auto-read tests added in #17617) is never released, which the leak presence detector reports. Modification: - Use `new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory())` instead of `new DefaultEventLoop()` in the LocalChannel based tests of Http2MultiplexTransportTest, Http2MultiplexCodecBuilderTest and Http2StreamChannelBootstrapTest. LocalIoHandler closes all registered channels when the group shuts down. A single thread is kept so server and client still share one event loop as before. Result: Channels of the LocalChannel tests are always closed when their event loop group shuts down, which removes one possible source of the flaky leak report.
…alChannel tests in codec-http2 (netty#17708) Auto-port of netty#17697 to 4.1 Cherry-picked commit: d3817ad --- Motivation: Http2MultiplexTransportTest failed on CI in the LeakPresenceExtension afterAll check ("Possible memory leak detected for resource scope") although every test in the class passed. The check waits up to 5 seconds for resources to be released, so something stayed open for good rather than just shutting down slowly. Several tests run LocalChannel / LocalServerChannel on a DefaultEventLoop and then call shutdownGracefully() without waiting. Unlike LocalIoHandler (and NioIoHandler for the other tests in the class), DefaultEventLoop does not close the channels registered with it when it shuts down. A server-side child channel is therefore only closed if the peer-close task still runs before the loop terminates. If it does not, the channel and whatever it still holds (for example the large wrapped payloads written by the auto-read tests added in netty#17617) is never released, which the leak presence detector reports. Modification: - Use `new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory())` instead of `new DefaultEventLoop()` in the LocalChannel based tests of Http2MultiplexTransportTest, Http2MultiplexCodecBuilderTest and Http2StreamChannelBootstrapTest. LocalIoHandler closes all registered channels when the group shuts down. A single thread is kept so server and client still share one event loop as before. Result: Channels of the LocalChannel tests are always closed when their event loop group shuts down, which removes one possible source of the flaky leak report. 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.