On Solaris there is a VM operation enqueued to suspend all threads
just prior to exit. This ensures that active threads don't access
unmapped memory during exit().
However if the JNI Invocation API is used (JNI_CreateJavaVM) with
an application specified exit_hook the hook routine is called
without the threads suspended. If the application attempts an
exit (likely behaviour in the hook routine) then it's possible
for threads to continue in parallel with the exit routine.
- relates to
-
JDK-4378695 hotspot with JNI crashes after exit hook
-
- Closed
-