GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Auto-port 4.1: Use LocalIoHandler instead of DefaultEventLoop for LocalChannel tests in codec-http2 by netty-project-bot · Pull Request #17708 · netty/netty

Conversation

@netty-project-bot

@netty-project-bot netty-project-bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@normanmaurer @netty-project-bot
Use LocalIoHandler instead of DefaultEventLoop for LocalChannel tests…
7a2ecb5
… in codec-http2 (#17697)

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.

(cherry picked from commit d3817ad)
@netty-project-bot netty-project-bot mentioned this pull request Oct 1, 2026
Use LocalIoHandler instead of DefaultEventLoop for LocalChannel tests in codec-http2 #17697
Merged
@normanmaurer normanmaurer added this to the 4.1.139.Final milestone Oct 1, 2026
@normanmaurer
normanmaurer merged commit 55e8a6a into 4.1 Oct 1, 2026
0 of 3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer
normanmaurer deleted the auto-port-pr-17697-to-4.1 branch October 1, 2026 15:46
lltopk pushed a commit to lltopk/netty that referenced this pull request Oct 24, 2026
@netty-project-bot @normanmaurer @lltopk
Auto-port 4.1: Use LocalIoHandler instead of DefaultEventLoop for Loc…
3d8d152
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.1.139.Final

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@netty-project-bot @normanmaurer
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.