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 — Bump Netty to 4.2.20.Final by bridgelol · Pull Request #6814 · GeyserMC/Geyser

Conversation

@bridgelol

@bridgelol bridgelol commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Bumps Netty from 4.2.7.Final to 4.2.19.Final.

Geyser uses Netty's default allocator, which in 4.2 is AdaptiveByteBufAllocator. In 4.2.7, every event-loop thread gets its own magazine group per size class. A freed chunk goes into that group's reuse queue (capacity 2 * availableProcessors) and is only released when the queue is full; nothing purges idle chunks. Freed direct memory therefore stays reserved near the high-water mark of every thread and size class.

On a standalone instance with 48 visible cores and ~290 Netty threads, after ~6 days we saw:

  • 7,477 live AdaptivePoolingAllocator$SizeClassedChunk objects with only 2 players connected, against 3,073 on the same build 6 hours after start;
  • process RSS of 21 GB against a 6 GB heap. Most of that was glibc arena fragmentation, which we addressed on our side with MALLOC_ARENA_MAX; the retained chunks are the part that belongs to the allocator.

netty/netty#16766 (in 4.2.16) adds epoch-based purging of idle chunks and caps the thread-local chunk cache at io.netty.allocator.threadLocalChunkCacheMaxBytes. The releases since 4.2.7 also fix several bugs in the same allocator, for example netty/netty#16767 (concurrency), #16654 (IllegalReferenceCountException in AdaptiveByteBuf.deallocate()), #16200 (failed allocation not noticed) and #17166 (direct memory OOM on low-core containers).

Testing: ./gradlew build passes on JDK 25. The standalone jar boots and answers a RakNet unconnected ping.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bridgelol
Bump Netty to 4.2.19.Final
3539e57
onebeastchris
onebeastchris approved these changes Nov 3, 2026
View reviewed changes

@onebeastchris onebeastchris left a comment

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.

Thanks!

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread gradle/libs.versions.toml Resolved

Uh oh!

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

@onebeastchris
Let's go with netty 4.2.20
1e2013b
@onebeastchris onebeastchris changed the title Bump Netty to 4.2.19.Final Bump Netty to 4.2.20.Final Nov 3, 2026
@onebeastchris
Merge branch 'master' into deps/netty-4.2.19
b5261dd
@onebeastchris

onebeastchris commented Nov 3, 2026

Copy link
Copy Markdown
Member

ok apparently we still include 4.1.x codec-http in standalone...? gonna investigate / fix before merging this

All reactions

Sorry, something went wrong.

Uh oh!

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

@bridgelol
Only use the legacy netty http codec on Spigot
82d4e7e
netty-codec-http was pinned to 4.1 for older Paper versions, but core
declares it, so standalone and the mods were shipping the 4.1 codec
next to Netty 4.2. Keep core on the 4.2 line and pin the 4.1 codec
in the Spigot module only.
@bridgelol

bridgelol commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Found it: netty-codec-http in the catalog pointed at netty-legacy since #6817, and core declares it as implementation, so standalone (and the mods) picked up 4.1.139 next to the 4.2 handler. I pushed a commit that puts netty-codec-http back on the 4.2 version and adds a separate netty-legacy-codec-http entry that only Spigot uses, pinned with strictly, so older Paper keeps the 4.1 codec. Standalone's shadow jar now only has the 4.2 classes, and the Spigot jar still ships 4.1.139 like before.

All reactions

Sorry, something went wrong.

Uh oh!

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

@onebeastchris

onebeastchris commented Nov 3, 2026

Copy link
Copy Markdown
Member

thanks claude

(please indicate ai usage, as per our ai policy! Gonna test in a bit & then merge)

All reactions

Sorry, something went wrong.

Uh oh!

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

onebeastchris added 2 commits November 3, 2026 23:17
@onebeastchris
Merge branch 'master' into deps/netty-4.2.19
480f187
@onebeastchris
Don't bundle netty-codec-compression / -http on modded (shipped by Mi…
3b6261f
…necraft 26.3), ensure we ship 4.1.x versions on -Spigot for compat but 4.2.x on modern platforms

Eventually with the merge + isolation we'll be able to dynamically use what we need...
onebeastchris
onebeastchris approved these changes Nov 6, 2026
View reviewed changes
@onebeastchris
Merge branch 'master' into deps/netty-4.2.19
1abcfe5
@onebeastchris
onebeastchris merged commit b4317ea into GeyserMC:master Nov 6, 2026
3 checks passed

Uh oh!

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

@mrpunky mrpunky mentioned this pull request Nov 7, 2026
EncoderException "MessageToMessageCodec$2 must produce at least one message" kicks Bedrock players on Velocity (since 2026-11-06, also on b1288) #6893
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@onebeastchris onebeastchris onebeastchris approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

2 participants

@bridgelol @onebeastchris
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.