Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JVM Crash

 
J Wallace
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm running a Java 1.4.2 application on a Red Hat machine that causes the JVM to crash with a SIGSEGV error. -Xms is 64M and -Xmx is 128M. I first thought that the perm gen size was too low since it always has a high percentage (98/99%) when the JVM crashes. After reading more about the perm gen, though, I'm not so sure. Am I looking down the right path by thinking it may be the perm gen size being too low or is the percentage so high just because the JVM will resize it dynamically? When it crashes the perm gen's total size is around 10/11 MB and its usually 99% full.

Below are some snippets of the JVM's output.



...



...



If it's not the perm gen, does anyone have any other suggestions?
 
Henry Wong
author
Marshal
Pie
Posts: 21366
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A segmentation violation is something that you should never get with Java. Log into bugs.sun.com, and search to see if there is a bug that is similar to what you are encountering. Check for any known work-arounds. If not, then report the bug...

Henry
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had some bulky code I wrote recently doing some thinking about an issue in a post and I intentionally left a recursive call such that it would either blow out the stacks or the jvm would have some mighty powerful optomization built in.

It crashed, I set it to a more sane loop construct, it ran - very well.

I suspect the ( what looks to me to be a segmentation violation ) which comes from memory hogging probably, would be better addressed by re-writing the app. Also we have an opportunity for Linux questions in a forum for that purpose.

please re-write the code line that is stretching the window thus:


visit: Linux / UNIX at our facility.
 
J Wallace
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should I be concerned about the perm gen being at 99% capacity when the JVM crashes?
 
Henry Wong
author
Marshal
Pie
Posts: 21366
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by J Wallace:
Should I be concerned about the perm gen being at 99% capacity when the JVM crashes?


Well, as mentioned, since a seg fault should never happen, the answer is "I don't know". You are basically speculating on a cause for something that should never happen.

Anyway, if you really believe that it is the permanent generation portion of the heap, you can increase it...

-XX:MaxPermSize=256m

This should raise it from the default size of 64 meg.

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic