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 676679 - Fix random deadlock/timeout
Fix random deadlock/timeout
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-05-23 18:13 UTC by Alexander Larsson
Modified: 2016-03-31 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Avoid deadlock during startup (2.39 KB, patch)
2012-05-23 18:17 UTC, Alexander Larsson
accepted-commit_now Details | Review

Description Alexander Larsson 2012-05-23 18:13:41 UTC
UnattendedInstaller calls Bus.get_proxy_sync in the class constructor. This can cause deadlocks, because it is called with the class_init recursive mutex held, and the sync dbus call is run by another thread that may create gobjects which will cause a deadlock when it also needs the class_init mutex.
Comment 1 Alexander Larsson 2012-05-23 18:17:26 UTC
Created attachment 214805 [details] [review]
Avoid deadlock during startup

UnattendedInstaller was doing a sync dbus call in the class
initializer. This is a no-no in GObject because the class initializer
is called with a recursive lock held, and the dbus call will wait
for the dbus thread to reply, but the dbus thread may create a
GObject and thus need the class_init lock, which causes a deadlock.
Comment 2 Marc-Andre Lureau 2012-05-23 18:40:12 UTC
Review of attachment 214805 [details] [review]:

ack