On Fri, 1 Oct 2021 19:19:47 GMT, Sergey Bylokhov <[email protected]> wrote:
> > I can see three non-daemon threads in 'WAITING' state(given below). So > > looks like 'AWT-Shutdown' thread created by AWTAutoShutdown.java is the > > hook which is getting blocked. But I think this is an expected behaviour > > only as it will block this thread until all AWT tasks are complete. > > This issue is unrelated to the non-daemon threads since the System.exit() is > called, it should exit the whole JVM. But before exit it executes some number > of registered ShutdownHook, we need to check what ShutdownHook is executed > and why it hangs. The AWT-Shutdown is not a hook, it is a thread which > prevents vm exit if there are some UI peers, but it does ont prevent the > System.exit(). @mrserb I can see only two shutdown hooks registered, Thread[ToolkitShutdown,6,system] and Thread[ScreenUpdater,6,system]. But I don't know which one of this is getting hanged, any idea how can I check it?. Also if we put a Thread.sleep(100) or just a System.out.println() at the end of the main(), its not hanging and the tests are passing. ------------- PR: https://git.openjdk.java.net/jdk/pull/5777
