Mantis Bug Tracker

View Revisions: Issue #2130 All Revisions ] Back to Issue ]
Summary 0002130: SOUND:YES consumes excessive CPU (runaway thread?)
Revision 2010-06-21 11:33 by Footkerchief
Additional Information Startup with SOUND:YES reports:

...
Sound devices available:
ALSA Software
OSS Software
PulseAudio Software
Wave File Writer
Picking ALSA Software. If your desired device was missing, make sure you have the appropriate 32-bit libraries installed. If you wanted a different device, configure ~/.openalrc appropriately.
Perfect OpenAL context attributes GET
Loading bindings from data/init/interface.txt
...

Here's a thread dump of the case with SOUND:YES while it's chewing CPU. top says it's LWP 5630 (thread 2) that's the culprit - that thread is at 95% CPU or so, while the main thread is at 30% or so:

(gdb) thread apply all bt

Thread 5 (Thread 0xf4d8ab70 (LWP 5627)):
#0 0xf772a430 in __kernel_vsyscall ()
#1 0xf7039e96 in nanosleep () from /lib32/libc.so.6
#2 0xf76cbf47 in SDL_Delay () from /usr/lib32/libSDL-1.2.so.0
#3 0xf76cbf94 in ?? () from /usr/lib32/libSDL-1.2.so.0
#4 0xf767ea6e in ?? () from /usr/lib32/libSDL-1.2.so.0
#5 0xf76c8d2d in ?? () from /usr/lib32/libSDL-1.2.so.0
#6 0xf6f8d80e in start_thread () from /lib32/libpthread.so.0
#7 0xf7070b4e in clone () from /lib32/libc.so.6

Thread 4 (Thread 0xf4589b70 (LWP 5628)):
#0 0xf772a430 in __kernel_vsyscall ()
#1 0xf6f94355 in sem_wait@@GLIBC_2.1 () from /lib32/libpthread.so.0
#2 0xf76c8e18 in SDL_SemWait () from /usr/lib32/libSDL-1.2.so.0
#3 0xf7243395 in enablerst::async_loop() () from /home/oliver/df_31_04/df_linux/libs/libgraphics.so
#4 0xf724384d in call_loop(void*) () from /home/oliver/df_31_04/df_linux/libs/libgraphics.so
#5 0xf767ea6e in ?? () from /usr/lib32/libSDL-1.2.so.0
#6 0xf76c8d2d in ?? () from /usr/lib32/libSDL-1.2.so.0
#7 0xf6f8d80e in start_thread () from /lib32/libpthread.so.0
#8 0xf7070b4e in clone () from /lib32/libc.so.6

Thread 3 (Thread 0xefbaeb70 (LWP 5629)):
#0 0xf772a430 in __kernel_vsyscall ()
#1 0xf7062ed6 in poll () from /lib32/libc.so.6
#2 0xf3cdccc2 in ?? () from /usr/lib32/libpulse.so.0
#3 0xf3cc9e09 in pa_mainloop_poll () from /usr/lib32/libpulse.so.0
#4 0xf3ccbc23 in pa_mainloop_iterate () from /usr/lib32/libpulse.so.0
#5 0xf3ccbcf4 in pa_mainloop_run () from /usr/lib32/libpulse.so.0
#6 0xf3cdcbc3 in ?? () from /usr/lib32/libpulse.so.0
#7 0xf3c24ac2 in ?? () from /usr/lib32/libpulsecommon-0.9.19.so
#8 0xf6f8d80e in start_thread () from /lib32/libpthread.so.0
#9 0xf7070b4e in clone () from /lib32/libc.so.6

Thread 2 (Thread 0xef3adb70 (LWP 5630)):
#0 0xf772a430 in __kernel_vsyscall ()
#1 0xf7062ed6 in poll () from /lib32/libc.so.6
#2 0xf6f0ae15 in ?? () from /usr/lib32/libasound.so.2
#3 0xf6f0afe3 in snd_pcm_wait () from /usr/lib32/libasound.so.2
#4 0xf6f0b17b in ?? () from /usr/lib32/libasound.so.2
#5 0xf6f4fe7a in ?? () from /usr/lib32/libasound.so.2
#6 0xf6f059bc in snd_pcm_writei () from /usr/lib32/libasound.so.2
#7 0xf69261db in ?? () from /usr/lib32/libopenal.so.1
#8 0xf6921492 in ?? () from /usr/lib32/libopenal.so.1
#9 0xf6f8d80e in start_thread () from /lib32/libpthread.so.0
#10 0xf7070b4e in clone () from /lib32/libc.so.6

Thread 1 (Thread 0xf4f62740 (LWP 5626)):
#0 0xf772a430 in __kernel_vsyscall ()
#1 0xf7039e96 in nanosleep () from /lib32/libc.so.6
#2 0xf76cbf47 in SDL_Delay () from /usr/lib32/libSDL-1.2.so.0
#3 0xf7245488 in enablerst::do_frame() () from /home/oliver/df_31_04/df_linux/libs/libgraphics.so
#4 0xf7245659 in enablerst::eventLoop_SDL() () from /home/oliver/df_31_04/df_linux/libs/libgraphics.so
#5 0xf72462c0 in enablerst::loop(std::string) () from /home/oliver/df_31_04/df_linux/libs/libgraphics.so
#6 0xf7246b02 in main () from /home/oliver/df_31_04/df_linux/libs/libgraphics.so
#7 0xf6fb8b56 in __libc_start_main () from /lib32/libc.so.6
#8 0x0804dec1 in ?? ()
Revision 2010-06-02 08:02 by Footkerchief
Additional Information Startup with SOUND:YES reports:

