1 Reply Latest reply on Jul 22, 2014 10:29 AM by biwann

    memory leak with com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple - JBoss AS 7.1.1 Final

    biwann

      Hello,

       

      I've got a problem deploying my application on JBoss AS 7.1.1 Final with CMP 2.0 EJB, Linux Redhat 5.

       

      The application is using more and more memory, which GC can't free in the OldGen, causing an outOfMemoryError in few hours, even if the application is not in use.

       

      
      0,884: [GC [PSYoungGen: 33792K->5112K(38912K)] 33792K->8913K(126464K), 0,0260510 secs] [Times: user=0,05 sys=0,01, real=0,03 secs]
      1,292: [GC [PSYoungGen: 38904K->5097K(72704K)] 42705K->14166K(160256K), 0,0280860 secs] [Times: user=0,04 sys=0,00, real=0,03 secs]
      2,405: [GC [PSYoungGen: 72681K->5097K(72704K)] 81750K->34787K(160256K), 0,0358180 secs] [Times: user=0,06 sys=0,01, real=0,04 secs]
      2,973: [GC [PSYoungGen: 72673K->5097K(140288K)] 102363K->47304K(227840K), 0,0364050 secs] [Times: user=0,06 sys=0,01, real=0,04 secs]
      3,313: [GC [PSYoungGen: 140265K->5113K(140288K)] 182473K->65875K(227840K), 0,0289130 secs] [Times: user=0,04 sys=0,01, real=0,03 secs]
      4,338: [GC [PSYoungGen: 140281K->29182K(292864K)] 201047K->93256K(380416K), 0,0707180 secs] [Times: user=0,13 sys=0,01, real=0,07 secs]
      4,409: [Full GC [PSYoungGen: 29182K->0K(292864K)] [ParOldGen: 64074K->85433K(162816K)] 93256K->85433K(455680K) [PSPermGen: 44670K->44474K(89600K)], 0,3418600 secs] [Times: user=0,54 sys=0,02, real=0,34 secs]
      4,762: [GC [PSYoungGen: 4121K->384K(299520K)] 89555K->85817K(462336K), 0,0071630 secs] [Times: user=0,00 sys=0,00, real=0,01 secs]
      6,327: [GC [PSYoungGen: 264064K->37887K(395264K)] 349497K->138585K(558080K), 0,0652380 secs] [Times: user=0,08 sys=0,02, real=0,07 secs]
      8,280: [GC [PSYoungGen: 395263K->51191K(408576K)] 495961K->162051K(571392K), 0,1003420 secs] [Times: user=0,16 sys=0,03, real=0,10 secs]
      83,882: [GC [PSYoungGen: 408567K->64483K(491008K)] 519427K->191334K(653824K), 0,1521380 secs] [Times: user=0,25 sys=0,04, real=0,15 secs]
      231,885: [GC [PSYoungGen: 490979K->80873K(507392K)] 617830K->233894K(670208K), 0,2217970 secs] [Times: user=0,39 sys=0,05, real=0,22 secs]
      232,107: [Full GC [PSYoungGen: 80873K->0K(507392K)] [ParOldGen: 153020K->142767K(256000K)] 233894K->142767K(763392K) [PSPermGen: 74602K->74147K(122880K)], 1,4381730 secs] [Times: user=2,63 sys=0,00, real=1,44 secs]
      382,616: [GC [PSYoungGen: 426496K->43408K(600064K)] 569263K->186175K(856064K), 0,1065410 secs] [Times: user=0,19 sys=0,02, real=0,10 secs]
      550,693: [GC [PSYoungGen: 539536K->89760K(586240K)] 682303K->232527K(842240K), 0,1880020 secs] [Times: user=0,36 sys=0,00, real=0,19 secs]
      
      
      
      
      
      

      As you can see Heap is consuming 50 M more every 3 minutes, which remains in the OldGen and can't be freed by the Garbage Collector.

       

      After crating a memory dump, the leak seems to come from the creation of JTA transactions :

       

      LeakTransaction.jpg

       

      3 616 instances of "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple", loaded by "org.jboss.modules.ModuleClassLoader @ 0x78122a170" occupy 153 506 944 (64,98%) bytes. These instances are referenced from one instance of "java.util.HashMap$Entry[]", loaded by "<system class loader>"
      
      

       

      Application is connected to an Oracle 9i database, unsing THIN driver (ojdbc6.jar)

      I've tried to set jta="false" without success :

      
      
      <datasource jta="false" jndi-name="java:jboss/datasources/myDatasource" pool-name="myDatasource" enabled="true">
                          <connection-url>jdbc:oracle:thin:@IP:PORT:SID</connection-url>
                          <driver>com.oracle</driver>
                          <pool>
                              <min-pool-size>3</min-pool-size>
                              <max-pool-size>10</max-pool-size>             
      
      
      
      
      

      JVM tuning has no effects either :

       

      
      -d64 -Xms128m -Xmx2048m -XX:MaxPermSize=512m -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+DisableExplicitGC -XX:+UseParallelOldGC -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
      
      
      
      
      
      

       

      Any help would be greatly appreciated !