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 - cfolgere/netty-chunked-write-issue

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
src/test/java/repro
src/test/java/repro
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Netty ChunkedWriteHandler Direct Memory Reproducer

This standalone Maven project demonstrates the ChunkedWriteHandler queue-drain behavior difference between Netty 4.1.104.Final and 4.1.105.Final.

The test writes an HTTP response and content chunks through:

ChunkedWriteHandler -> HttpResponseEncoder -> DirectBufferingOutboundHandler

It intentionally does not call flush() until after all writes are queued.

  • With Netty 4.1.104.Final, response bytes remain queued before flush(), so the test passes.
  • With Netty 4.1.105.Final, response bytes reach the downstream direct-buffer staging handler before flush(), so the test fails and reports staged bytes plus pooled direct-memory growth.

Reproduce The Old Behavior

Run the test against Netty 4.1.104.Final:

mvn -q test -Dnetty.version=4.1.104.Final

Expected result: the test passes.

Reproduce The Behavior Change

Run the same test against Netty 4.1.105.Final:

mvn -q test -Dnetty.version=4.1.105.Final

Expected result: the test fails before flush() with a message similar to:

response bytes reached downstream direct-buffer staging before flush;
pendingBytes=2097196, usedDirectMemoryBefore=0, usedDirectMemoryAfterWrites=2228224

Optional Version Matrix

Run the same test against several Netty versions:

for version in 4.1.104.Final 4.1.105.Final 4.1.110.Final 4.1.136.Final; do
  echo "### Netty ${version}"
  mvn -q test -Dnetty.version="${version}"
  echo
done

Expected results:

4.1.104.Final: pass
4.1.105.Final: fail
4.1.110.Final: fail
4.1.136.Final: fail

About

No description, website, or topics provided.

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.