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 167593 - new opt locking deadlock
new opt locking deadlock
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal major
: 0.8.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-02-16 13:16 UTC by Ronald Bultje
Modified: 2005-11-10 10:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ronald Bultje 2005-02-16 13:16:10 UTC
Here's a testcase that may result in a deadlock (happens when playing live
ogg/theora streams using totem):

create a mainbin which outputs data (fakesrc ! queue), have an output thread ({
fakesink }), run the mainbin, add the thread to the bin, set to playing and only
then link queue to fakesink (all in mainbin context). Inside
gstoptimalscheduler.c:2128, it will hang on the lock. The thread iterates, tries
to get data but since it's not linked yet, it will fail to do so:

LOG   (0xa347730 - 307931:51:17.236616000)       scheduler(20745)
gstoptimalscheduler.c(1271):gst_opt_scheduler_schedule_run_queue:<GstOptScheduler@0xa33a798>
scheduling group 0xa346690
INFO  (0xa347730 - 307931:51:17.236736000)       scheduler(20745)
gstoptimalscheduler.c(1183):schedule_group: not scheduling group 0xa346690
without entry
LOG   (0xa347730 - 307931:51:17.236839000)       scheduler(20745)
gstoptimalscheduler.c(1284):gst_opt_scheduler_schedule_run_queue:<GstOptScheduler@0xa33a798>
done scheduling group 0xa346690

During this, apparently the lock is held in some way, because the other thread
will hang after this log message (easily traceable by searching for the
thread-ID in the logfile):

INFO  (0xa2dce10 - 307931:51:17.234590000)       scheduler(20745)
gstoptimalscheduler.c(2123):gst_opt_scheduler_pad_link: scheduling link between
preroll_audio_src0:src and aconv:sink

Here's a partial backtrace:

  • #0 _dl_sysinfo_int80
    from /lib/ld-linux.so.2
  • #1 __lll_mutex_lock_wait
    from /lib/tls/libpthread.so.0
  • #2 _L_mutex_lock_29
    from /lib/tls/libpthread.so.0
  • #3 ??
  • #4 ??
  • #5 ??
    from /usr/lib/libglib-2.0.so.0
  • #6 ??
  • #7 g_thread_use_default_impl
    from /usr/lib/libglib-2.0.so.0
  • #8 ??
  • #9 g_static_rec_mutex_lock
    from /usr/lib/libglib-2.0.so.0

Currently still working on valgrinding, since that last line doesn't look too
good, but it does seem to hang in the static mutex in opt. Once valgrind is
complete, I'll try to prepare a testcase to reproduce in lab settings.
Comment 1 Andy Wingo 2005-07-16 10:27:48 UTC
Targeting to 0.8.x. Do you have a testcase?
Comment 2 Christian Fredrik Kalager Schaller 2005-11-10 10:42:29 UTC
The chances of more opt fixing at this point seems slim to me. Closing this bug.