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 326086 - GStreamer occasionally hangs amaroK at end of song
GStreamer occasionally hangs amaroK at end of song
Status: RESOLVED DUPLICATE of bug 330748
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-07 10:57 UTC by Charles Cosper
Modified: 2006-03-07 09:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Backtrace of all threads. (46.85 KB, text/plain)
2006-01-17 03:10 UTC, Charles Cosper
Details

Description Charles Cosper 2006-01-07 10:57:27 UTC
Steps to reproduce:
amaroK will run for some time with no problem. Then, at the end of a song, it 
will hang. The player and main windows stop updating and do not re-paint when 
they regain focus. Attaching gdb, the backtrace is stalled at the same place in 
the handful of times I have investigated.

Submitted this bug to the amaroK group, they claim it is an issue with 
GStreamer.

Stack trace:
One Thread: 
  • #0 pthread_cond_timedwait
    from /lib/tls/
  • #1 g_cond_timed_wait_posix_impl
    at gthread-posix.c line 229
  • #2 gst_thread_sync
  • #3 gst_thread_change_state
    at gstthread.c line 439
  • #4 gst_element_set_state_func
    at gstelement.c line 2853
  • #5 gst_bin_set_state
    at gstbin.c line 918
  • #6 gst_element_set_state
    at gstelement.c line 2796
  • #7 GstEngine::destroyPipeline
  • #8 GstEngine::endOfStreamReached
    at gstengine. cpp line 693
  • #9 GstEngine::qt_invoke
    at gstengine.moc line 167
  • #10 QObject::activate_signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #11 QSignal::signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #12 QSignal::activate
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #13 QSingleShotTimer::event
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #14 QApplication::internalNotify
    from /usr/lib/qt/lib/libqt-mt.
  • #15 QApplication::notify
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #16 KApplication::notify
    from /opt/kde/lib/libkdecore.so.4
  • #17 QEventLoop::activateTimers
    from /usr/lib/qt/lib/libqt-mt.
  • #18 QEventLoop::processEvents
    from /usr/lib/qt/lib/libqt-mt.so.
  • #19 QEventLoop::enterLoop
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #20 QEventLoop::exec
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #21 QApplication::exec
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #22 main
    at main.cpp line 100
  • #0 poll
    from /lib/tls/libc.so.6
  • #1 server_job
    at pcm_direct.c line 324
  • #2 snd_pcm_direct_server_create
  • #3 snd_pcm_dmix_open
    at pcm_dmix.c line 839
  • #4 _snd_pcm_dmix_open
    at pcm_dmix.c line 1184
  • #5 snd_pcm_open_conf
    at pcm.c line 2070
  • #6 snd_pcm_open_noupdate
    at pcm.c line 2102
  • #7 snd_pcm_open_slave
    at pcm.c line 2186
  • #8 _snd_pcm_plug_open
    at pcm_plug.c line 1140
  • #9 snd_pcm_open_conf
    at pcm.c line 2070
  • #10 snd_pcm_open_noupdate
    at pcm.c line 2102
  • #11 snd_pcm_open
    at pcm.c line 2123
  • #12 gst_alsa_open_audio
    at gstalsa.c line 1378
  • #13 gst_alsa_change_state
    at gstalsa.c line 1142
  • #14 gst_alsa_mixer_change_state
    at gstalsamixer.c line 378
  • #15 gst_alsa_sink_change_state
    at gstalsasink. c line 577
  • #16 gst_element_set_state_func
    at gstelement.c line 2853
  • #17 gst_element_set_state
    at gstelement.c line 2796
  • #18 set_kid_state_func
    at gstbin.c line 806
  • #19 gst_bin_foreach
    at gstbin.c line 770
  • #20 gst_bin_change_state
    at gstbin.c line 868
  • #21 gst_element_set_state_func
    at gstelement.c line 2853
  • #22 gst_bin_set_state
    at gstbin.c line 918
  • #23 gst_element_set_state
    at gstelement.c line 2796
  • #24 GstEngine::createPipeline
  • #25 GstEngine::load
    at gstengine.cpp line 451
  • #26 EngineController::play
    at enginecontroller.cpp line 339
  • #27 Playlist::activate
    at playlist.cpp line 1400
  • #28 Playlist::playNextTrack
    at playlist.cpp line 1002
  • #29 Playlist::qt_invoke
    at playlist.moc line 391
  • #30 QObject::activate_signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #31 QObject::activate_signal_bool
    from /usr/lib/qt/lib/libqt-
  • #32 EngineController::orderNext
    at enginecontroller.moc line 216
  • #33 EngineController::next
    at enginecontroller.cpp line 293
  • #34 EngineController::trackFinished
    at enginecontroller.h line 73
  • #35 EngineController::slotTrackEnded
    at enginecontroller.cpp line 627
  • #36 EngineController::qt_invoke
    at enginecontroller.moc line 253
  • #37 QObject::activate_signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #38 QObject::activate_signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #39 Engine::Base::trackEnded
  • #40 GstEngine::endOfStreamReached
    at gstengine. cpp line 694
  • #41 GstEngine::qt_invoke
    at gstengine.moc line 167
  • #42 QObject::activate_signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #43 QSignal::signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #44 QSignal::activate
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #45 QSingleShotTimer::event
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #46 QApplication::internalNotify
    from /usr/lib/qt/lib/libqt-mt.
  • #47 QApplication::notify
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #48 KApplication::notify
    from /opt/kde/lib/libkdecore.so.4
  • #49 QEventLoop::activateTimers
    from /usr/lib/qt/lib/libqt-mt.
  • #50 QEventLoop::processEvents
    from /usr/lib/qt/lib/libqt-mt.so.
  • #51 QEventLoop::enterLoop
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #52 QEventLoop::exec
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #53 QApplication::exec
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #54 main
    at main.cpp line 100

