Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-26981

[GSS](8.0.z) SFSB instances more than max-active-beans in distributable-ejb subsystem still remain on the heap

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • Clustering, EJB
    • None
    • False
    • None
    • False
    • Hide

      1. Set max-active-beans to "2" in standalone-ha.xml

              <subsystem xmlns="urn:jboss:domain:distributable-ejb:1.0" default-bean-management="default">
                  <infinispan-bean-management name="default" max-active-beans="2" cache-container="ejb"/>
      

      2. Deploy attached application sfsb.war to jboss-eap-8.0/standalone/deployments/
      3. Start JBoss EAP 8.0.1 with standalone-ha.xml

      jboss-eap-8.0/bin/standalone.sh -c standalone-ha.xml
      

      4. Call CreateSfsbServlet nine times to create more Stateful Session Bean instances than max-active-beans="2." Each SFSB instance has a 100MB byte array in the field.

      curl http://127.0.0.1:8080/sfsb/create_sfsb
      

      5. We can see java.lang.OutOfMemoryError in the console.

      19:21:40,713 WARN  [org.infinispan.PERSISTENCE] (default task-1) ISPN000559: Cannot marshall 'class org.infinispan.marshall.protostream.impl.MarshallableUserObject': java.lang.OutOfMemoryError: Java heap space
      
      Show
      1. Set max-active-beans to "2" in standalone-ha.xml <subsystem xmlns= "urn:jboss:domain:distributable-ejb:1.0" default -bean-management= " default " > <infinispan-bean-management name= " default " max-active-beans= "2" cache-container= "ejb" /> 2. Deploy attached application sfsb.war to jboss-eap-8.0/standalone/deployments/ 3. Start JBoss EAP 8.0.1 with standalone-ha.xml jboss-eap-8.0/bin/standalone.sh -c standalone-ha.xml 4. Call CreateSfsbServlet nine times to create more Stateful Session Bean instances than max-active-beans="2." Each SFSB instance has a 100MB byte array in the field. curl http: //127.0.0.1:8080/sfsb/create_sfsb 5. We can see java.lang.OutOfMemoryError in the console. 19:21:40,713 WARN [org.infinispan.PERSISTENCE] (default task-1) ISPN000559: Cannot marshall 'class org.infinispan.marshall.protostream.impl.MarshallableUserObject': java.lang.OutOfMemoryError: Java heap space

      If SFSB instances are created more than max-active-beans in the distributable-ejb subsystem introduced in JBoss EAP 8.0, they are unremoved from the heap by eviction. Repeatedly creating SFSB instances causes a memory leak despite max-active-bean being set, eventually throwing java.lang.OutOfMemoryError.

      In the case of the reproduced application attached to JIRA, the heap dump when OutOfMemoryError is thrown shows a large Retained Heap of BoundedSegmentedDataContainer:

      dominator_tree in Eclipse Memory Analyzer
      
      Class Name                                                              | Shallow Heap | Retained Heap | Percentage
      --------------------------------------------------------------------------------------------------------------------
      org.infinispan.container.impl.BoundedSegmentedDataContainer @ 0xff044130|           72 |   524,322,240 |     90.75%
      |- java.util.concurrent.atomic.AtomicReferenceArray @ 0xfebd18c8        |           16 |   314,600,024 |     54.45%
      |- org.infinispan.container.entries.ImmortalCacheEntry @ 0xfefc0810     |           24 |   104,859,192 |     18.15%
      '- org.infinispan.container.entries.ImmortalCacheEntry @ 0xfefc14a0     |           24 |   104,859,192 |     18.15%
      --------------------------------------------------------------------------------------------------------------------
      

              jboss-set_jira JBoss SET
              rhn-support-nagetsum Norito Agetsuma
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: