[infinispan-issues] [JBoss JIRA] (ISPN-5576) Use MessageToByteEncoder to avoid ByteBuf leak w/ exceptions

Galder Zamarreño (JIRA) issues at jboss.org
Thu Jun 25 01:18:02 EDT 2015


Galder Zamarreño created ISPN-5576:
--------------------------------------

             Summary: Use MessageToByteEncoder to avoid ByteBuf leak w/ exceptions
                 Key: ISPN-5576
                 URL: https://issues.jboss.org/browse/ISPN-5576
             Project: Infinispan
          Issue Type: Bug
          Components: Remote Protocols
    Affects Versions: 7.2.3.Final
            Reporter: Galder Zamarreño
            Assignee: Galder Zamarreño
             Fix For: 8.0.0.Beta1, 8.0.0.Final


Encoder implementation allocates buffers but does not release them in case of exception before the encoded buffer is added to the response list. As a result, if encoding faces exceptions, it could leak byte buffers and show messages like this:

{code}
[io.netty.util.ResourceLeakDetector] LEAK: ByteBuf.release() was not called before it's garbage-collected. Enable advanced leak reporting to find out where the leak occurred. To enable advanced leak reporting, specify the JVM option '-Dio.netty.leakDetectionLevel=advanced' or call ResourceLeakDetector.setLevel()
{code}

Also, encoder implementation does not log exceptions reported at encoding time, so exceptions like this can only be noticed via instrumentation.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)



More information about the infinispan-issues mailing list