Issue Details (XML | Word | Printable)

Key: GLASSFISH-13456
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Critical Critical
Assignee: Sivakumar Thyagarajan
Reporter: arungupta
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
glassfish

OOME after multiple deployments of a sample app

Created: 15/Sep/10 10:35 AM   Updated: 08/Oct/10 05:48 AM   Resolved: 08/Oct/10 05:48 AM
Component/s: cdi
Affects Version/s: 3.1
Fix Version/s: not determined

Time Tracking:
Not Specified

File Attachments: 1. File twitter-demo-1.0-SNAPSHOT.war (8.55 MB) 15/Sep/10 12:28 PM - arungupta

Environment:

Operating System: All
Platform: All


Issuezilla Id: 13,456
Tags:
Participants: arungupta, Hong Zhang and Sivakumar Thyagarajan


 Description  « Hide

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.



Hong Zhang added a comment - 15/Sep/10 11:04 AM

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


arungupta added a comment - 15/Sep/10 12:28 PM

Created an attachment (id=4895)
WAR attachment


arungupta added a comment - 15/Sep/10 12:28 PM

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


Hong Zhang added a comment - 15/Sep/10 12:35 PM

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


arungupta added a comment - 15/Sep/10 12:38 PM

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.


Hong Zhang added a comment - 15/Sep/10 12:47 PM

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?


Hong Zhang added a comment - 20/Sep/10 05:37 AM

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.


arungupta added a comment - 20/Sep/10 06:20 AM

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 ?


Hong Zhang added a comment - 20/Sep/10 09:28 AM

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.


Hong Zhang added a comment - 20/Sep/10 09:29 AM

assign to Siva and add myself to Cc


Sivakumar Thyagarajan added a comment - 08/Oct/10 05:48 AM

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 ***