title: JVM crashed with regards to memory allocation / Stack Guard pages deallocation
body: <p>We recently faced a JVM crash with regards to a java application.</p>
  
  <p>Crash logs:</p>
  
  <pre><code>Java HotSpot(TM) 64-Bit Server VM warning: Attempt to protect stack guard pages failed.
  Java HotSpot(TM) 64-Bit Server VM warning: Attempt to deallocate stack guard pages failed.
  Java HotSpot(TM) 64-Bit Server VM warning: Attempt to deallocate stack guard pages failed.
  Java HotSpot(TM) 64-Bit Server VM warning: Attempt to deallocate stack guard pages failed.
  Java HotSpot(TM) 64-Bit Server VM warning: Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f7d74f56000, 12288, 0) failed; error='Cannot allocate memory' (errno=12)
  Attempt to deallocate stack guard pages failed.
  Java HotSpot(TM) 64-Bit Server VM warning: Attempt to deallocate stack guard pages failed.
  Java HotSpot(TM) 64-Bit Server VM warning: Attempt to deallocate stack guard pages failed.
  Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f7d7131a000, 12288, 0) failed; error='Cannot allocate memory' (errno=12)
  </code></pre>
  
  <p>JDK used: <code>1.7.0_71-64</code>
  OS details: <code>2.6.32-220.17.1.el6.x86_64 #1 SMP Thu Apr 26 13:37:13 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux</code></p>
  
  <p>On searching about the same 2 possibilities were found:</p>
  
  <ol>
  <li>Swap space consumed on Unix box itself. -> Checked was not an issue as memory was available in plenty on the box.</li>
  <li>pmap limit reached -> We don't have stats at what was the state around the time when process crashed.</li>
  </ol>
  
  <p>Also there is a observation that the process had consumed a lot of memory under <code>VIRT</code> virtual memory. Does this tie up with anything?</p>
  
  <p>Would be great if anyone can share any past experience around this error. Or has seen anything like it.</p>