title: Tomcat8 shutdown memory error with OpenJDK.1.8.0_131
body: <p>I am trying to deploy an web application with Tomcat8. When I shutdown tomcat instance following message show up in console.</p>
  
  <pre><code>OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000005c0000000, 6442450944, 0) failed; error='Cannot allocate memory' (errno=12)
  #
  # There is insufficient memory for the Java Runtime Environment to continue.
  # Native memory allocation (mmap) failed to map 6442450944 bytes for committing reserved memory.
  # An error report file with more information is saved as:
  # /home/my/path/project/apache-tomcat-8.0.28/bin/hs_err_pid7710.log
  The stop command failed. Attempting to signal the process to stop through OS signal.
  Tomcat stopped.
  </code></pre>
  
  <p>So when I open the file, I could find below statement.</p>
  
  <pre><code>---------------  P R O C E S S  ---------------
  
  Java Threads: ( =&gt; current thread )
  
  Other Threads:
  
  =&gt;0x00007f9e6000a000 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=7711, stack(0x00007f9e69    497000,0x00007f9e69598000)]
  
  VM state:not at safepoint (not fully initialized)
  
  VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
  [0x00007f9e60007f30] Heap_lock - owner thread: 0x00007f9e6000a000
  
  GC Heap History (0 events):
  No events
  
  Deoptimization events (0 events):
  No events
  
  Internal exceptions (0 events):
  No events
  
  Events (0 events):
  No events
  </code></pre>
  
  <p>What <code>VM state: not at safe point</code> means? 
  Here is my command to executed java.</p>
  
  <pre><code>VM Arguments:
  jvm_args: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.net.preferIPv4Stack=true -Xms6144m -Xmx8192m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m -XX:+UseG1GC -Djava.awt.h    eadless=true -verbose:gc -Xloggc:/home/my/path/project/apache-tomcat-8.0.28/logs/gc.log -Djava    .library.path=/home/my/path/project/lib -Djava.endorsed.dirs=/home/my/path/project/apache-tomcat-8.0.28/endorsed -Dcatalina.base=/home/my/path/project/apache-tomcat-8.0.28 -Dcatalina.home=/home/my/path/project/apache-tomcat-8.0.28 -Djava.io.tmpdir=/home/my/path/project/apache-tomcat-8.0.28/temp
  java_command: org.apache.catalina.startup.Bootstrap stop
  java_class_path (initial): /home/my/path/project/apache-tomcat-8.0.28/bin/bootstrap.jar:/home/my/path/project/apache-tomcat-8.0.28/bin/tomcat-juli.jar
  Launcher Type: SUN_STANDARD
  </code></pre>
  
  <p>I looks that does not effect to the web service. Is it OK to ignore?</p>
  
  <p>How can I handle this error properly?</p>
  
  <p>FYI,</p>
  
  <ul>
  <li>tomcat : <code>8.0.28</code></li>
  <li>jdk : <code>OpenJDK.1.8.0_131</code></li>
  <li>OS : <code>GNU/Linux x86_64</code></li>
  </ul>