You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2017/10/18 15:46:00 UTC

[jira] [Created] (QPID-7977) [Java Broker] [HA] Direct memory leak possible when mastership is lost

Keith Wall created QPID-7977:
--------------------------------

             Summary: [Java Broker] [HA] Direct memory leak possible when mastership is lost
                 Key: QPID-7977
                 URL: https://issues.apache.org/jira/browse/QPID-7977
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
            Reporter: Keith Wall


During the work of QPID-7832, it was noticed that there is a potential for the direct memory used for uncommitted messages to be leak when a node loses the mastership.     

The test that exposed the direct leak is: org.apache.qpid.server.store.berkeleydb.replication.MultiNodeTest#testLossOfMasterNodeCausesClientToFailover

I think the problem is this.  When mastership is lost, the underlying database operation fail.  For instance, the virtualhost that was master is rolling back open transactions.  This causes the messages that were committed to the store to be removed (org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore.StoredBDBMessage#remove).  The underlying database operation fails (org/apache/qpid/server/store/berkeleydb/AbstractBDBMessageStore.java:1085), this prevents the direct memory associated with the messages from being released.

The operation of the group is unaffected, and there is no message loss.  The JVM should eventually release the direct memory itself.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org