question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Possible ByteBuf Leak in Cosmos SDK.

See original GitHub issue

Opening 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:closed
  • Created 3 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
tysonnorriscommented, Jul 30, 2020

Thanks @kushagraThapar - I will try to port our existing usage of AsyncDocumentClient to CosmosAsyncClient

0reactions
kushagraThaparcommented, Aug 4, 2020

@tysonnorris - thanks, will investigate that one.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found