Bug 36209 - [Gtk+] Deadlock in GStreamer on MediaPlayer destruction.
Summary: [Gtk+] Deadlock in GStreamer on MediaPlayer destruction.
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2010-03-16 23:59 PDT by Holger Freyther
Modified: 2014-03-04 23:54 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Freyther 2010-03-16 23:59:44 PDT
This sometimes happens on test=178 of iexploder 1.5 but is not always reproducable. I'm testing it on a recent Ubuntu 10.04 installation.


(gdb) bt
#0  0xb772c430 in __kernel_vsyscall ()
#1  0xb603baf9 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
#2  0xb603713b in _L_lock_753 () from /lib/tls/i686/cmov/libpthread.so.0
#3  0xb6036f61 in __pthread_mutex_lock (mutex=0x8f64b24) at pthread_mutex_lock.c:61
#4  0xb60ae89e in IA__g_static_rec_mutex_lock (mutex=0x8f64b20) at /build/buildd/glib2.0-2.23.5/glib/gthread.c:1420
#5  0xb5d89ea8 in post_activate (pad=0x900e650, new_mode=150358820) at gstpad.c:628
#6  0xb5d940ba in gst_pad_activate_push (pad=0x900e650, active=0) at gstpad.c:930
#7  0xb5d94d98 in gst_pad_set_active (pad=0x900e650, active=0) at gstpad.c:686
#8  0xb5d7315b in activate_pads (pad=0x900e650, ret=0xbf90a56c, active=0xbf90a5cc) at gstelement.c:2632
#9  0xb5d859f7 in gst_iterator_fold (it=0x9361390, func=0xb5d73130 <activate_pads>, ret=0xbf90a56c, user_data=0xbf90a5cc) at gstiterator.c:545
#10 0xb5d7308f in iterator_activate_fold_with_resync (iter=0x9361390, func=<value optimized out>, user_data=0xbf90a5cc) at gstelement.c:2664
#11 0xb5d756f8 in gst_element_pads_activate (element=0x902ecd8, active=0) at gstelement.c:2709
#12 0xb5d77c19 in gst_element_change_state_func (element=0x902ecd8, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstelement.c:2790
#13 0xaffcda83 in gst_gdk_pixbuf_change_state (element=0x902ecd8, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstgdkpixbuf.c:463
#14 0xb5d74435 in gst_element_change_state (element=0x902ecd8, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstelement.c:2548
#15 0xb5d77928 in gst_element_set_state_func (element=0x902ecd8, state=GST_STATE_READY) at gstelement.c:2504
#16 0xb5d737f0 in gst_element_set_state (element=0x902ecd8, state=GST_STATE_READY) at gstelement.c:2405
#17 0xb5d63827 in gst_bin_element_set_state (element=0x8fc3178, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstbin.c:2118
#18 gst_bin_change_state_func (element=0x8fc3178, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstbin.c:2417
#19 0xb17e9754 in gst_decode_bin_change_state (element=0x8fc3178, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstdecodebin2.c:3384
#20 0xb5d74435 in gst_element_change_state (element=0x8fc3178, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstelement.c:2548
#21 0xb5d77928 in gst_element_set_state_func (element=0x8fc3178, state=GST_STATE_READY) at gstelement.c:2504
#22 0xb5d737f0 in gst_element_set_state (element=0x8fc3178, state=GST_STATE_READY) at gstelement.c:2405
#23 0xb5d63827 in gst_bin_element_set_state (element=0x9147000, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstbin.c:2118
#24 gst_bin_change_state_func (element=0x9147000, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstbin.c:2417
#25 0xb17f0fca in gst_uri_decode_bin_change_state (element=0x9147000, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gsturidecodebin.c:2154
#26 0xb5d74435 in gst_element_change_state (element=0x9147000, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstelement.c:2548
#27 0xb5d77928 in gst_element_set_state_func (element=0x9147000, state=GST_STATE_READY) at gstelement.c:2504
#28 0xb5d737f0 in gst_element_set_state (element=0x9147000, state=GST_STATE_READY) at gstelement.c:2405
#29 0xb5d63827 in gst_bin_element_set_state (element=0x929e800, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstbin.c:2118
#30 gst_bin_change_state_func (element=0x929e800, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstbin.c:2417
#31 0xb5d97df2 in gst_pipeline_change_state (element=0x929e800, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstpipeline.c:477
#32 0xb11875ba in gst_play_bin_change_state (element=0x929e800, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstplaybin2.c:3575
#33 0xb5d74435 in gst_element_change_state (element=0x929e800, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstelement.c:2548
#34 0xb5d77928 in gst_element_set_state_func (element=0x929e800, state=GST_STATE_NULL) at gstelement.c:2504
#35 0xb5d737f0 in gst_element_set_state (element=0x929e800, state=GST_STATE_NULL) at gstelement.c:2405
#36 0xb70ba303 in WebCore::MediaPlayerPrivate::~MediaPlayerPrivate() ()
   from /home/ich/source/apple/WebKit-tt.git/WebKitBuild/Release/.libs/libwebkit-1.0.so.2
