Bug 398548

Summary: GObject class init not thread-safe ...
Product: [openSUSE] openSUSE 11.0 Reporter: Michael Meeks <mmeeks>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None CC: captain.magnus, federico
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: patch

Description Michael Meeks 2008-06-09 14:16:30 UTC
Soo ... this has been like this for a long time it seems; since 2001 - but recently, with more threadiness we've seen more issues with it.

we should include the up-stream fix for this:

2008-02-05 18:52:07  Tim Janik  <timj@imendio.com>

        * gtype.c: added recursive mutex to protect class initialization,
        default interface initialization and per-class interface construction.
        a lock to this recursive mutex is held during user callback invocations
        such as initializers or finalizers, effectively allowing only one thread
        to run class/interface initializers/finalizers at a time.
        also made misc fixups. this fixes:
        Bug 64764 - Class initialization isn't thread safe.

which I will attach.
Comment 1 Michael Meeks 2008-06-09 14:16:56 UTC
Created attachment 221032 [details]
patch
Comment 2 Michael Meeks 2008-06-09 14:17:24 UTC
*** Bug 385128 has been marked as a duplicate of this bug. ***
Comment 3 Michael Meeks 2008-06-09 14:22:12 UTC
Extracted from up-stream master bug:
    http://bugzilla.gnome.org/show_bug.cgi?id=64764

bug 396848 - firefox / file-selector crash (?) related to this: various threads like to create GIconTheme structures concurrently - I see several of these each day on a dual CPU machine (on the console / .xsession-errors - usually just fairly benign warnings to be far )

Up-stream duplicates include an evolution-data-server crasher:
    http://bugzilla.gnome.org/show_bug.cgi?id=515802

and a libgsf crasher too. Of course, the patch is not completely trivial and comes from the unstable glib branch, I guess it needs some heavy petting before we're happy with it: perhaps a post 11.0 update (?).
Comment 4 Federico Mena Quintero 2008-06-10 09:56:30 UTC
Michael, did you test a package with this patch to see if the Firefox problem is fixed?  Or should I build a test package for general consumption?
Comment 5 Federico Mena Quintero 2008-06-10 09:58:15 UTC
Errrr, that patch went into glib 2.15.5, and we ship glib 2.16.3 with openSUSE 11 --- so the patch is in.
Comment 6 Michael Meeks 2008-06-10 10:34:30 UTC
great ! :-) so we have a new bug then - nice;
Let me go & read my trace more carefully ...
Comment 7 Michael Meeks 2008-06-10 10:48:54 UTC
invalid bug; closing & re-opening the original issue & re-titling that.