title: JVM crashes when eden space is 100%
body: <p>I have a production system with a JBoss application server running on JDK 1.6.0_24, JBoss 4.3.
  Every now and then, the server crashes and a dump file created by the JVM has consistent results:</p>
  <pre><code>{Heap before GC invocations=6421 (full 4675):
    PSYoungGen      total 521536K, used 518784K [0xdbc00000, 0xfbc00000, 0xfbc00000)
    eden space 518784K, 100% used [0xdbc00000,0xfb6a0000,0xfb6a0000)
    
    from space 2752K, 0% used [0xfb950000,0xfb950000,0xfbc00000)
    to   space 2752K, 0% used [0xfb6a0000,0xfb6a0000,0xfb950000)
      
   PSOldGen        total 1572864K, used 1572855K [0x7bc00000, 0xdbc00000, 0xdbc00000)
    object space 1572864K, 99% used [0x7bc00000,0xdbbfdeb8,0xdbc00000)
   PSPermGen       total 524288K, used 92683K [0x5bc00000, 0x7bc00000, 0x7bc00000)
    object space 524288K, 17% used [0x5bc00000,0x61682c30,0x7bc00000)
  81507.318: [Full GC [PSYoungGen: 518784K-&gt;518784K(521536K)] [PSOldGen: 1572855K-&gt;1572855K(1572864K)] 2091639K-&gt;2091639K(2094400K) [PSPermGen: 92683K-&gt;92683K(524288K)], 1.5334976 secs] [Times: user=1.53 sys=0.00, real=1.53 secs] 
  Heap after GC invocations=6421 (full 4675):
   PSYoungGen      total 521536K, used 518784K [0xdbc00000, 0xfbc00000, 0xfbc00000)
    eden space 518784K, 100% used [0xdbc00000,0xfb6a0000,0xfb6a0000)
    from space 2752K, 0% used [0xfb950000,0xfb950000,0xfbc00000)
    to   space 2752K, 0% used [0xfb6a0000,0xfb6a0000,0xfb950000)
   PSOldGen        total 1572864K, used 1572855K [0x7bc00000, 0xdbc00000, 0xdbc00000)
    object space 1572864K, 99% used [0x7bc00000,0xdbbfdeb8,0xdbc00000)
   PSPermGen       total 524288K, used 92683K [0x5bc00000, 0x7bc00000, 0x7bc00000)
    object space 524288K, 17% used [0x5bc00000,0x61682c30,0x7bc00000)
  }
  </code></pre>
  <p>for JAVA_OPTS, we've got:</p>
  <blockquote>
  <p>-server</p>
  <p>-Xms2048m</p>
  <p>-Xmx2048m</p>
  <p>-Dsun.rmi.dgc.client.gcInterval=3600000</p>
  <p>-Dsun.rmi.dgc.server.gcInterval=3600000</p>
  <p>-Dsun.lang.ClassLoader.allowArraySyntax=true</p>
  <p>-XX:NewSize=512m</p>
  <p>-XX:MaxNewSize=512m</p>
  <p>-XX:PermSize=512m</p>
  <p>-XX:MaxPermSize=512m</p>
  <p>-verbosegc</p>
  <p>-XX:+PrintGCDetails</p>
  <p>-XX:+PrintGCTimeStamps</p>
  <p>-XX:+PrintHeapAtGC</p>
  <p>-XX:+CMSPermGenSweepingEnabled</p>
  <p>-XX:-TraceClassLoading</p>
  <p>-XX:-TraceClassUnloading</p>
  </blockquote>
  <p>So it seems to me like 2GB are enough and there is more memory that can be used, so there shouldn't be any problem.</p>
  <p>any suggestions?</p>