GNOME Bugzilla – Bug 561789
[volume] deadlocks with a controller attached
Last modified: 2008-11-24 12:03:10 UTC
Since this change: http://webcvs.freedesktop.org/gstreamer/gst-plugins-base/gst/volume/gstvolume.c?r1=1.101&r2=1.102 attaching a controller to a volume element has resulted in a streaming thread deadlocking.
Created attachment 123164 [details] horrible example program
And here's a stack trace: (gdb) i th 2 Thread 0xb73bdb90 (LWP 19256) 0xb7fdb424 in __kernel_vsyscall () 1 Thread 0xb7e1b8c0 (LWP 19254) 0xb7fdb424 in __kernel_vsyscall () (gdb) t 2 [Switching to thread 2 (Thread 0xb73bdb90 (LWP 19256))]#0 0xb7fdb424 in __kernel_vsyscall () (gdb) bt
+ Trace 210074
What appears to be happening is that the base transform lock is acquired in frame 10 (before calling gst_base_transform_handle_buffer) and frame 4 is trying to acquire it again.
Created attachment 123172 [details] [review] testcase for tests/check/elements/volume.c
hmm, that is strange. I use dozen controllers in buzztard and have never got bitten by that one. We could GST_BASE_TRANSFORM_UNLOCK (this); gst_object_sync_values (G_OBJECT (this), timestamp); GST_BASE_TRANSFORM_LOCK (this); but thats quite a hack.
I broke this recently. We should not release an unfixed 0.10.22.
* gst/volume/gstvolume.c: (volume_choose_func), (volume_update_volume), (gst_volume_set_volume), (gst_volume_get_volume), (gst_volume_set_mute), (gst_volume_class_init), (gst_volume_init), (volume_process_double), (volume_process_float), (volume_process_int32), (volume_process_int32_clamp), (volume_process_int24), (volume_process_int24_clamp), (volume_process_int16), (volume_process_int16_clamp), (volume_process_int8), (volume_process_int8_clamp), (volume_setup), (volume_transform_ip), (volume_set_property), (volume_get_property): * gst/volume/gstvolume.h: Cleanup volume, define and use default values. Recalculate new volume and mute setup before processing. Fixes #561789. * tests/check/elements/volume.c: (GST_START_TEST), (volume_suite): Add controller unit test. Patch by: Jonathan Matthew Fix bogus test that messed with basetransform's internal state.