[BUG] Possible ByteBuf Leak in Cosmos SDK.
See original GitHub issueOpening this issue on the behalf of @tysonnorris:
An error like below:
[ ] [reactor-http-nio-1] ERROR io.netty.util.ResourceLeakDetector.reportTracedLeak(320) - LEAK: ByteBuf.release() was not called before it's garbage-collected. See https://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records:
Created at:
io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:349)
io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:187)
io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:178)
io.netty.handler.ssl.SslHandler.allocate(SslHandler.java:2134)
io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1319)
io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1231)
io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1268)
io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:498)
io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:437)
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
java.base/java.lang.Thread.run(Thread.java:834)
appearing with some of the tests that Tyson wrote to exercise cosmosdb sdk.
com.azure:azure-cosmos:4.0.1 with jdk 1.8 and jdk 11.
Tyson is trying to narrow down a test case, but it happens intermittently, about 50% of the test runs.
@tysonnorris do you have any more details/test/repo-steps you can provide? ( I added “need-author-feedback”).
\cc @kushagraThapar @moderakh @David-Noble-at-work (From Cosmos team).
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (10 by maintainers)
Top Results From Across the Web
[BUG] Cosmos SDK Netty ByteBuf leak · Issue #9023 - GitHub
Describe the bug There is a leak in the Cosmos SDK when using the DIRECT connection mode. The problem seems to only become...
Read more >reactor/reactor-netty - Gitter
Hello @violetagg , I am using reactor-netty 0.9.0.RELEASE and I am using connection pool. The way I have written the code is it...
Read more >Bug List - Bugs - Eclipse
This list is too long for Bugzilla's little mind; the Next/Prev/First/Last buttons won't appear on individual bugs. Hide Search Description. Status: NEW ...
Read more >Error : LEAK: ByteBuf.release() in grpc call - Stack Overflow
Hello Grpc Folks,. I am getting the following issue in grpc call : LEAK: ByteBuf.release() was not called before it's garbage-collected.
Read more >Full Archive - Baeldung
... 12: Finding Max Date in List Using Streams (0); 11: Java Weekly, Issue 463 (0); 10: Fixing Selenium WebDriver Executable Path Error...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @kushagraThapar - I will try to port our existing usage of
AsyncDocumentClient
toCosmosAsyncClient
@tysonnorris - thanks, will investigate that one.