1 Reply Latest reply on Oct 10, 2017 9:40 PM by Poonam-Oracle

    Reason for JVM not terminating after OutOfMemoryError ?

    Nilesh Akhade

      I left running LoadClasses from Lab2,  for couple of hours. Then OutOfMemoryError was thrown and JVM was not terminating even after pressing Ctrl+C. I would like to know the reason due to which JVM was not terminating and the reason for this OOM situation.

       

      E:\projects\jvm_troubleshotting_mooc\Lab2_Files>java -XX:MaxMetaspaceSize=20m LoadClasses

      Exception in thread "RMI TCP Connection(idle)"

      Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "RMI TCP Connection(idle)"

      Exception in thread "RMI TCP Connection(idle)"

      Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "RMI TCP Connection(idle)"

      Java HotSpot(TM) 64-Bit Server VM warning: Exception java.lang.OutOfMemoryError occurred dispatching signal UNKNOWN to handler- the VM may need to be forcibly terminated

      Java HotSpot(TM) 64-Bit Server VM warning: Exception java.lang.OutOfMemoryError occurred dispatching signal UNKNOWN to handler- the VM may need to be forcibly terminated

        • 1. Re: Reason for JVM not terminating after OutOfMemoryError ?
          Poonam-Oracle

          Hello,

           

          The message "Java HotSpot(TM) 64-Bit Server VM warning: Exception java.lang.OutOfMemoryError occurred dispatching signal UNKNOWN to handler- the VM may need to be forcibly terminated" is getting printed by the JVM's native signal handling code. The signal handler itself encountered OOM while making a Java up-call and that's why the JVM didn't get terminated with ctrl+c.

           

          You can see -XX+PrintGCDetails to see the usage details of all the memory pools to see which mem pool is running out of memory.

           

          Thanks,

          Poonam