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 193677 - OutOfMemory during clean build
Summary: OutOfMemory during clean build
Status: RESOLVED WORKSFORME
Alias: None
Product: webservices
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-21 08:45 UTC by Jaroslav Tulach
Modified: 2010-12-22 06:42 UTC (History)
0 users

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 Jaroslav Tulach 2010-12-21 08:45:41 UTC
I tried:


$ ANT_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/jarda/dump.hprof"  ant clean build commit-validation

on revision 23cea3a6189a and the build fails on output memory exception due to lack of permgen space. 

The dump shows at least two com.sun.istack.tools.ParallelWorldClassLoaders holding huge amount of classes. If I am right, this is some utility need to pre-process web services classes.


The build was executing some target in in ide.ergonomics. It is clear that the com.sun.istack.tools.ParallelWorldClassLoader and their classes were no longer necessary. Please make sure the build task that needs com.sun.istack.tools.ParallelWorldClassLoaders properly cleans after itself (or it is executed in a forked VM).

The dump is now available at
http://beetle.czech.sun.com/~jt97948/dump-with-clean-build-commit-validation.hprof
Comment 1 Denis Anisimov 2010-12-21 09:21:09 UTC
Result of access to URL :
You don't have permission to access /~jt97948/dump-with-clean-build-commit-validation.hprof on this server.
Comment 2 Jaroslav Tulach 2010-12-21 16:56:07 UTC
It is easy to reproduce the problem locally and the issue contains steps to do it. Anyway I also fix the access rights.
Comment 3 Jaroslav Tulach 2010-12-21 16:59:29 UTC
Today morning the server was up, now it is down. Probably because of migrating to new Oracle new infrastructure. If you have a place where I shall upload the file, let me know. Otherwise please generate new one yourself.
Comment 4 Denis Anisimov 2010-12-21 17:06:37 UTC
Please send this file to me via e-mail.
I have no time to rebuild NB .
Comment 5 Jaroslav Tulach 2010-12-21 19:27:51 UTC
I don't think I can send  a file of this size like this thru email:
165M dump-with-clean-build-commit-validation.hprof
Even after gzip it is still too big, I think:
39M dump-with-clean-build-commit-validation.hprof.gz
I'll try to attach it.
Comment 6 Jaroslav Tulach 2010-12-21 19:37:24 UTC
Too large. But I managed to upload it to http://netbeans.org/projects/performance/downloads/download/dump-with-clean-build-commit-validation.hprof.gz
Comment 7 Denis Anisimov 2010-12-22 06:42:23 UTC
>It is easy to reproduce the problem locally and the issue contains steps to do it.
I'm not able to reproduce it according your suggestion.

Trying to follow your scenario I get the OutOfMemoryError after 
downloadbinaries task.

The build procedure starts to building nb.cluster.ruby modules:


build-one-cluster:
     [echo] Building nb.cluster.ruby modules

OutOfMemoryError arises right after this.

So it has no relation to WS.

You are right that com.sun.istack.tools.ParallelWorldClassLoader relates to 
WS. I have found usage of JAXB xjc task in the module websvc.saas.api.
The ParallelWorldClassLoader class is included in the jar with xjc task.

There are no modifications in this module for a long time.
So it cannot be a reason for suddenly appeared OOME.
This is just one module.
XJC task is external task and I cannot change it.

The problem is deeper than just one module issue.
I believe this is a common issue with build procedure.

Default setting for heap size is not enough to build NB.
There is a recommendation for ant options:
http://wiki.netbeans.org/WorkingWithNetBeansSources
These settings works fine for me. I'm able to do 
ant clean build commit-validation
with success.
So I can't reproduce it with recommended settings for Java Heap size and
there is another problem with default Java Heap size not related to WS.