Open sdelamo opened 1 month ago
We will need an example application
@yawkat when creating the ByteBufOutputStream
, we are not using the constructor which releases on close . I assume that it is intentional because we pass the ByteBuff
to DefaultFullHttpResponse
and we expect someone to invoke DefaultFullHttpResponse::release
. Who is doing that?
Yes it's intentional. PipeliningServerHandler does the release. This is not sufficient information to determine the cause of the leak.
Issue description
A user upgrading from 3.9.2 to 4 pointed to a potential memory leak
-Dio.netty.leakDetectionLevel=paranoid
2024-07-17 13:15:27.048 Jul-17 11:15:27.046 [default-nioEventLoopGroup-5-9] 86.144.114.222 ERROR io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected. See https://netty.io/wiki/reference-counted-objects.html for more information.
We've tried to update to the latest available micronaut version 4.5.0, to check if the issue was solved already, and run the application in a separate environment, but the leak is still detected in the same place.
2024-07-15 15:58:23.630 Jul-15 13:58:23.629 [io-executor-thread-6] 82.61.68.148 ERROR io.netty.util.ResourceLeakDetector - 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: