GNOME Bugzilla – Bug 554460
thumbnailer crash in gst_fake_sink_event() on FLUSH_START event
Last modified: 2009-05-31 19:11:03 UTC
this report has been filed here: https://bugs.edge.launchpad.net/ubuntu/+source/gstreamer0.10/+bug/275168 ".
+ Trace 207573
Not sure what to make of this. So it apparently crashes in gst_fake_sink_event() when getting an out-of-band FLUSH_START event. However, the locking in that function looks ok at first glance, and I'm not exactly sure what line number the crash happens in (see line 371 in http://cgit.freedesktop.org/gstreamer/gstreamer/tree/plugins/elements/gstfakesink.c?id=RELEASE-0_10_21 - this really is ubuntu 8.10, right? And the version of package libgstreamer0.10-0 is 0.10.21, right?). There are known issues with calling g_object_notify() from multiple threads on the same object, but I think those should have caused an assert and not a crash.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!
Actually, this seems to be just another variant of the infamous GObject-notify-is-not-thread-safe bug. There's a patch [1], but it seems like getting GObject patches reviewed is hard these days ... In any case, this can easily be reproduced using the attached unit test. Crash is here: gdb) bt
+ Trace 215776
As ugly as it may be, I think we should just hack around this particular bug in fakesink until this gets fixed in GLib. [1] http://bugzilla.gnome.org/show_bug.cgi?id=166020#c61
Created attachment 135656 [details] [review] hack around g_object_notify() crasher bug by taking the STREAM_LOCK for out of band events in gst_fake_sink_event()
Solved this slightly differently without touching basesink: instead of the stream lock, just have a common lock for all g_object_notify() per instance (let's hope the bug is not per class - if it is, then it's much harder to run into that at least). commit 7e4b164c125926784805446482151e4e7bfffe96 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Sat May 30 20:36:25 2009 +0100 fakesink: hack around crasher bug in g_object_notify() for out-of-band events GObject may crash if two threads do concurrent g_object_notify() on the same object. This may happen if fakesink receives an out-of-band event such as FLUSH_START while processing a buffer or serialised event in the streaming thread. Since this may happen with the default settings during a common operation like a seek, and there seems to be little chance of a timely fix in GObject (see #166020), we should hack around this issue by protecting all of fakesink's direct g_object_notify() calls with a lock. Also add unit test for the above. Fixes #554460.