[jboss-jira] [JBoss JIRA] Commented: (JBTM-213) Threads in endless loop in TransactionReaper.

Jonathan Halliday (JIRA) jira-events at lists.jboss.org
Tue May 1 13:17:30 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBTM-213?page=comments#action_12361038 ] 
            
Jonathan Halliday commented on JBTM-213:
----------------------------------------

Right, that's a particularly big "D'Oh" especially since the declaration for the troublesome data structure is on the very next line to one that is synchronized to avoid this same issue. 'scuse me whilst I die of embarrassment.
        ...
	private SortedSet _transactions = Collections.synchronizedSortedSet(new TreeSet()); // C of ReaperElement
	private Map _timeouts = new WeakHashMap(); // key = Reapable, value = Integer
        ...

> Threads in endless loop in TransactionReaper.
> ---------------------------------------------
>
>                 Key: JBTM-213
>                 URL: http://jira.jboss.com/jira/browse/JBTM-213
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JTA Implementation
>            Reporter: Phillip Thurmond
>         Assigned To: Mark Little
>
> After generating a load against JBossAS 4.2 beta1, the cpu is pegged at 100% even after the load has stopped.  A thread dump reveals several threads at TransactionReaper.insert().  These threads are all doing a WeakHashMap.get().  Looking at TransactionReaper, I believe this is caused by unsynchronized access to the _timeouts WeakHahsMap.  This is line 324 in TransactionReaper.java.

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

        



More information about the jboss-jira mailing list