1 2 Previous Next 15 Replies Latest reply on May 1, 2013 1:54 AM by jskovjyskebankdk

    JBoss 4.1.0.Alpha1 memory leak?

    jskovjyskebankdk

      A few of us has started using the new Alpha1 with Kepler M5.

       

      The impression is there is a much higher memory load. Especially on XP where our Heap is limited to 1GB this becomes a problem.

       

      Since I don't have a specific use case I can repeat, I have a little trouble providing you with some useful information.

       

       

      However, I got a heap dump from one of the sessions where things was at a crawl. Analyzing it, I find this in Memory Analysis's leak suspects:

       

      900 instances of "org.jboss.tools.common.model.filesystems.impl.JarAccess", loaded by "org.jboss.tools.common.model" occupy 68.321.856 (18,11%) bytes.

      These instances are referenced from one instance of "org.eclipse.jdt.core.IElementChangedListener[]", loaded by "org.eclipse.jdt.core"

       

      20% of memory locked up by a single plugin seems excessive, but I don't really have anything to compare it with. So it may be OK?!?

       

      What do you think?

       

      Is there something I can provide you to resolve if this is a JBossTools leak?

       

       

      Cheers,

      Jesper

        • 1. Re: JBoss 4.1.0.Alpha1 memory leak?
          jskovjyskebankdk

          The above is suspect #2.

           

          Suspect #3 is this:

          6.044 instances of "org.jboss.tools.common.model.filesystems.impl.JarSystemImpl", loaded by "org.jboss.tools.common.model" occupy 37.818.184 (10,02%) bytes.

           

          Both hang off the same org.eclipse.jdt.core.IElementChangedListener[]

           

          So that's 28% of used memory :|

          • 2. Re: JBoss 4.1.0.Alpha1 memory leak?
            maxandersen

            Hej Jesper,

             

            Thanks for reporting this - it does looks bad so much appreciated.

             

            Can you provide some details on what you are loading - i.e. how big a workspace ? type of projects etc. ?

            • 3. Re: JBoss 4.1.0.Alpha1 memory leak?
              jskovjyskebankdk

              It's a pretty big workspace:

               

              21-03-2013  13:04    <DIR>          .

              21-03-2013  13:04    <DIR>          ..

              15-03-2013  10:31    <DIR>          .ivy.V01-04+

              20-03-2013  10:18    <DIR>          .metadata

              18-12-2012  10:52    <DIR>          eclipse-dictionary

              26-02-2013  14:34    <DIR>          envers

              15-03-2013  10:31    <DIR>          jb.tes.appmeta

              15-03-2013  10:29    <DIR>          jb.tes.appmeta.cfg

              15-03-2013  10:31    <DIR>          jb.tes.appmeta.ejb

              15-03-2013  10:30    <DIR>          jb.tes.appmeta.service.web

              15-03-2013  10:30    <DIR>          jb.tes.appmeta.web

              14-12-2012  13:46    <DIR>          jb.tes.dbtest

              14-12-2012  13:45    <DIR>          jb.tes.dbtest.cfg

              14-12-2012  13:45    <DIR>          jb.tes.dbtest.ejb

              14-12-2012  13:45    <DIR>          jb.tes.dbtest.web

              17-12-2012  09:56    <DIR>          jb.tes.ee.utilities.ejb.java

              11-01-2013  12:47    <DIR>          jb.tes.errorserver

              11-01-2013  12:45    <DIR>          jb.tes.errorserver.cfg

              11-01-2013  12:45    <DIR>          jb.tes.errorserver.docs

              11-01-2013  12:47    <DIR>          jb.tes.errorserver.ejb

              11-01-2013  12:47    <DIR>          jb.tes.errorserver.prime.web

              14-12-2012  12:10    <DIR>          jb.tes.extauthprovider

              28-11-2012  13:32    <DIR>          jb.tes.extauthprovider.cfg

              13-12-2012  09:39    <DIR>          jb.tes.extauthprovider.client.java

              13-12-2012  09:44    <DIR>          jb.tes.extauthprovider.ejb

              13-12-2012  09:39    <DIR>          jb.tes.extauthprovider.ejbrestclient.java

              07-12-2012  12:12    <DIR>          jb.tes.extauthprovider.frontend.demo

              28-11-2012  13:33    <DIR>          jb.tes.extauthprovider.frontend.demo.ejb

              07-12-2012  12:12    <DIR>          jb.tes.extauthprovider.frontend.demo.web

              13-12-2012  09:39    <DIR>          jb.tes.extauthprovider.nemid.jsf.java

              13-12-2012  09:44    <DIR>          jb.tes.extauthprovider.service.web

              13-12-2012  09:44    <DIR>          jb.tes.extauthprovider.web

              29-11-2012  12:43    <DIR>          jb.tes.extauthprovider.web.java

              28-11-2012  13:32    <DIR>          jb.tes.externallogin

              28-11-2012  13:31    <DIR>          jb.tes.externallogin.cfg

              28-11-2012  13:31    <DIR>          jb.tes.externallogin.ejb

              28-11-2012  13:32    <DIR>          jb.tes.externallogin.jsf.java

              28-11-2012  13:32    <DIR>          jb.tes.externallogin.web

              20-12-2012  14:00    <DIR>          jb.tes.fsaccess.cfg

              15-01-2013  10:03    <DIR>          jb.tes.fsaccess.ra

              13-03-2013  15:34    <DIR>          jb.tes.fstest

              05-12-2012  16:39    <DIR>          jb.tes.fstest.cfg

              23-01-2013  13:13    <DIR>          jb.tes.fstest.ejb

              05-12-2012  16:37    <DIR>          jb.tes.fstest.service.web

              13-03-2013  15:34    <DIR>          jb.tes.fstest.web

              07-01-2013  08:58    <DIR>          jb.tes.heuristicexception

              07-01-2013  08:58    <DIR>          jb.tes.heuristicexception.cfg

              07-01-2013  08:58    <DIR>          jb.tes.heuristicexception.ejb

              07-01-2013  08:58    <DIR>          jb.tes.heuristicexception.web

              14-01-2013  15:20    <DIR>          jb.tes.jboss.configuration.cfg

              15-01-2013  09:09    <DIR>          jb.tes.jboss.loginmodule.java

              28-11-2012  14:03    <DIR>          jb.tes.jdma.login

              28-11-2012  13:31    <DIR>          jb.tes.jdma.login.cfg

              28-11-2012  14:03    <DIR>          jb.tes.jdma.login.web

              14-01-2013  14:38    <DIR>          jb.tes.jee.core

              11-02-2013  14:19    <DIR>          jb.tes.jee.core.cfg

              04-01-2013  15:02    <DIR>          jb.tes.jee.core.docs

              14-01-2013  14:38    <DIR>          jb.tes.jee.core.ejb

              14-01-2013  14:38    <DIR>          jb.tes.jee.core.ejbclient

              05-03-2013  10:26    <DIR>          jb.tes.jee.core.faces.java

              05-03-2013  10:26    <DIR>          jb.tes.jee.core.faces.prime.java

              14-01-2013  14:37    <DIR>          jb.tes.jee.core.guap.java

              11-02-2013  14:19    <DIR>          jb.tes.jee.core.java

              13-03-2013  13:54    <DIR>          jb.tes.jee.core.jaxrs.java

              11-02-2013  14:19    <DIR>          jb.tes.jee.core.jboss.java

              14-01-2013  14:37    <DIR>          jb.tes.jee.core.jdbc.java

              05-03-2013  10:26    <DIR>          jb.tes.jee.core.pki.java

              20-03-2013  14:09    <DIR>          jb.tes.jee.core.sol

              04-03-2013  08:59    <DIR>          jb.tes.jee.core.test

              11-03-2013  13:39    <DIR>          jb.tes.jee.core.test.cfg

              04-03-2013  08:59    <DIR>          jb.tes.jee.core.test.ejb

              04-03-2013  08:59    <DIR>          jb.tes.jee.core.test.ejbclient

              04-03-2013  08:59    <DIR>          jb.tes.jee.core.test.web

              04-03-2013  08:58    <DIR>          jb.tes.jee.core.test.ws.encrypted.ejb

              04-03-2013  08:59    <DIR>          jb.tes.jee.core.test.ws.provider.ejb

              13-03-2013  13:54    <DIR>          jb.tes.jee.core.web

              13-03-2013  13:54    <DIR>          jb.tes.jee.core.web.java

              21-03-2013  13:04    <DIR>          jb.tes.jms.heuristic

              21-03-2013  13:04    <DIR>          jb.tes.jms.heuristic.ejb

              21-03-2013  13:04    <DIR>          jb.tes.jms.heuristic.web

              28-11-2012  14:03    <DIR>          jb.tes.jyskedistance.login

              29-11-2012  12:22    <DIR>          jb.tes.jyskedistance.login.cfg

              28-11-2012  14:03    <DIR>          jb.tes.jyskedistance.login.web

              07-03-2013  14:45    <DIR>          jb.tes.ldapaccess

              07-03-2013  14:45    <DIR>          jb.tes.ldapaccess.cfg

              07-03-2013  14:46    <DIR>          jb.tes.ldapaccess.ejb

              07-03-2013  14:45    <DIR>          jb.tes.ldapaccess.services.web

              07-03-2013  14:46    <DIR>          jb.tes.ldapaccess.web

              07-01-2013  09:00    <DIR>          jb.tes.participator

              07-01-2013  08:59    <DIR>          jb.tes.participator.cfg

              07-01-2013  08:59    <DIR>          jb.tes.participator.ejb

              07-01-2013  08:59    <DIR>          jb.tes.participator.web

              28-02-2013  14:57    <DIR>          jb.tes.small

              07-03-2013  11:48    <DIR>          jb.tes.small.cfg

              28-02-2013  14:54    <DIR>          jb.tes.small.ejb

              28-02-2013  14:54    <DIR>          jb.tes.small.web

              03-12-2012  09:44    <DIR>          jb.tes.smsexchange

              03-12-2012  09:42    <DIR>          jb.tes.smsexchange.cfg

              03-12-2012  09:44    <DIR>          jb.tes.smsexchange.ejb

              03-12-2012  09:44    <DIR>          jb.tes.smsexchange.web

              03-12-2012  09:16    <DIR>          jb.tes.smsgateway

              03-12-2012  09:15    <DIR>          jb.tes.smsgateway.cfg

              03-12-2012  09:15    <DIR>          jb.tes.smsgateway.docs

              03-12-2012  09:16    <DIR>          jb.tes.smsgateway.ejb

              03-12-2012  09:15    <DIR>          jb.tes.smsgateway.java

              03-12-2012  09:16    <DIR>          jb.tes.smsgateway.web

              29-11-2012  13:18    <DIR>          jb.tes.smssender

              29-11-2012  13:18    <DIR>          jb.tes.smssender.cfg

              29-11-2012  13:18    <DIR>          jb.tes.smssender.ejb

              29-11-2012  13:18    <DIR>          jb.tes.smssender.service.web

              29-11-2012  13:18    <DIR>          jb.tes.smssender.web

              05-03-2013  13:04    <DIR>          jfadaptor

              13-12-2012  09:26    <DIR>          RemoteSystemsTempFiles

              22-01-2013  09:19    <DIR>          sd.atp

              25-01-2013  10:40    <DIR>          sd.atp.cfg

              24-01-2013  13:51    <DIR>          sd.atp.ejb

              22-01-2013  09:19    <DIR>          sd.atp.published.java

              22-01-2013  09:19    <DIR>          sd.atp.web

              12-12-2012  14:56    <DIR>          sd.common.ali

              12-12-2012  14:55    <DIR>          sd.common.ali.cfg

              12-12-2012  14:56    <DIR>          sd.common.ali.client.ejb

              12-12-2012  14:56    <DIR>          sd.common.ali.ejb

              12-12-2012  14:56    <DIR>          sd.common.ali.ejbclient

              12-12-2012  14:56    <DIR>          sd.common.ali.web

              12-12-2012  14:56    <DIR>          sd.common.ali.ws.ejb

              25-02-2013  08:35    <DIR>          sd.quicksearch

              25-02-2013  08:33    <DIR>          sd.quicksearch.cfg

              25-02-2013  08:34    <DIR>          sd.quicksearch.ejb

              25-02-2013  08:33    <DIR>          sd.quicksearch.loadtest

              25-02-2013  08:35    <DIR>          sd.quicksearch.web

              25-01-2013  08:59    <DIR>          sd.sd1595.ctgtest

              25-01-2013  11:58    <DIR>          sd.sd1595.ctgtest.cfg

              25-01-2013  08:58    <DIR>          sd.sd1595.ctgtest.ejb

              25-01-2013  08:59    <DIR>          sd.sd1595.ctgtest.web

              18-02-2013  15:27    <DIR>          sd.teeasy.java

              05-03-2013  13:04    <DIR>          sdadaptor

              05-03-2013  13:04    <DIR>          smsexchange

              05-03-2013  13:04    <DIR>          smsgateway

              15-01-2013  12:24    <DIR>          txtimemout.ejb

              15-01-2013  12:24    <DIR>          txtimemout.ejbClient

              15-01-2013  12:22    <DIR>          txtimeout

              15-01-2013  12:25    <DIR>          txtimeout.web

               

              Only about half the projects are open though.

               

              Projects without a suffix are EAR projects (if that is not obvious).

              Some of the projects are pretty big.

               

              It's a bit hard to be much more specific than that. Hope it helps.

              • 4. Re: JBoss 4.1.0.Alpha1 memory leak?
                scabanovich

                KB and CDI model use data from jars, so that they are loaded at first request. If there are dependencies between projects in workspace then a request from one project loads all related projects. There should be only one JarAccess object for a jar. If several projects use the same Maven dependencies and/or Runtime, they should use same JarAccess object for each jar. Now, a single new Java EE Web project created from JBoss Central has in Maven Dependences and JBoss AS 7.1 Runtime as many as 170 jars. So, it is probable that your workspace does reference 900 or more distinct jars. Could you please check that? If the number of distinct jars in your workspace is much less, then there is a memory leak with JarAccess. Instances of JarSystemImpl are created for each jar in each project, but they are sharing data if they reference the same jar, so that if there are 6.044 instances of JarSystemImpl but only 900 distinct jar files, then only 900 of JarSystemImpl instances will be loaded, the other will be lightweight references to them. These objects are lazy-loaded that is they load only as much data as requested. However, KB builder now  searches through the entire jar for files myfaces-metadata.xml and facelet taglib files; and in this way results in complete loading of data which cannot be easily released being shared between projects. So, I think that we have to check if we can avoid scanning through the entire jar.

                • 5. Re: JBoss 4.1.0.Alpha1 memory leak?
                  scabanovich
                  • 6. Re: JBoss 4.1.0.Alpha1 memory leak?
                    jskovjyskebankdk

                    I have tried loading a workspace with around 40 open projects that have some 500 jars in build classpaths.

                     

                    Both 4.0.0.Final and 4.1.0.Alpha1 have the same amount of "leaks" when started and all projects have been built.

                     

                    So the problem with Eclipse slowing down is *probably* not related to what I reported above.

                    At least that specific "leak" is probably not what causes the slowdown over time.

                     

                    I'm not sure how to provide better input at this time.

                    We have just switched back to 4.0.0.Final (and Eclipse M6) to make sure the problem goes away when not using Alpha1.

                    • 7. Re: JBoss 4.1.0.Alpha1 memory leak?
                      maxandersen

                      Jesper,

                       

                      Eclipse M6 core has a known memory leak problem: https://bugs.eclipse.org/bugs/show_bug.cgi?id=402912

                       

                      If eclipse is used for a while it will run out of memory because of a leak in the saving of workspace state.

                       

                      Any chance that is what you are seeing ?

                       

                      They will fix this in M7, but until then the following is the workaround:

                       

                      "The workaround for M6 is to set the Preferences>General>"Workbench save interval" to 0, which disables it."

                       

                      Does that help you or is it something else ?

                      • 8. Re: JBoss 4.1.0.Alpha1 memory leak?
                        scabanovich

                        One more issue is created https://issues.jboss.org/browse/JBIDE-13844 "JarAccess should ignore .class entries in jar files". All tools get info about classes from JDT, we scan jars for .xml, .properties, .xhtml, etc. but not for .class entries. They can be just ignored by JarAccess. After that its memory load will drop from 68Mb to 10Mb or less.

                        • 9. Re: JBoss 4.1.0.Alpha1 memory leak?
                          jskovjyskebankdk

                          No, we were on M5 when testing the JBossTools alpha.

                           

                          We just upgraded to M6 - but reverting to the earlier JBossTools release. We'll let M6 settle for a week or so before we'll try anything new.

                          But then I think I convince my team to try out a nightly to see if matters have improved.

                          • 10. Re: JBoss 4.1.0.Alpha1 memory leak?
                            jskovjyskebankdk

                            We've been on B6241 since Monday morning, and it looks much better with M6. Yes, possibly premature to declare it fixed, but I thought you would like to know

                             

                            There may still be a leak issue, but I only hear it from the developer doing web stuff. I'll see if we can get a bit sharper on the problem.

                             

                             

                            PS: Forum tells me I can only post content once every 900 seconds. Why is that? Major pain!

                            • 11. Re: JBoss 4.1.0.Alpha1 memory leak?
                              maxandersen

                              Thanks Jesper - glad it is working.

                               

                              Let me know if I can help with respect to "the developer doing web stuff" ...would be great to know what areas are troubling him.

                               

                              About the forum - 900 seconds/15m sounds a bit limiting; I've pinged help@jboss.org for an explanation

                              • 12. Re: JBoss 4.1.0.Alpha1 memory leak?
                                jskovjyskebankdk

                                Web developer has been doing mostly java for a while, so we have nothing specific at the moment.

                                 

                                We'll let all y'all know if he gets into the rough again...

                                • 13. Re: JBoss 4.1.0.Alpha1 memory leak?
                                  virtualdatabase

                                  . but any reasonable answer to the " 900 seconds" issue..

                                  • 14. Re: JBoss 4.1.0.Alpha1 memory leak?
                                    maxandersen

                                    yes - sorry for not responding.

                                     

                                    I asked help@jboss.org and their answer was that new users has this throttle limit to avoid spam attacks.

                                     

                                    It gets reduced the more and longer you participate.

                                    1 of 1 people found this helpful
                                    1 2 Previous Next