WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
96105
[GTK] calling webkitInit() from class_init() functions can cause deadlocks
https://bugs.webkit.org/show_bug.cgi?id=96105
Summary
[GTK] calling webkitInit() from class_init() functions can cause deadlocks
Dan Winship
Reported
2012-09-07 07:25:11 PDT
See, eg,
https://bugzilla.gnome.org/page.cgi?id=trace.html&trace_id=230816
from
https://bugzilla.gnome.org/show_bug.cgi?id=683548
. This is caused because webkit_web_view_class_init() calls webkitInit(), and webkitInit() creates objects, which (apparently) you aren't supposed to do from inside a class_init() function. In particular, gtype's class_init_rec_mutex is held during the class_init function, and so if you do things in your class_init that might grab other mutexes, then there's the possibility that another thread might grab those mutexes in the other order and deadlock. (In that stack trace, webkit_web_view_class_init() calls webkitInit(), which creates the default session, which ends up trying to grab default_modules_lock so it can load the default GProxyResolver plugin, but meanwhile another thread is loading the GTlsBackend plugin, which then tries to register classes...) It's possible that class_init_rec_mutex might go away at some point (bgo 674885), but for now, it's there, and deadlocks can happen as a result. I didn't look at webkitInit() in detail, but if you could call it from instance init functions instead of class init functions, that would fix things.
Attachments
Add attachment
proposed patch, testcase, etc.
Martin Robinson
Comment 1
2014-04-08 19:01:42 PDT
The GTK+ port of WebKit1 has been removed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug