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 695822 - Deadly embrace lock encountered while using GStreamer from Phonon
Deadly embrace lock encountered while using GStreamer from Phonon
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-14 08:06 UTC by Philip Van Hoof
Modified: 2013-06-09 18:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Van Hoof 2013-03-14 08:06:21 UTC
Code leading to the problem

void MediaItem::someInit(someparams)
{
  m_proxy = new QGraphicsProxyWidget(this);
  QWidget *w = new QWidget;
  QHBoxLayout *l = new QHBoxLayout;
  w->setLayout(l);

  m_mediaObject = new Phonon::MediaObject(m_proxy);
  m_videoWidget = new Phonon::VideoWidget(w);
  m_audioOutput = new Phonon::AudioOutput(m_proxy);
  Phonon::createPath(m_mediaObject, m_videoWidget);
  Phonon::createPath(m_mediaObject, m_audioOutput);

  l->addWidget(m_videoWidget);
  m_videoWidget->show();
  m_proxy->setWidget(w);

  connect(m_mediaObject, SIGNAL(aboutToFinish()), this, SLOT(slotEnqueue()));

  m_mediaObject->setCurrentSource(Phonon::MediaSource(m_fileName));
  m_mediaObject->stop();
  m_audioOutput->setMuted( true );
  m_mediaObject->play();
  m_mediaObject->seek(2000);
  m_mediaObject->pause();
  m_audioOutput->setMuted( false );

}

void MediaItem::slotEnqueue()
{
    if (m_loop) {
        m_mediaObject->enqueue(Phonon::MediaSource(m_fileName));
    }
}

Backtrace of deadly embrace lock in GStreamer's own threads. At this point slotEnqueue and someInit have both happened.

(gdb) thread apply all bt

Thread 19 (Thread 0x9d7ffb70 (LWP 27050))

  • #0 ??
    from /lib/ld-linux.so.2
  • #1 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S line 142
  • #2 _L_lock_819
    from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0
  • #3 __pthread_mutex_lock
    at pthread_mutex_lock.c line 82
  • #4 pthread_mutex_lock
    at forward.c line 182
  • #5 g_rec_mutex_lock
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./glib/gthread-posix.c line 377
  • #6 g_static_rec_mutex_lock
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./glib/deprecated/gthread-deprecated.c line 712
  • #7 gst_play_bin_query
    at gstplaybin2.c line 2199
  • #8 gst_element_query
    at gstelement.c line 1812
  • #9 gst_bin_do_latency_func
    at gstbin.c line 2368
  • #10 gst_marshal_BOOLEAN__VOID
    at gstmarshal.c line 548
  • #11 g_type_class_meta_marshal
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c line 970
  • #12 g_closure_invoke
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c line 777
  • #13 signal_emit_unlocked_R
  • #14 g_signal_emit_valist
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3310
  • #15 g_signal_emit
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3356
  • #16 gst_bin_recalculate_latency
    at gstbin.c line 2347
  • #17 gst_bin_change_state_func
    at gstbin.c line 2451
  • #18 gst_pipeline_change_state
    at gstpipeline.c line 482
  • #19 gst_play_bin_change_state
    at gstplaybin2.c line 3936
  • #20 gst_element_change_state
    at gstelement.c line 2761
  • #21 gst_bin_continue_func
    at gstbin.c line 2766
  • #22 g_thread_pool_thread_proxy
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./glib/gthreadpool.c line 309
  • #23 g_thread_proxy
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./glib/gthread.c line 801
  • #24 start_thread
    at pthread_create.c line 304
  • #25 clone
    at ../sysdeps/unix/sysv/linux/i386/clone.S line 130

