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 495133 - videotestsrc pipeline hangs
videotestsrc pipeline hangs
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: dont know
git master
Other Linux
: Normal critical
: 0.10.15
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-08 22:17 UTC by Fredrik Persson
Modified: 2007-11-09 14:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Debug log (466.18 KB, application/octet-stream)
2007-11-08 22:20 UTC, Fredrik Persson
  Details
patch to fix the deadlock (811 bytes, patch)
2007-11-09 12:45 UTC, Wim Taymans
committed Details | Review

Description Fredrik Persson 2007-11-08 22:17:53 UTC
Run this:
gst-launch-0.10 videotestsrc ! tee name=mytee  mytee. ! queue ! ximagesink  mytee. ! queue ! ffmpegcolorspace ! ximagesink

This will display two windows, one of which controls the size of the videotestsrc output when resized. (The other window just follows.) Identify the size-controlling window, grab hold of it with the mouse pointer and quickly resize it by moving the mouse around quickly.

The video will soon hang, and the windows will no longer refresh.
Comment 1 Fredrik Persson 2007-11-08 22:20:30 UTC
Created attachment 98790 [details]
Debug log
Comment 2 Fredrik Persson 2007-11-08 22:21:26 UTC
Comment on attachment 98790 [details]
Debug log

This is the output from running the gst-launch command with GST_DEBUG_NO_COLOR=1 GST_DEBUG=*:5, stopped precisely where the windows have frozen.
Comment 3 Wim Taymans 2007-11-09 12:45:52 UTC
Created attachment 98814 [details] [review]
patch to fix the deadlock

This is a regression caused by adding the last-buffer property. The reason is that the buffer is unreffed while holding the object lock, which can cause the finilizer to deadlock when it wants the object lock too.

The patch makes it so that the lock is released when reffing/unreffing the buffers.
Comment 4 Jan Schmidt 2007-11-09 13:20:26 UTC
Yeah, better put this one in too
Comment 5 Fredrik Persson 2007-11-09 13:38:44 UTC
That patch does seem to fix the problem.
Comment 6 Jan Schmidt 2007-11-09 14:00:54 UTC
It's not fixed-resolved until the patch actually gets committed
Comment 7 Wim Taymans 2007-11-09 14:05:03 UTC
        * libs/gst/base/gstbasesink.c: (gst_base_sink_set_last_buffer):
        Don't hold the object lock when unreffing a buffer because it could
        cause a deadlock when the finalize function wants to grab the object
        lock too. Fixes #495133.