...
Sound devices available:
ALSA Software
OSS Software
PulseAudio Software
Wave File Writer
Picking ALSA Software. If your desired device was missing, make sure you have the appropriate 32-bit libraries installed. If you wanted a different device, configure ~/.openalrc appropriately.
Perfect OpenAL context attributes GET
Loading bindings from data/init/interface.txt
...

Here's a thread dump of the case with SOUND:YES while it's chewing CPU. top says it's LWP 5630 (thread 2) that's the culprit - that thread is at 95% CPU or so, while the main thread is at 30% or so:

(gdb) thread apply all bt

Thread 5 (Thread 0xf4d8ab70 (LWP 5627)):
#0 0xf772a430 in __kernel_vsyscall ()
0000001 0xf7039e96 in nanosleep () from /lib32/libc.so.6
0000002 0xf76cbf47 in SDL_Delay () from /usr/lib32/libSDL-1.2.so.0
0000003 0xf76cbf94 in ?? () from /usr/lib32/libSDL-1.2.so.0
0000004 0xf767ea6e in ?? () from /usr/lib32/libSDL-1.2.so.0
0000005 0xf76c8d2d in ?? () from /usr/lib32/libSDL-1.2.so.0
0000006 0xf6f8d80e in start_thread () from /lib32/libpthread.so.0
0000007 0xf7070b4e in clone () from /lib32/libc.so.6

Thread 4 (Thread 0xf4589b70 (LWP 5628)):
#0 0xf772a430 in __kernel_vsyscall ()
0000001 0xf6f94355 in sem_wait@@GLIBC_2.1 () from /lib32/libpthread.so.0
0000002 0xf76c8e18 in SDL_SemWait () from /usr/lib32/libSDL-1.2.so.0
0000003 0xf7243395 in enablerst::async_loop() () from /home/oliver/df_31_04/df_linux/libs/libgraphics.so
0000004 0xf724384d in call_loop(void*) () from /home/oliver/df_31_04/df_linux/libs/libgraphics.so
0000005 0xf767ea6e in ?? () from /usr/lib32/libSDL-1.2.so.0
0000006 0xf76c8d2d in ?? () from /usr/lib32/libSDL-1.2.so.0
0000007 0xf6f8d80e in start_thread () from /lib32/libpthread.so.0
0000008 0xf7070b4e in clone () from /lib32/libc.so.6

Thread 3 (Thread 0xefbaeb70 (LWP 5629)):
#0 0xf772a430 in __kernel_vsyscall ()
0000001 0xf7062ed6 in poll () from /lib32/libc.so.6
0000002 0xf3cdccc2 in ?? () from /usr/lib32/libpulse.so.0
0000003 0xf3cc9e09 in pa_mainloop_poll () from /usr/lib32/libpulse.so.0
0000004 0xf3ccbc23 in pa_mainloop_iterate () from /usr/lib32/libpulse.so.0
0000005 0xf3ccbcf4 in pa_mainloop_run () from /usr/lib32/libpulse.so.0
0000006 0xf3cdcbc3 in ?? () from /usr/lib32/libpulse.so.0
0000007 0xf3c24ac2 in ?? () from /usr/lib32/libpulsecommon-0.9.19.so
0000008 0xf6f8d80e in start_thread () from /lib32/libpthread.so.0
0000009 0xf7070b4e in clone () from /lib32/libc.so.6

Thread 2 (Thread 0xef3adb70 (LWP 5630)):
#0 0xf772a430 in __kernel_vsyscall ()
0000001 0xf7062ed6 in poll () from /lib32/libc.so.6
0000002 0xf6f0ae15 in ?? () from /usr/lib32/libasound.so.2
0000003 0xf6f0afe3 in snd_pcm_wait () from /usr/lib32/libasound.so.2
0000004 0xf6f0b17b in ?? () from /usr/lib32/libasound.so.2
0000005 0xf6f4fe7a in ?? () from /usr/lib32/libasound.so.2
0000006 0xf6f059bc in snd_pcm_writei () from /usr/lib32/libasound.so.2
0000007 0xf69261db in ?? () from /usr/lib32/libopenal.so.1
0000008 0xf6921492 in ?? () from /usr/lib32/libopenal.so.1
0000009 0xf6f8d80e in start_thread () from /lib32/libpthread.so.0
0000010 0xf7070b4e in clone () from /lib32/libc.so.6

Thread 1 (Thread 0xf4f62740 (LWP 5626)):
#0 0xf772a430 in __kernel_vsyscall ()
0000001 0xf7039e96 in nanosleep () from /lib32/libc.so.6
0000002 0xf76cbf47 in SDL_Delay () from /usr/lib32/libSDL-1.2.so.0
0000003 0xf7245488 in enablerst::do_frame() () from /home/oliver/df_31_04/df_linux/libs/libgraphics.so
0000004 0xf7245659 in enablerst::eventLoop_SDL() () from /home/oliver/df_31_04/df_linux/libs/libgraphics.so
0000005 0xf72462c0 in enablerst::loop(std::string) () from /home/oliver/df_31_04/df_linux/libs/libgraphics.so
0000006 0xf7246b02 in main () from /home/oliver/df_31_04/df_linux/libs/libgraphics.so
0000007 0xf6fb8b56 in __libc_start_main () from /lib32/libc.so.6
0000008 0x0804dec1 in ?? ()


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker