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 214740 - OutOfMemoryError after half a Day
Summary: OutOfMemoryError after half a Day
Status: RESOLVED INCOMPLETE
Alias: None
Product: ide
Classification: Unclassified
Component: Performance (show other bugs)
Version: 7.2
Hardware: PC Windows XP
: P1 normal (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-25 21:58 UTC by bht
Modified: 2012-06-30 07:23 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
logs and heap dump part 1 (10.00 MB, application/octet-stream)
2012-06-25 22:01 UTC, bht
Details
logs and heap dump part 2 (10.00 MB, application/octet-stream)
2012-06-25 22:02 UTC, bht
Details
logs and heap dump part 3 (10.00 MB, application/octet-stream)
2012-06-25 22:03 UTC, bht
Details
logs and heap dump part 4 (10.00 MB, application/octet-stream)
2012-06-25 22:05 UTC, bht
Details
logs and heap dump part 5 (7.96 MB, application/octet-stream)
2012-06-25 22:06 UTC, bht
Details
log minus heap dump in zip file (181.45 KB, application/octet-stream)
2012-06-30 00:47 UTC, bht
Details
netbeans.conf (2.98 KB, text/plain)
2012-06-30 01:09 UTC, bht
Details
log files minus heap dump in zip file (187.82 KB, application/octet-stream)
2012-06-30 03:29 UTC, bht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2012-06-25 21:58:45 UTC
Product Version: NetBeans IDE Dev (Build 201206200001)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Windows XP version 5.1 running on x86; Cp1252; en_NZ (nb)

Java debugging and idle.

Heap dump split files were created with 7-zip http://www.7-zip.org/ from a
single zip file. Sorry for this. I tried without success to upload to
senduit.
Comment 1 bht 2012-06-25 22:01:02 UTC
Created attachment 121323 [details]
logs and heap dump part 1
Comment 2 bht 2012-06-25 22:02:31 UTC
Created attachment 121324 [details]
logs and heap dump part 2
Comment 3 bht 2012-06-25 22:03:50 UTC
Created attachment 121325 [details]
logs and heap dump part 3
Comment 4 bht 2012-06-25 22:05:11 UTC
Created attachment 121326 [details]
logs and heap dump part 4
Comment 5 bht 2012-06-25 22:06:19 UTC
Created attachment 121327 [details]
logs and heap dump part 5
Comment 6 Marian Mirilovic 2012-06-26 07:16:03 UTC
reassign to performance team for evaluation
Comment 7 Tomas Hurka 2012-06-26 07:38:14 UTC
Please attach messages.log.
Comment 8 Tomas Hurka 2012-06-26 07:40:53 UTC
(In reply to comment #7)
> Please attach messages.log.
Ok, It is in the zip file.
Comment 9 Tomas Hurka 2012-06-26 07:54:30 UTC
I am sorry, but there is no sign of out-of-memory-error exception in heap dump and in messages.log(s) in the attached zip.
Comment 10 bht 2012-06-26 08:08:27 UTC
Can one not from the heap dump analyze where the memory is wasted without getting an OutOfMemoryError? The IDE became unresponsive and complained that it could no longer get enough memory to compile source files. That was fairly obvious to me.

I watched the memory display and decided to quit after garbage collection could no longer reduce memory below somewhere around 385MBytes. I think it is not normal that I have to re-start the IDE after a half a day to reclaim memory. That is because on my computer if I wait for OutOfMemoryError then this is very painful because with a single CPU, it may takes hours to record this and gracefully recover from it. I had to do that with issue 213860 which was fixed. Apparently my computer is good for detecting these things.

Do you have any suggestions, advice?
Comment 11 Tomas Hurka 2012-06-26 08:42:51 UTC
From the heap dump it is not quite clear what is going on. The only think we know is that your have very large maven project. Waiting for OOME will give us better info what is going on. It will also trigger generation of the heap dump. 

Besides that you can try several things:
1) do not use full NetBeans distro. Use Java SE (or Java EE).
2) you are running on 32bit system where default Xmx is 384m. You can try to increase it to 700m.
Comment 12 bht 2012-06-30 00:47:48 UTC
Created attachment 121592 [details]
log minus heap dump in zip file

Ran out of memory with display 129.5 / 247.5MB which is much less after last time.
I added in <Install Dir>\etc\netbeans.conf
-J-XX:MaxPermSize=512m -Xmx800m
There is sufficient memory in my system (3GB physical, only 1 GB used, 2GB available)

This happened after opening a few files and cut and paste code. Please let me know if you need the heap dump. Can attach on Monday.
Comment 13 bht 2012-06-30 01:09:05 UTC
Created attachment 121593 [details]
netbeans.conf
Comment 14 bht 2012-06-30 03:29:58 UTC
Created attachment 121595 [details]
log files minus heap dump in zip file

Another out of memory error. Was openeing an HTML file while a Windows Explorer search was running. I/O would have been slow.
Comment 15 bht 2012-06-30 05:29:33 UTC
I now stopped using the build netbeans-trunk-nightly-201206280002-ml-windows.exe with the error and switched back to 7.1.2. In addition to the large Maven project, and a Java EE project, I opened a Java ME project. No problems.
Comment 16 Tomas Hurka 2012-06-30 07:23:22 UTC
Due to incorrect changes to netbeans.conf, you are still running with Xmx 384M and default MaxPermSize, which is 64M. Netbeans needs a least 256M MaxPermSize.
So:
1) There is no need to change MaxPermSize
2) You forgot to add -J to -Xmx
3) Both "-J-XX:MaxPermSize=512m -Xmx800m" must be inside of double quotes of netbeans_default_options

For your testing, it is much easier to rollback all your changes to netbeans.conf file and run netbeans.exe from command line:

netbeans.exe -J-Xmx800m