Other information:
Comment 1 Tim-Philipp Müller 2006-01-07 11:46:05 UTC
Any chance you could try with a more recent GStreamer 0.8.x core version? The current release is 0.8.11.
Comment 2 Charles Cosper 2006-01-07 11:53:37 UTC
I have 0.10.0 installed in addition to 0.8.9, and I originally thought I was using that, but because the pkgconfig name for the plugins changed from gstreamer-plugins-0.8.pc to gstreamer-plugins-base-0.10.pc, and amaroK's configure script wasn't looking for that, I built with the 0.8.9 version.

I'm recompiling amaroK with the 0.10 version to see if the problem still exists...
Comment 3 Charles Cosper 2006-01-07 20:45:13 UTC
Using 0.10.0, the problem still exists. I have a stack trace if it would be helpful, but it looks to be about the same. One thread is in pthread_cond_timedwait, the other is in poll().

I'm going to attempt to use 0.8.11 now.
Comment 4 Andy Wingo 2006-01-12 13:03:38 UTC
I doubt that you have the same problem with 0.10, given that the functions in the backtrace don't exist in 0.10. (Does amarok even have a gst 0.10 backend yet?) I would be inclined to think this is an obsolete bug in the 0.8 scheduler.
Comment 5 Charles Cosper 2006-01-12 13:34:36 UTC
Amarok definitely does claim to have a gst 0.10 backend. The engine dialog allows you to select the 0.10 GStreamer or whatever pre-0.10 GStreamer you happen to have installed. And I definitely see the same behavior when I use the 0.10 engine. But if you don't believe me, I can use the 0.10 backend and post a backtrace of the failure for you when it occurs.
Comment 6 Andy Wingo 2006-01-12 13:59:25 UTC
A backtrace with 0.10 would be good, yes. Nobody really hacks on 0.8 anymore.
Comment 7 Andy Wingo 2006-01-16 15:47:46 UTC
Ping?
Comment 8 Charles Cosper 2006-01-17 01:55:02 UTC
The circumstances of the error seem to be different under 0.10.0.

