[jbossts-issues] [JBoss JIRA] Created: (JBTM-770) incorrect cleanup registration causes memory leak

Jonathan Halliday (JIRA) jira-events at lists.jboss.org
Tue Aug 10 10:30:49 EDT 2010


incorrect cleanup registration causes memory leak
-------------------------------------------------

                 Key: JBTM-770
                 URL: https://jira.jboss.org/browse/JBTM-770
             Project: JBoss Transaction Manager
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: JTS
    Affects Versions: 4.6.1.CP06, 4.12.0
            Reporter: Jonathan Halliday
            Assignee: Mark Little
             Fix For: 4.13.0, 4.6.1.CP08


jts.TransactionImple constructors attempt to optimize the cleanup callback needed to remove entries from _transactions, bypassing the ORB for interposition scenarios:

theTx = (TwoPhaseCoordinator) BasicAction.Current();

if (theTx != null) {
  theTx.addSynchronization(new LocalCleanupSynchronization(this));
} else {
  registerSynchronization(new CleanupSynchronization(this));
}

Unfortunately this does not work and leads to memory leaks on _transactions in certain cases. Specifically, where theTx is a ServerTransaction (i.e. extends ArjunaTransactionImple, which extends TwoPhaseCoordinator), the callbacks run (by ArjunaTransactionImple.do[Before|After]Completion()) are those in ArjunaTransactionImple._syncs, not the masked ones in TwoPhaseCoordinator._syncs. Thus using TwoPhaseCoordinator.addSynchronization registers a callback which is never invoked.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbossts-issues mailing list