GNOME Bugzilla – Bug 775947
JAW thread should be marked as daemon
Last modified: 2019-05-01 22:30:43 UTC
Created attachment 341738 [details] [review] proposed fix Hello, We have gotten reports that some Java applications do not properly terminate when JAW is enabled. The JVM is stuck here:
+ Trace 236965
which is while (Threads::number_of_non_daemon_threads() > 1 ) Threads_lock->wait(!Mutex::_no_safepoint_check_flag, 0, Mutex::_as_suspend_equivalent_flag); What happens is that to attach the JAW thread to the JVM, AttachCurrentThread is used, and thus is counted as a thread to be waited for at JVM termination. AttachCurrentThreadAsDaemon should be used instead, see attached proposed patch. Samuel
Fixed by 0b843c80e83e08aacb8b27711823553f6600da2c ("Make jaw thread a daemon thread")