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 — Kqueue: Continue reading when EOF is received before notify about channel inactivity by normanmaurer · Pull Request #17309 · netty/netty

Conversation

@normanmaurer

@normanmaurer normanmaurer commented Aug 20, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Motivation:

We need to ensure we drain all bytes when we receive an EOF before we notify the handlers of the channelInactivity as otherwise we might miss some bytes.

Modifications:

  • Correctly keep on reading when EOF is detected
  • Add unit test to testsuite that validates the correct behaviour on all of our transports

Result:

Fixes #17290

Sorry, something went wrong.

Uh oh!

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

All reactions
@normanmaurer
Kqueue: Continue reading when EOF is received before notify about cha…
894159d
…nnel inactivity.

Motivation:

We need to ensure we drain all bytes when we receive an EOF before we notify the handlers of the channelInactivity as otherwise we might miss some bytes.

Modifications:

- Correctly keep on reading when EOF is detected
- Add unit test to testsuite that validates the correct behaviour on all of our transports

Result:

Fixes #17290
@normanmaurer normanmaurer changed the title eof bug Kqueue: Continue reading when EOF is received before notify about channel inactivity Aug 20, 2026
@normanmaurer
normanmaurer force-pushed the eof_bug branch from c7b0cc5 to 894159d Compare August 20, 2026 13:25
@normanmaurer normanmaurer mentioned this pull request Aug 20, 2026
KQueueSocketChannel with AUTO_READ=false may fire channelInactive before all pending bytes are delivered after EOF #17290
Closed
@normanmaurer

normanmaurer commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

This problem only exists in 4.1 but we still want to port the unit test once this is merged.

All reactions

Sorry, something went wrong.

Uh oh!

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

@normanmaurer normanmaurer added this to the 4.1.138.Final milestone Aug 20, 2026
@normanmaurer
normanmaurer requested a review from chrisvest August 20, 2026 13:26
normanmaurer
normanmaurer commented Aug 20, 2026
View reviewed changes
Comment thread testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketChannelEOFTest.java Resolved

Uh oh!

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

@normanmaurer
Apply suggestion from @normanmaurer
799f51a
normanmaurer
normanmaurer commented Aug 20, 2026
View reviewed changes
Comment thread testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketChannelEOFTest.java Resolved

Uh oh!

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

normanmaurer added 3 commits August 20, 2026 15:52
@normanmaurer
Apply suggestion from @normanmaurer
3b54bce
@normanmaurer
Merge branch '4.1' into eof_bug
403d1b4
@normanmaurer
Merge branch '4.1' into eof_bug
371b03b
@testlens-app

testlens-app Bot commented Aug 25, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 371b03b
▶️ Tests: 349038 executed
⚪️ Checks: 18/18 completed


Learn more about TestLens at testlens.app/docs.

All reactions

Sorry, something went wrong.

Uh oh!

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

@normanmaurer
normanmaurer merged commit 6d5c366 into 4.1 Aug 26, 2026
19 checks passed

Uh oh!

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

@normanmaurer
normanmaurer deleted the eof_bug branch August 26, 2026 12:06
chrisvest
chrisvest reviewed Aug 31, 2026
View reviewed changes
Comment thread testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketChannelEOFTest.java
serverSocket.bind(new InetSocketAddress(NetUtil.LOCALHOST, 0), 1);
}

SocketAddress bindAndAccept() {

@chrisvest chrisvest Aug 31, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the bind actually happens in the constructor

Sorry, something went wrong.

Uh oh!

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

All reactions
@chrisvest

chrisvest commented Aug 31, 2026

Copy link
Copy Markdown
Member

This problem only exists in 4.1 but we still want to port the unit test once this is merged.

Did you do the port? In 4.2+ we also need to implement the tests for io_uring.

All reactions

Sorry, something went wrong.

Uh oh!

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

@normanmaurer

normanmaurer commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

Yeah I did the poet but good point about io_uring ... adding this as well now

All reactions

Sorry, something went wrong.

Uh oh!

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

@lhotari lhotari mentioned this pull request Sep 10, 2026
[fix][sec][branch-4.x] Upgrade Netty to 4.1.138 to address several CVEs and bugs apache/pulsar#26515
Merged
2 of 11 tasks
lltopk pushed a commit to lltopk/netty that referenced this pull request Oct 24, 2026
@normanmaurer @lltopk
Kqueue: Continue reading when EOF is received before notify about cha…
e718894
…nnel inactivity (netty#17309)

Motivation:

We need to ensure we drain all bytes when we receive an EOF before we
notify the handlers of the channelInactivity as otherwise we might miss
some bytes.

Modifications:

- Correctly keep on reading when EOF is detected
- Add unit test to testsuite that validates the correct behaviour on all
of our transports

Result:

Fixes netty#17290
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chrisvest chrisvest chrisvest left review comments

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.138.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

@normanmaurer @chrisvest
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.