Bug 83976 - artsd hangs when playing ogg files
Summary: artsd hangs when playing ogg files
Status: RESOLVED FIXED
Alias: None
Product: akodelib
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Stefan Westerfeld
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-25 10:46 UTC by Martin Koller
Modified: 2004-09-05 11:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Koller 2004-06-25 10:46:52 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 3.2.3 
OS:                Linux

Since a few weeks I have the problem that artsd stops when trying to play an ogg file (or probably any kind of sound - I don't know).
The situation is, that I have a kmail filter action to play an ogg file. It works partly, that means: if I receive more mails, I hear the first few sounds playing, but then suddenly artsd hangs (blocks) which leads to a blocking kmail.
As I have this very often (like now) I started gdb attached to artsd and get the following bt:

(gdb) bt
#0  0x4076abf1 in do_sigsuspend () from /lib/libc.so.6
#1  0x4076acb9 in sigsuspend () from /lib/libc.so.6
#2  0x40609278 in __pthread_wait_for_restart_signal () from /lib/libpthread.so.0
#3  0x40606564 in pthread_join () from /lib/libpthread.so.0
#4  0x409eb127 in aKode::FrameToStreamDecoder::halt (this=0x40a73f98) at frametostream_decoder.cpp:114
#5  0x409ea79e in ~StreamToFrameDecoder (this=0x40a741d8) at streamtoframe_decoder.cpp:53
#6  0x409d2cc6 in akodePlayObject_impl::halt (this=0x40a0d580) at akodePlayObject_impl.cpp:214
#7  0x409d304b in akodePlayObject_impl::readFrame (this=0x40a0d580) at akodePlayObject_impl.cpp:268
#8  0x409d3406 in akodePlayObject_impl::calculateBlock (this=0x40a0d580, count=512) at akodePlayObject_impl.cpp:326
#9  0x409d3945 in virtual thunk to akodePlayObject_impl::calculateBlock(unsigned long) () at akodePlayObject_impl.h:40
#10 0x40120958 in Arts::StdScheduleNode::gslProcess () from /opt/kde3/lib/libartsflow.so.1
#11 0x40196895 in master_process_locked_node () from /opt/kde3/lib/libartsflow.so.1
#12 0x40196b40 in master_process_flow () from /opt/kde3/lib/libartsflow.so.1
#13 0x40193df5 in gsl_engine_dispatch () from /opt/kde3/lib/libartsflow.so.1
#14 0x40125f4a in GslMainLoop::run () from /opt/kde3/lib/libartsflow.so.1
#15 0x40121dcc in Arts::StdScheduleNode::requireFlow () from /opt/kde3/lib/libartsflow.so.1
#16 0x4011f729 in Arts::Synth_PLAY_impl::needMore () from /opt/kde3/lib/libartsflow.so.1
#17 0x4011f761 in virtual thunk to Arts::Synth_PLAY_impl::needMore() () from /opt/kde3/lib/libartsflow.so.1
#18 0x401276cc in Arts::AudioSubSystem::handleIO () from /opt/kde3/lib/libartsflow.so.1
#19 0x4011f626 in Arts::Synth_PLAY_impl::notifyIO () from /opt/kde3/lib/libartsflow.so.1
#20 0x4011f6e9 in virtual thunk to Arts::Synth_PLAY_impl::notifyIO(int, int) () from /opt/kde3/lib/libartsflow.so.1
#21 0x40401b72 in Arts::StdIOManager::processOneEvent () from /opt/kde3/lib/libmcop.so.1
#22 0x40401fbb in Arts::StdIOManager::run () from /opt/kde3/lib/libmcop.so.1
#23 0x403ffc88 in Arts::Dispatcher::run () from /opt/kde3/lib/libmcop.so.1
#24 0x08063ee7 in main ()
(gdb) info threads
  5 Thread 65540 (LWP 15452)  0x4076abf1 in do_sigsuspend () from /lib/libc.so.6
  4 Thread 49155 (LWP 15445)  0x4076abf1 in do_sigsuspend () from /lib/libc.so.6
  3 Thread 32770 (LWP 15438)  0x4076abf1 in do_sigsuspend () from /lib/libc.so.6
  2 Thread 32769 (LWP 14408)  0x40819f32 in loser_poll () from /lib/libc.so.6
  1 Thread 16384 (LWP 13939)  0x4076abf1 in do_sigsuspend () from /lib/libc.so.6

Doing an strace in this situation I get:
strace -p 13939
Process 13939 attached - interrupt to quit
--- SIGALRM (Alarm clock) @ 0 (0) ---
times({tms_utime=455, tms_stime=123, tms_cutime=0, tms_cstime=0}) = 6119424
gettimeofday({1088153028, 777159}, NULL) = 0
times({tms_utime=455, tms_stime=123, tms_cutime=0, tms_cstime=0}) = 6119424
gettimeofday({1088153028, 777757}, NULL) = 0
rt_sigaction(SIGALRM, {0x4060cbc0, [ALRM], SA_RESTORER|SA_RESTART, 0x4076a988}, {0x4060cbc0, [ALRM], SA_RESTORER|SA_RESTART, 0x4076a988}, 8) = 0
sigreturn()                             = ? (mask now [RTMIN])
rt_sigsuspend([] <unfinished ...>
--- SIGALRM (Alarm clock) @ 0 (0) ---
<... rt_sigsuspend resumed> )           = -1 EINTR (Interrupted system call)
times({tms_utime=455, tms_stime=123, tms_cutime=0, tms_cstime=0}) = 6119524
gettimeofday({1088153029, 778012}, NULL) = 0
times({tms_utime=455, tms_stime=123, tms_cutime=0, tms_cstime=0}) = 6119524
gettimeofday({1088153029, 778619}, NULL) = 0
rt_sigaction(SIGALRM, {0x4060cbc0, [ALRM], SA_RESTORER|SA_RESTART, 0x4076a988}, {0x4060cbc0, [ALRM], SA_RESTORER|SA_RESTART, 0x4076a988}, 8) = 0
sigreturn()                             = ? (mask now [RTMIN])
rt_sigsuspend([] <unfinished ...>
Process 13939 detached


I currently did not compile arts with debugging on, but I will.

The ps output of arts related tasks is:
root     15450 14005  0 10:29 ?        00:00:00 /bin/sh -c (artsplay /home/PACKAGES/Sounds/KDE_Klassik_Event_2.ogg) </tmp/kde-root
root     15451 15450  0 10:29 ?        00:00:00 artsplay /home/PACKAGES/Sounds/KDE_Klassik_Event_2.ogg
root     13939 13922  0 08:58 ?        00:00:05 artsd -F 10 -S 4096 -a oss -r 48000 -s 60 -m artsmessage -c drkonqi -l 3 -f

artsshell in this situation can not connect to artsd - I get nothing, no prompt...

I tried with threaded OSS and with OSS but same results.
Comment 1 Martin Koller 2004-06-25 19:44:33 UTC
Here is a bt with debugging infos:

(gdb) bt
#0  0x4076abf1 in do_sigsuspend () from /lib/libc.so.6
#1  0x4076acb9 in sigsuspend () from /lib/libc.so.6
#2  0x40609278 in __pthread_wait_for_restart_signal () from /lib/libpthread.so.0
#3  0x40606564 in pthread_join () from /lib/libpthread.so.0
#4  0x409eb127 in aKode::FrameToStreamDecoder::halt (this=0x80da7e0) at frametostream_decoder.cpp:114
#5  0x409ea79e in ~StreamToFrameDecoder (this=0x80da7f0) at streamtoframe_decoder.cpp:53
#6  0x409d2cc6 in akodePlayObject_impl::halt (this=0x80da628) at akodePlayObject_impl.cpp:214
#7  0x409d304b in akodePlayObject_impl::readFrame (this=0x80da628) at akodePlayObject_impl.cpp:268
#8  0x409d3406 in akodePlayObject_impl::calculateBlock (this=0x80da628, count=512) at akodePlayObject_impl.cpp:326
#9  0x409d3945 in virtual thunk to akodePlayObject_impl::calculateBlock(unsigned long) () at akodePlayObject_impl.h:40
#10 0x401209e8 in Arts::StdScheduleNode::gslProcess (module=0x80c8bf8, n_values=512) at gslschedule.cc:405
#11 0x401968f5 in master_process_locked_node (node=0x80c8bf8, n_values=512) at gslopmaster.c:497
#12 0x40196ba0 in master_process_flow () at gslopmaster.c:539
#13 0x40193e55 in gsl_engine_dispatch () at gslengine.c:726
#14 0x40125faa in GslMainLoop::run (this=0x40208ff8) at gslschedule.cc:88
#15 0x40121e6c in Arts::StdScheduleNode::requireFlow (this=0xfffffffc) at gslschedule.cc:635
#16 0x4011f7b9 in Arts::Synth_PLAY_impl::needMore () at reference.h:120
#17 0x4011f7f1 in virtual thunk to Arts::Synth_PLAY_impl::needMore() () at reference.h:120
#18 0x4012772c in Arts::AudioSubSystem::handleIO () at virtualports.cc:113
#19 0x4011f6b6 in Arts::Synth_PLAY_impl::notifyIO () at reference.h:120
#20 0x4011f779 in virtual thunk to Arts::Synth_PLAY_impl::notifyIO(int, int) () at reference.h:120
#21 0x40401b72 in Arts::StdIOManager::processOneEvent () from /opt/kde3/lib/libmcop.so.1
#22 0x40401fbb in Arts::StdIOManager::run () from /opt/kde3/lib/libmcop.so.1
#23 0x403ffc88 in Arts::Dispatcher::run () from /opt/kde3/lib/libmcop.so.1
#24 0x08063ee7 in main ()
(gdb) info threads
  3 Thread 360450 (LWP 6327)  0x4076abf1 in do_sigsuspend () from /lib/libc.so.6
  2 Thread 32769 (LWP 24454)  0x40819f32 in loser_poll () from /lib/libc.so.6
  1 Thread 16384 (LWP 15090)  0x4076abf1 in do_sigsuspend () from /lib/libc.so.6
Comment 2 Stefan Gehn 2004-06-25 19:58:23 UTC
If you're using bleeding edge you should rather go and mail the right mailinglist (kde-multimedia in this case) or the author of the component (in this case you have a problem with aKode).
And btw, I bet this has already been fixed, a lot of deadlocks/hangs in aKode have been fixed recently. The only thing that stops me from using it right now is my streaming-mp3 addiction :)
Comment 3 Martin Koller 2004-06-25 20:05:02 UTC
I'm using arts from NOW, so no fixes ...
But I will use the mailinglist, thanks for the tip.
Comment 4 Martin Koller 2004-06-28 11:45:32 UTC
Updated also kdemultimedia, and now it seems to work.
Thanks.