This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 86407 - PermGen Space OutOfMemory Error with out-of-box webapp
Summary: PermGen Space OutOfMemory Error with out-of-box webapp
Status: RESOLVED INVALID
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Sherold Dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-03 20:31 UTC by Rich Unger
Modified: 2006-10-23 16:41 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rich Unger 2006-10-03 20:31:26 UTC
Split off from Issue 85179...

Here's a recipe for reproducing the problem, using only a simple Web
Project in NetBeans 5.0 with jdk 1.5.0_06:

1. Create a new web project
2. Windows...Runtime...Servers...Bundled Tomcat...Properties...Platform...VM
Options: -Dcom.sun.management.jmxremote
3. Start the internal tomcat server
4. $JAVA_HOME/bin/jconsole.exe
5. In JConsole, connect to the catalina VM
(org.apache.cataline.startup.Bootstrap start)
6. In the Memory tab, select "Memory Pool 'Perm Gen'" from the "Chart" combo box
7. Deploy the webapp in NB
8. Go to Step 7

Each time you deploy, your PermGen space usage will monotonically increase.  The
effect is more pronounced if you add libraries to your webapp (like JSF)


I'm not sure what the contract between NB and Tomcat is with respect to
re-deploying an already-deployed app.  Either:

1. NB has to tell tomcat that the overwritten app is no longer needed, so its
resources can be undeployed.

2. Tomcat has to be smart enough to know that this new app being deployed is a
replacement for an already-deployed app, and it must release the appropriate
ClassLoader/classes/etc.

3. I'm off my rocker and it's something else altogether.

If it's (1), then I guess this is a valid bug report.  If it's (2), then I guess
tomcat gets a bug report.  If it's (3) I'll go crawl away :)
Comment 1 Sherold Dev 2006-10-04 08:58:48 UTC
NetBeans is using the Tomcat Manger web application for deploying/undeploying
web applications to Tomcat and according to what Gregg noted:

"Using Tomcat's Manager user interface (instead of NetBeans) I repeatedly
redployed (the button is labeled "Reload" in the Tomcat Manager UI) a simple web
application and I saw perm gen increase in size (by about 8K) each time."

the problem is in Tomcat itself -> closing as INVALID.
Comment 2 _ rkubacki 2006-10-04 09:20:25 UTC
Rich, it really looks that this is a problem in Tomcat. It would be good to
verify that this is dup of some known Tomcat bug like
http://issues.apache.org/bugzilla/show_bug.cgi?id=33711. It can be also a
different problem if this is related to JMX RI.

BTW: did you really reached OOME? Perm gen will only be collected when full GC runs.
Comment 3 Rich Unger 2006-10-04 17:28:29 UTC
I filed http://issues.apache.org/bugzilla/show_bug.cgi?id=40679

Radim: Yes, I actually see OutOfMemoryErrors, because the increase is much
higher than 8k if you have more classes in the webapp (say, if you add some
libraries like JSF, struts, etc).