0 Replies Latest reply on Mar 2, 2010 6:48 PM by I Humble

    Memory leak in JBoss TS?

    I Humble Newbie
      Has anyone else run into a memory leak problem in JBoss?

      Using JBoss 5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)
      with
      JBossTS Transaction Service (JTA version - tag:JBOSSTS_4_6_1_GA) - JBoss Inc.

      JBoss has 1GB heap.  OS is Linux. Java is version 1.6.0_18-b07.

      There seems to be a memory leak in JBoss TS.
      Jprofiler shows the JVM heap space is filling up with Hashtable$Entry[] and arjunacore.AtomicAction objects when running an application load test.  Below are two stack traces collected by JProfiler showing Memory Allocation HotSpots.  The space occupied by these objects continues to grow.  Eventually get OutOfMemoryExeception.

      Garbage collector mode:      Live objects
      Allocations of:      java.util.Hashtable$Entry[ ]
      Aggregation level:      Methods
      Filtered classes:      show separately

      java.util.Hashtable.<init>     10,068 kB (99 %)    184,106
        65.9% - 6,675 kB - 122,068 alloc. com.arjuna.ats.arjuna.StateManager.<init>
          65.9% - 6,675 kB - 122,068 alloc. com.arjuna.ats.arjuna.StateManager.<init>
            65.9% - 6,675 kB - 122,068 alloc. com.arjuna.ats.arjuna.coordinator.AbstractRecord.<init>
              65.9% - 6,675 kB - 122,068 alloc. com.arjuna.ats.arjuna.LastResourceRecord.<init>
                65.9% - 6,675 kB - 122,068 alloc. com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.createRecord
                  65.9% - 6,675 kB - 122,068 alloc. com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource
                    65.9% - 6,675 kB - 122,068 alloc. com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource
                      57.3% - 5,805 kB - 106,164 alloc. javax.transaction.UserTransaction.begin
                      5.7% - 574 kB - 10,504 alloc. javax.persistence.EntityManager.find
                      1.6% - 161 kB - 2,952 alloc. javax.persistence.Query.getSingleResult
                      1.3% - 133 kB - 2,448 alloc. javax.persistence.Query.getResultList
        33.3% - 3,375 kB - 61,724 alloc. com.arjuna.ats.arjuna.coordinator.BasicAction.addChildThread
          33.3% - 3,375 kB - 61,724 alloc. com.arjuna.ats.internal.arjuna.thread.ThreadActionData.pushAction
            33.3% - 3,375 kB - 61,724 alloc. com.arjuna.ats.internal.arjuna.thread.ThreadActionData.pushAction
              33.3% - 3,375 kB - 61,724 alloc. com.arjuna.ats.arjuna.AtomicAction.begin
                33.3% - 3,375 kB - 61,724 alloc. com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.<init>
                  33.3% - 3,375 kB - 61,724 alloc. com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin
                    33.3% - 3,375 kB - 61,724 alloc. javax.transaction.TransactionManager.begin
                      33.3% - 3,375 kB - 61,724 alloc. com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin
                        31.4% - 3,183 kB - 58,214 alloc. javax.transaction.UserTransaction.begin
                        1.9% - 191 kB - 3,510 alloc. java.lang.reflect.InvocationHandler.invoke


      Garbage collector mode:      Live objects
      Allocations of:      com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction
      Aggregation level:      Methods
      Filtered classes:      show separately

      java.lang.Object.<init>     10,766 kB (100 %)    76,565
        100.0% - 10,766 kB - 76,565 alloc. com.arjuna.ats.arjuna.StateManager.<init>
          100.0% - 10,766 kB - 76,565 alloc. com.arjuna.ats.arjuna.StateManager.<init>
            100.0% - 10,766 kB - 76,565 alloc. com.arjuna.ats.arjuna.coordinator.BasicAction.<init>
              100.0% - 10,766 kB - 76,565 alloc. com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.<init>
                100.0% - 10,766 kB - 76,565 alloc. com.arjuna.ats.arjuna.AtomicAction.<init>
                  100.0% - 10,766 kB - 76,565 alloc. com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction.<init>
                    100.0% - 10,766 kB - 76,565 alloc. com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.<init>
                      100.0% - 10,766 kB - 76,565 alloc. com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin
                        100.0% - 10,766 kB - 76,565 alloc. javax.transaction.TransactionManager.begin
                          100.0% - 10,766 kB - 76,565 alloc. com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin
                            93.8% - 10,100 kB - 71,827 alloc. javax.transaction.UserTransaction.begin
                            6.2% - 666 kB - 4,738 alloc. java.lang.reflect.InvocationHandler.invoke