[GLASSFISH-13456] OOME after multiple deployments of a sample app Created: 15/Sep/10  Updated: 08/Oct/10  Resolved: 08/Oct/10

Status: Resolved
Project: glassfish
Component/s: cdi
Affects Version/s: 3.1
Fix Version/s: not determined

Type: Bug Priority: Critical
Reporter: arungupta Assignee: Sivakumar Thyagarajan
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: File twitter-demo-1.0-SNAPSHOT.war    
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.



 Comments   
Comment by Hong Zhang [ 15/Sep/10 ]

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

Comment by arungupta [ 15/Sep/10 ]

Created an attachment (id=4895)
WAR attachment

Comment by arungupta [ 15/Sep/10 ]

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

Comment by Hong Zhang [ 15/Sep/10 ]

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

Comment by arungupta [ 15/Sep/10 ]

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.

Comment by Hong Zhang [ 15/Sep/10 ]

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?

Comment by Hong Zhang [ 20/Sep/10 ]

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.

Comment by arungupta [ 20/Sep/10 ]

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 ?

Comment by Hong Zhang [ 20/Sep/10 ]

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.

Comment by Hong Zhang [ 20/Sep/10 ]

assign to Siva and add myself to Cc

Comment by Sivakumar Thyagarajan [ 08/Oct/10 ]

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 ***
Generated at Sat Oct 01 05:18:25 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.