4 Replies Latest reply on Jul 23, 2013 12:30 PM by suikast42

    As 7.x MemoryLeak PermGenSpace

    suikast42

      Hi guys,

       

      If I execute my unit tests with arquillian I get OutOfMemoryError:PermGenSpace.

       

      I have a 64-Bit Oracle JDK.

       

      My JBoss memory setting are 2048M for Heap and 512M for PermGenSpace.

       

      I create a HeadDump for this issue.

       

      If I analyse the dump with eclipse memory analyzer then I can see that my entityclasses marked as duplicate classes. It seems so that the Moduleclassloader hold that classes.

        • 1. Re: As 7.x MemoryLeak PermGenSpace
          smarlow

          Could you look at what has (strong) references to the Moduleclassloader instances that are holding the entity classes.  We previously fixed some issues where there were Thread instances (via thread local) referencing deployment classes after undeployment.  Those were fixed but I mention them, just to give you an idea of what could be keeping what sounds like the application deployment Moduleclassloader in memory.

           

          When you look at the heap dump in eclipse memory analyzer, you need to look at the incoming references to the entity classes.  Which, I think you did, as you saw that its the moduleclassloader instance.  You need to repeat and see what is keeping the moduleclassloader in memory.  There is also another view in eclipse memory analyzer, to show gc references to their roots that might also be helpful.

           

          Scott

          • 2. Re: As 7.x MemoryLeak PermGenSpace
            ctomc

            Hi,

             

            We found similar bug in our testsuite https://issues.jboss.org/browse/AS7-6786 and it is fixed by https://github.com/jbossas/jboss-as/pull/4282

             

            Is it possible your tests have same issue?

             

             

            --

            tomaz

            • 3. Re: As 7.x MemoryLeak PermGenSpace
              suikast42

              Ok guys thanks for the ideas,

               

              I can continue my work for this issue tomorrow. I'll report about the progress.

              • 4. Re: As 7.x MemoryLeak PermGenSpace
                suikast42

                Hi Guys,

                 

                I have litte more time from the daily development stuff and reopened my PermGenSpace problem again.

                 

                For to know if the leak is on our side or on jboss site I create a simple war project with my project dependencies. I see the problem still exisits.

                 

                So far so good.

                 

                I delete dependency by depency and show the PermGenSpace after every hotdeployment. After delete the dependency to Primefaces 3.5 the problem is going.

                 

                I haven't the problem with Primefaces 4.0-SNAPSHOT. It seems so that PF was the culprit.