GNOME Bugzilla – Bug 495133
videotestsrc pipeline hangs
Last modified: 2007-11-09 14:05:03 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.
Created attachment 98790 [details] Debug log
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.
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.
Yeah, better put this one in too
That patch does seem to fix the problem.
It's not fixed-resolved until the patch actually gets committed
* 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.