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 — GitHub - topEngineerRay/netty-oom-repo: reproduce netty oom 4.2.16

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
src/main/java/com/example
src/main/java/com/example
 
 
target
target
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Netty 4.2.16 BuddyChunk Direct Memory OOM Reproducer

The Bug

SIZE_CLASSES in 4.2.16 tops out at 16896 bytes. Any allocation above ~16KB routes to BuddyChunk via ConcurrentSkipListChunkCache. When the cache exceeds CHUNK_REUSE_QUEUE entries, offerChunk() calls markToDeallocate() on a chunk that may still have live buffer references — freeing native memory while AdaptiveByteBufs still point into it → direct memory leak → OOM.

Not present in 4.2.11 (SIZE_CLASSES included 32768 and 65536, shielding BuddyChunk from high traffic).

Build

mvn package -DskipTests
mvn dependency:copy-dependencies -DoutputDirectory=target/deps

Run

java -XX:MaxDirectMemorySize=256m \
     -cp "target/netty-oom-repro-1.0.jar:target/deps/*" \
     com.example.NettyOomRepro

Expected output:

Netty: 4.2.16.Final
Threads=32  bufSize=1024KB  hold=16  iters=5000
Expecting OutOfMemoryError on direct memory...
OOM: Cannot reserve 8388608 bytes of direct buffer memory (allocated: 265289729, limit: 268435456)
...
REPRODUCED: 30 thread(s) hit OOM

About

reproduce netty oom 4.2.16

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

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.