Thread 15 (Thread 0x9fd86b70 (LWP 27046))

  • #0 ??
    from /lib/ld-linux.so.2
  • #1 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S line 142
  • #2 _L_lock_819
    from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0
  • #3 __pthread_mutex_lock
    at pthread_mutex_lock.c line 82
  • #4 pthread_mutex_lock
    at forward.c line 182
  • #5 g_rec_mutex_lock
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./glib/gthread-posix.c line 377
  • #6 g_static_rec_mutex_lock
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./glib/deprecated/gthread-deprecated.c line 712
  • #7 post_activate
    at gstpad.c line 660
  • #8 post_activate
    at gstpad.c line 653
  • #9 gst_pad_activate_push
    at gstpad.c line 963
  • #10 gst_pad_set_active
    at gstpad.c line 718
  • #11 gst_play_sink_release_pad
    at gstplaysink.c line 3278
  • #12 deactivate_group
    at gstplaybin2.c line 3713
  • #13 setup_next_source
    at gstplaybin2.c line 3803
  • #14 g_cclosure_marshal_VOID__VOIDv
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gmarshal.c line 115
  • #15 _g_closure_invoke_va
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c line 840
  • #16 g_signal_emit_valist
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3211
  • #17 g_signal_emit
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3356
  • #18 proxy_drained_signal
    at gsturidecodebin.c line 1610
  • #19 g_cclosure_marshal_VOID__VOIDv
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gmarshal.c line 115
  • #20 _g_closure_invoke_va
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c line 840
  • #21 g_signal_emit_valist
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3211
  • #22 g_signal_emit
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3356
  • #23 drain_and_switch_chains
    at gstdecodebin2.c line 3219
  • #24 drain_and_switch_group
    at gstdecodebin2.c line 3141
  • #25 drain_and_switch_chains
    at gstdecodebin2.c line 3185
  • #26 gst_decode_pad_handle_eos
    at gstdecodebin2.c line 3236
  • #27 source_pad_event_probe
    at gstdecodebin2.c line 3791
  • #28 source_pad_event_probe
    at gstdecodebin2.c line 3775
  • #29 gst_marshal_BOOLEAN__POINTER
  • #30 g_closure_invoke
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c line 777
  • #31 signal_emit_unlocked_R
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3551
  • #32 g_signal_emitv
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c line 3041
  • #33 gst_pad_emit_have_data_signal
    at gstpad.c line 4167
  • #34 gst_pad_push_event
    at gstpad.c line 5262
  • #35 gst_proxy_pad_event_default
    at gstghostpad.c line 132
  • #36 gst_pad_send_event
    at gstpad.c line 5425
  • #37 gst_pad_push_event
    at gstpad.c line 5277
  • #38 gst_ffmpegdec_sink_event
    at gstffmpegdec.c line 2502
  • #39 gst_pad_send_event
    at gstpad.c line 5425
  • #40 gst_pad_push_event
    at gstpad.c line 5277
  • #41 gst_single_queue_push_one
    at gstmultiqueue.c line 1110
  • #42 gst_multi_queue_loop
    at gstmultiqueue.c line 1318
  • #43 gst_task_func
    at gsttask.c line 327
  • #44 default_func
    at gsttaskpool.c line 70
  • #45 g_thread_pool_thread_proxy
    at /build/buildd-glib2.0_2.33.12+really2.32.4-3-i386-Z8T5T2/glib2.0-2.33.12+really2.32.4/./glib/gthreadpool.c line 309
  • #46 g_thread_proxy
  • #47 start_thread
    at pthread_create.c line 304
  • #48 clone
    at ../sysdeps/unix/sysv/linux/i386/clone.S line 130

Comment 1 Tim-Philipp Müller 2013-03-16 12:12:22 UTC
 - could you check if this still happens with 0.10 git ? The stack trace looks familiar, I wonder if it was fixed.

 - could you make a small C program to reproduce it? And try it against 1.x ?

GStreamer 0.10.x is not maintained any longer I'm afraid.
Comment 2 George Kiagiadakis 2013-06-09 16:51:01 UTC
This is not a qt-gstreamer bug, reassigning.
Comment 3 Tim-Philipp Müller 2013-06-09 18:19:27 UTC
Either way, old version and no response in almost 2 months, let's close this.

Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!