Bug 156007 - Document hanging behaviour when out of perm gen memory
Summary: Document hanging behaviour when out of perm gen memory
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Doc (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.3 M2   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-01 15:51 EDT by Alex Savitsky CLA
Modified: 2006-09-25 17:05 EDT (History)
4 users (show)

See Also:


Attachments
RAR archive containing eclipse.ini and config.ini (1.50 KB, application/octet-stream)
2006-09-05 09:21 EDT, Alex Savitsky CLA
no flags Details
Thread Dump (14.81 KB, text/plain)
2006-09-05 15:25 EDT, Alex Savitsky CLA
no flags Details
Yet another dump from one more hangup (18.76 KB, text/plain)
2006-09-05 16:25 EDT, Alex Savitsky CLA
no flags Details
Added more details in Eclipse readme (2.03 KB, patch)
2006-09-14 12:40 EDT, John Arthorne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Savitsky CLA 2006-09-01 15:51:49 EDT
At different points in time, Eclipse Platform hangs (not a simple slowdown - I waited for 1 hour and it hasn't recovered). I was not able to identify the particular component that causes it. The hangups are quite frequent, about once in an hour.

Version: 3.2.0
Build id: M20060629-1905
Comment 1 Boris Bokowski CLA 2006-09-03 09:02:32 EDT
Could you please run with the -consoleLog command line argument (you can add "-consoleLog" to your eclipse.ini file in a separate line)?  This will open a console window along with Eclipse.  Then, next time you experience a hang, press Ctrl-Break in the console window and attach the resulting thread dump to this bug.  You might have to increase the line buffer (console window menu->properties->layout) to be able to copy the whole thread dump.  Thanks!
Comment 2 Alex Savitsky CLA 2006-09-05 09:01:52 EDT
Aye. Will post the results as soon as I have any.
Comment 3 Alex Savitsky CLA 2006-09-05 09:19:26 EDT
For some reason, I'm unable to start Eclipse this way. When I append -consoleLog to the eclipse.ini (it currently contains "-vmargs -Xms256m -Xmx512m"), Eclipse gives a message "Could not create the Java virtual machine" and refuses to start. I tried to put eclipse.consoleLog=true into config.ini instead - this way, Eclipse starts but there's no console you mentioned (other than the regular Console View). Am I doing something wrong? I'll attach the config files I use, just in case there's anything wrong there (should be stock installation though).
Comment 4 Alex Savitsky CLA 2006-09-05 09:21:22 EDT
Created attachment 49397 [details]
RAR archive containing eclipse.ini and config.ini
Comment 5 Boris Bokowski CLA 2006-09-05 10:57:33 EDT
Put -consoleLog in the first line of eclipse.ini (and use Wordpad, not Notepad to edit the file).
Comment 6 Alex Savitsky CLA 2006-09-05 15:25:52 EDT
Created attachment 49426 [details]
Thread Dump

Complete thread dump for the hangup bug
Comment 7 Alex Savitsky CLA 2006-09-05 16:25:28 EDT
Created attachment 49434 [details]
Yet another dump from one more hangup
Comment 8 Boris Bokowski CLA 2006-09-06 10:32:16 EDT
In both cases, the main thread is doing work, and other threads are active as well.  Could it be a problem with your heap size that causes excessive garbage collection?  Have a look at the section called "Allocating enough memory and solving OutOfMemoryErrors" in readme/readme_eclipse.html, located in your Eclipse install directory.  If this does not help, have you tried running with a different VM to see if the problem is related to the VM?
Comment 9 Alex Savitsky CLA 2006-09-06 10:49:08 EDT
The VM is "Sun Java 2 Standard Edition 5.0 Update 6 for Microsoft Windows" - one of the Eclipse reference platforms, so I'd not count on any problems with this VM (not that I have any control over running a different one, though).

The heap size is already set to 512M (see the config I attached previously) - however, I'll try the -XX:MaxPermSize=128m setting to see if it helps in any way. I'll let you know the progress.
Comment 10 Boris Bokowski CLA 2006-09-06 15:17:55 EDT
John, Michael, any ideas as to what might be going on here?
Comment 11 Michael Valenta CLA 2006-09-06 15:43:37 EDT
Given that threads in both cases appear to be loading classes, I would suggest you ask someone on the Runtime team (like Tom) if they can provide any insight.
Comment 12 Thomas Watson CLA 2006-09-06 15:59:35 EDT
The thread dumps look like bug 153485.  If using the -XX:MaxPermSize=128m VM option helps then this bug is a duplicate of bug 153485.
Comment 13 Alex Savitsky CLA 2006-09-07 14:27:56 EDT
Two days without a single hangup... looks like the MaxPermSize is the solution.

One suggestion, though: update the readme section that talks about this setting, to actually describe the problem it solves. Currently, it only mentions OOM errors - but that's what developers see; regular users (like me) only see the hangup, and therefore fail to make a connection between MaxPermSize setting and their problem. This leads to this bug being reported over and over again.
Comment 14 Boris Bokowski CLA 2006-09-07 17:13:15 EDT

*** This bug has been marked as a duplicate of 153485 ***
Comment 15 John Arthorne CLA 2006-09-14 12:32:10 EDT
I'm going to reopen this to implement the suggested improvement to the documentation.
Comment 16 John Arthorne CLA 2006-09-14 12:40:57 EDT
Created attachment 50168 [details]
Added more details in Eclipse readme
Comment 17 John Arthorne CLA 2006-09-14 12:42:04 EDT
Sonia, can you release this patch to readme_eclipse.html in HEAD?
Comment 18 Sonia Dimitrov CLA 2006-09-14 13:32:15 EDT
Patch released and feature.map updated.
Comment 19 John Arthorne CLA 2006-09-25 17:05:46 EDT
Thanks Sonia. Marking fixed.