I allowed amarok to run for about 10 hours straight without the lockup, but yesterday, I saw the lockup upon starting playback just after loading the program. Like a fool, I killed the program without saving the backtrace.  If it happens again, I'll post it. I'll try to induce the failure, but I wouldn't hold my breath.
Comment 9 Charles Cosper 2006-01-17 02:51:06 UTC
I managed to induce the failure. I don't know if it's related to the specific mp3 that was playing or not. Here's the backtrace.

  • #0 pthread_cond_wait
    from /lib/tls/libpthread.so.0
  • #1 g_cond_timed_wait_posix_impl
    at gthread-posix.c line 220
  • #2 gst_element_get_state_func
    at gstelement.c line 1686
  • #3 gst_bin_get_state_func
    at gstbin.c line 1154
  • #4 gst_element_get_state
    at gstelement.c line 1778
  • #5 GstEngine::state
    from /opt/kde/lib/kde3/libamarok_gst10engine_plugin.so
  • #6 EngineController::bundle
    from /opt/kde/lib/libamarok.so.0
  • #7 App::engineStateChanged
    from /opt/kde/lib/libamarok.so.0
  • #8 EngineSubject::stateChangedNotify
    from /opt/kde/lib/libamarok.so.0
  • #9 EngineController::slotStateChanged
    from /opt/kde/lib/libamarok.so.0
  • #10 EngineController::qt_invoke
    from /opt/kde/lib/libamarok.so.0
  • #11 QObject::activate_signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #12 Engine::Base::stateChanged
    from /opt/kde/lib/libamarok.so.0
  • #13 GstEngine::play
    from /opt/kde/lib/kde3/libamarok_gst10engine_plugin.so
  • #14 EngineController::play
    from /opt/kde/lib/libamarok.so.0
  • #15 Playlist::activate
    from /opt/kde/lib/libamarok.so.0
  • #16 Playlist::playNextTrack
    from /opt/kde/lib/libamarok.so.0
  • #17 Playlist::qt_invoke
    from /opt/kde/lib/libamarok.so.0
  • #18 QObject::activate_signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #19 QObject::activate_signal_bool
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #20 EngineController::orderNext
    from /opt/kde/lib/libamarok.so.0
  • #21 EngineController::next
    from /opt/kde/lib/libamarok.so.0
  • #22 EngineController::slotTrackEnded
    from /opt/kde/lib/libamarok.so.0
  • #23 EngineController::qt_invoke
    from /opt/kde/lib/libamarok.so.0
  • #24 QObject::activate_signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #25 QObject::activate_signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #26 Engine::Base::trackEnded
    from /opt/kde/lib/libamarok.so.0
  • #27 GstEngine::endOfStreamReached
    from /opt/kde/lib/kde3/libamarok_gst10engine_plugin.so
  • #28 GstEngine::qt_invoke
    from /opt/kde/lib/kde3/libamarok_gst10engine_plugin.so
  • #29 QObject::activate_signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #30 QSignal::signal
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #31 QSignal::activate
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #32 QSingleShotTimer::event
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #33 QApplication::internalNotify
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #34 QApplication::notify
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #35 KApplication::notify
    from /opt/kde/lib/libkdecore.so.4
  • #36 QEventLoop::activateTimers
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #37 QEventLoop::processEvents
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #38 QEventLoop::enterLoop
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #39 QEventLoop::exec
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #40 QApplication::exec
    from /usr/lib/qt/lib/libqt-mt.so.3
  • #41 main

amarok is running two threads. This one is stalling the whole operation. The other is still running (when I pause it, it's in a poll(), waiting for the other thread?). I haven't killed the program yet (it's not using any CPU cycles), so if there's any other information I can extract that might help, let me know.
Comment 10 David Schleef 2006-01-17 02:58:24 UTC
Backtraces of each thread would be nice.  'thread apply all bt' in gdb.
Comment 11 Charles Cosper 2006-01-17 03:10:08 UTC
Created attachment 57511 [details]
Backtrace of all threads.

The backtrace of each thread, as requested in the comments.
Comment 12 Charles Cosper 2006-01-17 03:11:04 UTC
The stalled process was running 94 threads. Rather than polluting the comments list, I made an attachement.
Comment 13 Andy Wingo 2006-01-17 10:07:11 UTC
(1) The existence of so many threads is almost assuredly an amarok bug. Check especially if amarok is creating clocks without unreffing them properly.

(2) I don't understand the bt -- there are two "thread 1" threads. I'm inclined to believe you entered another command besides thread apply all bt. Is this the case? Otherwise does anyone know why there are two thread 1's ?

(3) If the bt's are correct, this looks like a bug in dmix, but it could be a bug in alsasink. For this reason your feedback is important -- we'd like to catch such a bug sooner rather than later.
Comment 14 Andy Wingo 2006-01-17 11:04:21 UTC
Alternately this could be an instance of bug #326576 -- what kind of hardware do you have?
Comment 15 Charles Cosper 2006-01-17 12:32:53 UTC
2.) The second Thread 1 is the all threads bt from the second process. I added a comment before it, but apparently that was unclear.

Re: hardware: What do you want to know? The sound device is the integrated audio device in the motherboard chipset. lspci reports it as "Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)". 
Comment 16 Charles Cosper 2006-01-21 20:01:47 UTC
Is there anymore information you need me to extract from gdb? Otherwise, I'm going to kill the program now.
Comment 17 Wim Taymans 2006-03-07 09:48:22 UTC
looks like a dup of #330748

*** This bug has been marked as a duplicate of 330748 ***