The shutdown hooks race against the shutdown sequence if the thread invoking System.exit() is interrupted. This happens because ApplicationShutdownHooks::runHooks joins the shutdown hooks. This may lead to premature VM shutdown, with shutdown hooks not fully executed.
http://cr.openjdk.java.net/~chegar/8154017/ https://bugs.openjdk.java.net/browse/JDK-8154017 -Chris.