[ 
https://issues.apache.org/jira/browse/CAMEL-18002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17535098#comment-17535098
 ] 

Karen Lease commented on CAMEL-18002:
-------------------------------------

I believe I found the reason for this. In fact, the problem does not seem to be 
in the NettyHttpSimpleUriParametersTest but rather in 
NettyHttpSimplePooledExchangeTest.testTwo() which makes 2 requests. In the 
second one, the completion method which should release the allocated ByteBuffer 
is not called.

I found this is due to the Exchange from the first request being reused and the 
completion being put on it's UoW queue which is then overwritten.

I've proposed a PR which solves this in local testing.

For some reason, the leak does not appear in the test class where it actually 
occurs, even when setting  ResourceLeakDetector.Level.PARANOID on the test. I 
don't have an explanation for this.

 

> Camel-netty-http: Test NettyHttpSimpleUriParametersTest fails.
> --------------------------------------------------------------
>
>                 Key: CAMEL-18002
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18002
>             Project: Camel
>          Issue Type: Test
>          Components: camel-netty-http, tests
>            Reporter: Jiri Ondrusek
>            Assignee: Jiri Ondrusek
>            Priority: Major
>
> Tested with {_}OpenJDK Runtime Environment Temurin-11.0.14+9 (build 
> 11.0.14+9){_}.
> Test *NettyHttpSimpleUriParametersTest* failed with:
> {quote}[ERROR] Failures: 
> [ERROR]   NettyHttpSimpleUriParametersTest>BaseNettyTest.verifyNoLeaks:65 
> Leaks detected while running tests: 
> [Logger=io.netty.util.ResourceLeakDetector Level=ERROR Message=LEAK: 
> ByteBuf.release() was not called before it's garbage-collected. See 
> [https://netty.io/wiki/reference-counted-objects.html] for more information.
> ...
> {quote}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to