After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 775947 - JAW thread should be marked as daemon
JAW thread should be marked as daemon
Status: RESOLVED FIXED
Product: java-atk-wrapper
Classification: Applications
Component: general
0.33.x
Other Linux
: Normal normal
: ---
Assigned To: java-atk-wrapper maintainer(s)
java-atk-wrapper maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-12-11 12:14 UTC by Samuel Thibault
Modified: 2019-05-01 22:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (467 bytes, patch)
2016-12-11 12:14 UTC, Samuel Thibault
none Details | Review

Description Samuel Thibault 2016-12-11 12:14:09 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:


  • #4 Monitor::wait(bool, long, bool)
    at ./src/hotspot/src/share/vm/runtime/mutex.cpp line 1126
  • #5 Threads::destroy_vm()
    at ./src/hotspot/src/share/vm/runtime/thread.cpp line 3989

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
Comment 1 Samuel Thibault 2019-05-01 22:30:43 UTC
Fixed by 0b843c80e83e08aacb8b27711823553f6600da2c ("Make jaw thread a daemon thread")