#37 0xb6f47c01 in WebCore::MediaPlayer::~MediaPlayer() () from /home/ich/source/apple/WebKit-tt.git/WebKitBuild/Release/.libs/libwebkit-1.0.so.2
#38 0xb6f411ac in WebCore::HTMLMediaElement::userCancelledLoad() ()
Comment 1 Philippe Normand 2011-01-03 07:33:10 PST
I've just tried with iExploder 1.7.2 and couldn't reproduce this issue. Trying to run from test 170 various times, test 178 doesn't fail and the suite keeps running
Comment 2 Holger Freyther 2011-04-11 13:44:19 PDT
(In reply to comment #1)
> I've just tried with iExploder 1.7.2 and couldn't reproduce this issue. Trying to run from test 170 various times, test 178 doesn't fail and the suite keeps running

If we change some properties test numbers will change too. My current test case to show a deadlock (a bit different here) is opening http://www.youtube.com/watch?v=JzIWdJVP-wo&feature=relmfu and then trying to seek. It deadlocks somewhere due the mkv container handling.

This is a Fedora F14 machine with rpmfusion repos. Is there an easy way for gst-inspect to list all plugin versions?
Comment 3 Philippe Normand 2011-04-11 13:52:55 PDT
(In reply to comment #2)
> (In reply to comment #1)
> > I've just tried with iExploder 1.7.2 and couldn't reproduce this issue. Trying to run from test 170 various times, test 178 doesn't fail and the suite keeps running
> 
> If we change some properties test numbers will change too. My current test case to show a deadlock (a bit different here) is opening http://www.youtube.com/watch?v=JzIWdJVP-wo&feature=relmfu and then trying to seek. It deadlocks somewhere due the mkv container handling.
> 
> This is a Fedora F14 machine with rpmfusion repos. Is there an easy way for gst-inspect to list all plugin versions?

Not without shell scripting.
But with some rpm command line you could get the list of packages/versions containing "gst" for instance. No idea what that command would be, I use Debian :)
Comment 4 Holger Freyther 2011-04-11 14:02:04 PDT
(In reply to comment #3)

> Not without shell scripting.
> But with some rpm command line you could get the list of packages/versions containing "gst" for instance. No idea what that command would be, I use Debian :)

Is it deadlocking for you too or not yet? The fundamental problem here is that GStreamer will happily block the main thread. In my mkv case it will wait for a condition that never happens. Do you have contact with upstream developers? Do you know if the topic of 'timeouts' ever came up?


gstreamer-plugins-ugly-0.10.16-2.fc14.i686
gstreamer-ffmpeg-0.10.11-1.fc14.i686
gstreamer-plugins-bad-0.10.20-2.fc14.i686
gstreamer-plugins-good-0.10.26-1.fc14.i686
gstreamer-plugins-good-devel-docs-0.10.26-1.fc14.noarch
gstreamer-tools-0.10.31-1.fc14.i686
gstreamer-python-0.10.19-1.fc14.i686
gstreamer-plugins-bad-free-devel-0.10.20-3.fc14.1.i686
gstreamer-plugins-base-0.10.31-1.fc14.i686
gstreamer-plugins-base-debuginfo-0.10.31-1.fc14.i686
gstreamer-plugins-bad-free-0.10.20-3.fc14.1.i686
gstreamer-plugins-base-devel-0.10.31-1.fc14.i686
gstreamer-plugins-bad-free-extras-0.10.20-3.fc14.1.i686
gstreamer-devel-0.10.31-1.fc14.i686
gstreamer-debuginfo-0.10.31-1.fc14.i686
gstreamer-rtsp-0.10.5-2.fc14.i686
gstreamer-0.10.31-1.fc14.i686
Comment 5 Philippe Normand 2011-04-11 14:27:08 PDT
(In reply to comment #4)
> (In reply to comment #3)
> 
> > Not without shell scripting.
> > But with some rpm command line you could get the list of packages/versions containing "gst" for instance. No idea what that command would be, I use Debian :)
> 
> Is it deadlocking for you too or not yet?

Nope. I use gstreamer git though.

>The fundamental problem here is that GStreamer will happily block the main thread. In my mkv case it will wait for a condition that never happens. Do you have contact with upstream developers? Do you know if the topic of 'timeouts' ever came up?
> 
> 
> gstreamer-plugins-ugly-0.10.16-2.fc14.i686
> gstreamer-ffmpeg-0.10.11-1.fc14.i686
> gstreamer-plugins-bad-0.10.20-2.fc14.i686
> gstreamer-plugins-good-0.10.26-1.fc14.i686
> gstreamer-plugins-good-devel-docs-0.10.26-1.fc14.noarch
> gstreamer-tools-0.10.31-1.fc14.i686
> gstreamer-python-0.10.19-1.fc14.i686
> gstreamer-plugins-bad-free-devel-0.10.20-3.fc14.1.i686
> gstreamer-plugins-base-0.10.31-1.fc14.i686
> gstreamer-plugins-base-debuginfo-0.10.31-1.fc14.i686
> gstreamer-plugins-bad-free-0.10.20-3.fc14.1.i686
> gstreamer-plugins-base-devel-0.10.31-1.fc14.i686
> gstreamer-plugins-bad-free-extras-0.10.20-3.fc14.1.i686
> gstreamer-devel-0.10.31-1.fc14.i686
> gstreamer-debuginfo-0.10.31-1.fc14.i686
> gstreamer-rtsp-0.10.5-2.fc14.i686
> gstreamer-0.10.31-1.fc14.i686

Well, first thing would be to try latest releases. Your versions are not so old but I can see some fixes of matroskademux in gst-plugins-good 0.10.27:

http://gstreamer.freedesktop.org/releases/gst-plugins-good/0.10.27.html

Updating gst -core and plugins-base would also be good.

If you can still reproduce the deadlock then you should file a bugreport to gstreamer's bugzilla. The #gstreamer@freenode IRC channel is also quite active.

Having a deadlock during a seek is indeed not very nice. Can you reproduce that issue with local mkv files in Totem for instance?
Comment 6 Martin Robinson 2011-06-21 16:16:58 PDT
I just saw this on natty with the stable branch.
Comment 7 Philippe Normand 2014-03-04 23:54:56 PST
(In reply to comment #2)
> (In reply to comment #1)
> > I've just tried with iExploder 1.7.2 and couldn't reproduce this issue. Trying to run from test 170 various times, test 178 doesn't fail and the suite keeps running
> 
> If we change some properties test numbers will change too. My current test case to show a deadlock (a bit different here) is opening http://www.youtube.com/watch?v=JzIWdJVP-wo&feature=relmfu and then trying to seek. It deadlocks somewhere due the mkv container handling.
> 

Works fine with GStreamer 1.2.1 here. Please reopen if you manage to still reproduce this bug!