glassfish
  1. glassfish
  2. GLASSFISH-13456

OOME after multiple deployments of a sample app

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 3.1
    • Fix Version/s: not determined
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      13,456

      Description

      After multiple (5-6) deployments of a sample application, the app server throws OOME with the
      following stack trace:

      INFO: java.lang.OutOfMemoryError: Java heap space
      INFO: at sun.nio.cs.UTF_8.newEncoder(UTF_8.java:53)
      INFO: at java.lang.StringCoding$StringEncoder.<init>(StringCoding.java:215)
      INFO: at java.lang.StringCoding$StringEncoder.<init>(StringCoding.java:207)
      INFO: at java.lang.StringCoding.encode(StringCoding.java:266)
      INFO: at java.lang.String.getBytes(String.java:946)
      INFO: at java.io.UnixFileSystem.getLastModifiedTime(Native Method)
      INFO: at java.io.File.lastModified(File.java:826)
      INFO: at org.apache.felix.fileinstall.internal.Scanner.checksum(Scanner.java:178)
      INFO: at org.apache.felix.fileinstall.internal.Scanner.checksum(Scanner.java:169)
      INFO: at org.apache.felix.fileinstall.internal.Scanner.scan(Scanner.java:113)
      INFO: at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:228)
      SEVERE: Exception in thread "DynamicReloader"
      SEVERE: java.lang.OutOfMemoryError: Java heap space
      SEVERE: Exception in thread "AutoDeployer"
      SEVERE: java.lang.OutOfMemoryError: Java heap space

      The app server has to be killed (kill -9) and restarted.

        Activity

        Hide
        Hong Zhang added a comment -

        arun: can you attach the sample application which cause this?

        Show
        Hong Zhang added a comment - arun: can you attach the sample application which cause this?
        Hide
        arungupta added a comment -

        Created an attachment (id=4895)
        WAR attachment

        Show
        arungupta added a comment - Created an attachment (id=4895) WAR attachment
        Hide
        arungupta added a comment -

        Running the app requires to configure a database, let me know if you need steps for that.

        Show
        arungupta added a comment - Running the app requires to configure a database, let me know if you need steps for that.
        Hide
        Hong Zhang added a comment -

        Does the deployment need database too? The OOM happens with the multiple
        deployments, not running right?

        Show
        Hong Zhang added a comment - Does the deployment need database too? The OOM happens with the multiple deployments, not running right?
        Hide
        arungupta added a comment -

        Deployment should not need database.

        OOME occurs during this typical cycle ...

        Deploy
        Access the web app a few times
        Deploy
        Access the web app a few times
        Deploy
        So on ...

        And then deployment fails with OOME - typically within 6-10 times.

        Am using b17.

        Show
        arungupta added a comment - Deployment should not need database. OOME occurs during this typical cycle ... Deploy Access the web app a few times Deploy Access the web app a few times Deploy So on ... And then deployment fails with OOME - typically within 6-10 times. Am using b17.
        Hide
        Hong Zhang added a comment -

        I see. Yes, please attach the instruction for database as well (is it using
        derby?).

        If you just deploy the application many times without accessing it, do you get
        the OOM?

        Show
        Hong Zhang added a comment - I see. Yes, please attach the instruction for database as well (is it using derby?). If you just deploy the application many times without accessing it, do you get the OOM?
        Hide
        Hong Zhang added a comment -

        Arun: I could not reproduce this on my box if I just deploy multiple times. So
        please attach the instruction how to run the application too. And if you could
        collect some memory graphs while you are doing this sequence, that will be very
        helpful so we will be able to get some information about which object(s) keep
        growing.

        Show
        Hong Zhang added a comment - Arun: I could not reproduce this on my box if I just deploy multiple times. So please attach the instruction how to run the application too. And if you could collect some memory graphs while you are doing this sequence, that will be very helpful so we will be able to get some information about which object(s) keep growing.
        Hide
        arungupta added a comment -

        Thanks Hong!

        You can check out the workspace from:

        CVSROOT :pserver:<SUN-LDAP-ID>@sunsw.sfbay.sun.com:/sw/wpts
        Module: javaone2010/javaone2010/twitter-demo

        All the instructions are in readme.txt.

        How can I collect memory graphs for you ?

        Show
        arungupta added a comment - Thanks Hong! You can check out the workspace from: CVSROOT :pserver:<SUN-LDAP-ID>@sunsw.sfbay.sun.com:/sw/wpts Module: javaone2010/javaone2010/twitter-demo All the instructions are in readme.txt. How can I collect memory graphs for you ?
        Hide
        Hong Zhang added a comment -

        After some initial investigation, this seems a simiar issue as issue 12368. The
        number of WebappClassLoader instances increases with redeployment and cdi was
        used in the application. Assign to Siva for further investigation.

        Show
        Hong Zhang added a comment - After some initial investigation, this seems a simiar issue as issue 12368. The number of WebappClassLoader instances increases with redeployment and cdi was used in the application. Assign to Siva for further investigation.
        Hide
        Hong Zhang added a comment -

        assign to Siva and add myself to Cc

        Show
        Hong Zhang added a comment - assign to Siva and add myself to Cc
        Hide
        Sivakumar Thyagarajan added a comment -

        The memory leak issues are tracked as part 12368 and 11668. So marking this as a
        duplicate
        We are waiting for a fix to WELD-570 https://jira.jboss.org/browse/WELD-570 that
        would resolve this and other memory leak issues. Targetting that issue for MS7

            • This issue has been marked as a duplicate of 12368 ***
        Show
        Sivakumar Thyagarajan added a comment - The memory leak issues are tracked as part 12368 and 11668. So marking this as a duplicate We are waiting for a fix to WELD-570 https://jira.jboss.org/browse/WELD-570 that would resolve this and other memory leak issues. Targetting that issue for MS7 This issue has been marked as a duplicate of 12368 ***

          People

          • Assignee:
            Sivakumar Thyagarajan
            Reporter:
            arungupta
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: