After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 702167 - matroskademux: missing mutex unlock leading to wrong STREAM_LOCK count
matroskademux: missing mutex unlock leading to wrong STREAM_LOCK count
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.36
Other Linux
: Normal normal
: 1.0.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-13 11:09 UTC by Bruno Gonzalez (stenyak)
Modified: 2013-06-14 12:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix missing lock of a recursive mutex (481 bytes, patch)
2013-06-13 11:10 UTC, Bruno Gonzalez (stenyak)
committed Details | Review

Description Bruno Gonzalez (stenyak) 2013-06-13 11:09:55 UTC
There seems to be a bug in matroska-demux.c. It happens rarely, when seeking.

The problem is that the common.sinkpad may be unlocked without having been locked first.

This eventually leads to a negative depth of the recursive mutex, which in turn leads to the dreaded "GStreamer-WARNING **: wrong STREAM_LOCK count" message.


I'm working on gstreamer 0.10, but the bug seems to also be present in latest matroskamux versions. To test it, start a pipeline, and seek randomly in an infinite loop. After a few seconds (no more than 1000 seeks later, at least in my tests), the bugged code branch will happen to be executed, and a deadlock ensues somewhere else.


The attached patch fixes this problem in my case.
Comment 1 Bruno Gonzalez (stenyak) 2013-06-13 11:10:47 UTC
Created attachment 246713 [details] [review]
Fix missing lock of a recursive mutex
Comment 2 Sebastian Dröge (slomo) 2013-06-14 12:10:57 UTC
commit e89a48616bbd030e520d4f22a2a919b3d3dba355
Author: Bruno Gonzalez <stenyak@gmail.com>
Date:   Fri Jun 14 14:09:50 2013 +0200

    matroskademux: Don't unlock stream lock without locking it first
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702167