Bug 125651 - [GTK] [Stable] deadlock in gobject introspection
Summary: [GTK] [Stable] deadlock in gobject introspection
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-12 13:33 PST by Pacho Ramos
Modified: 2014-06-05 09:33 PDT (History)
6 users (show)

See Also:


Attachments
patch (3.98 KB, patch)
2013-12-12 13:34 PST, Pacho Ramos
no flags Details | Formatted Diff | Diff
Patch (3.38 KB, patch)
2014-03-12 02:22 PDT, Carlos Garcia Campos
svillar: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos 2013-12-12 13:33:48 PST
As reported in:
https://bugs.gentoo.org/show_bug.cgi?id=463960

and:
http://osdyson.org/issues/161

Compilation can hand in some situations when building gobject-introspection, the following patch looks to fix it:
http://cgit.osdyson.org/pkg-webkit/webkit.git/plain/debian/patches/dyson-g-ir-scanner-hangs.patch?h=unstable&id=ae705bbaacd20cab2414bbdcf2f394d2ac6a7c4e
Comment 1 Pacho Ramos 2013-12-12 13:34:23 PST
Created attachment 219115 [details]
patch
Comment 2 Pacho Ramos 2014-02-08 03:24:13 PST
People is still suffering this in 2.2.4 :(
Comment 3 Carlos Garcia Campos 2014-03-12 02:14:49 PDT
Comment on attachment 219115 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=219115&action=review

> webkit/Source/WebKit/gtk/webkit/webkitglobals.cpp:573
> +    // http://osdyson.org/issues/161
> +    // WebKitGTK FTBFS when building GObject introspection due to deadlock.
> +    // When gobject introspection is done, a simple program call exit()
> +    // exit() -> webkitExit() -> g_object_unref() -> webkit_get_default_session()
> +    // -> ResourceHandle::defaultSession() => default session doesn't exist! AND
> +    // we try to create it! Thus deadlock. So, create default session earlier:
> +    (void) webkit_get_default_session();

I think we should never create the network session if it's not needed
Comment 4 Carlos Garcia Campos 2014-03-12 02:22:05 PDT
Created attachment 226485 [details]
Patch

I think this is a better solution. In the case of g-i the default session won't even be created. This also ensures that the soup session is also properly finalized in WebKit2.
Comment 5 Sergio Villar Senin 2014-03-12 04:57:54 PDT
Comment on attachment 226485 [details]
Patch

r=me. The cache wouldn't be properly shutdown also without the finalize() call.
Comment 6 Carlos Garcia Campos 2014-03-12 07:02:05 PDT
Committed r165467: <http://trac.webkit.org/changeset/165467>
Comment 7 Pacho Ramos 2014-06-05 09:33:41 PDT
(In reply to comment #6)
> Committed r165467: <http://trac.webkit.org/changeset/165467>

Wasn't this included in 2.4.x?