GNOME Bugzilla – Bug 681015
discoverer: deadlock race on video files - typefind + avidemux both in set_state
Last modified: 2013-03-02 23:59:56 UTC
Created attachment 220097 [details] Test script Running gst-discoverer-1.0 on some video files will sometimes deadlock. It can take a while to reproduce, but it's really there (just run it in an endless loop). Using discoverer from C seems to be the hardest way to reproduce (probably why such a bug is there). Jeff wrote a little python script that does the same. It is a bit easier to reproduce with that. Probably because Python. The sure way to reproduce is however with pitivi. The previewer in the file chooser triggers it 100% of the time. When we disabled that, the discoverer run afterwards has maybe a 1 in 20 chance of it *working* (so it will work rarely actually). Use the pygi branch from git://github.com/nekohayo/pitivi.git if needed. BTW, doesn't matter if discoverer runs async or not.
Stack trace of all threads when deadlocked?
Created attachment 220107 [details] Backtrace There are slightly different ways to hang, but this is the most common one with gst-discoverer-1.0.
Actually, I already experienced this problem months ago, except that with static bindings it was much more rare: bug #669826. René suspects that the callback for registry::feature-added in gobject introspection slows it down enough to trigger the bug 90% of the time. With pygst, this was probably a bit faster to execute and the race was thus less likely to occur.
This race almost seems like a "phase of the moon" bug. I hit that deadlock continously for three days while investigating it with René, then the week-end after that I was unable to reproduce it, then during the week I was able to experience it again sometimes, then didn't see signs of it until yesterday... Yesterday, I updated and recompiled all my gstreamer 1.0 checkouts after Wim reported bug #681535 as fixed. As soon as I did that, I now had a segfault everytime the discoverer was involved (when trying to import clips, or preview them in the import dialog, or load a project). I thought I'd get a backtrace this morning, but today I'm again unable to reproduce it (even outside gdb). Urgh.
I guess this is a duplicate of bug #690420 which Tim-Philipp Müller is making progress on.
I'm not 100% sure, as I recall seeing such lockups -- that were probably due to the discoverer -- prior to pitivi switching to gstreamer 1.x and gobject introspection. I may be wrong though, and at this point, on my side, we're not switching "back" to 0.10.
Judging by the stack trace, it's the same issue. Please re-open if you still get this with git master, and provide a new stack trace then. *** This bug has been marked as a duplicate of bug 690420 ***
*** Bug 669826 has been marked as a duplicate of this bug. ***