[pulseaudio-discuss] Pulseaudio threading debug output.

Dan dan at h4.cx
Fri Sep 9 11:33:56 PDT 2011


Hello all,

For the past few days I have been working with mkbosmans and coling in 
#sourcemage trying to determine what exactly is wrong with my pulseaudio 
setup. The issue seems to be a problem with PA hanging once my sink 
thread starts up. Everything looks seemingly normal in PA's output but I 
am unable to connect to the PA server when I have a sink.

I now have version 0.99.3 installed though I was running into the same 
issue with the current stable release 0.9.23

It was suggested that I run PA under gdb so you all can get some more 
insight into the problem. I had some troubles getting output from gdb 
that displayed all the threads but think I finally have it. Notice I 
still get these warnings from gdb:

warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.

But I also get this which seems to make gdb threads work:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

At least you can see the trace from more than one threads now. I hope 
this is what you all need to shed some light on the issue. Of coarse if 
I can do anything else to help troubleshoot the problem I'll be happy to 
help. The full gdb output is below and thank you for the help. -Daniel

dan at krypton:/lib$ gdb --args pulseaudio -vvvv
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/pulseaudio...done.
(gdb) handle SIGXCPU SIGPWR SIG33 SIG34 SIG42 SIG43 SIG44 SIG45 SIG46 
SIG47 SIG48 SIG49 SIG50 SIG51 SIG52 SIG53 SIG63 SIG62 SIG61 SIG60 SIG59 
SIG58 nostop noprint
Signal        Stop    Print    Pass to program    Description
SIGXCPU       No    No    Yes        CPU time limit exceeded
SIGPWR        No    No    Yes        Power fail/restart
SIG33         No    No    Yes        Real-time event 33
SIG34         No    No    Yes        Real-time event 34
SIG42         No    No    Yes        Real-time event 42
SIG43         No    No    Yes        Real-time event 43
SIG44         No    No    Yes        Real-time event 44
SIG45         No    No    Yes        Real-time event 45
SIG46         No    No    Yes        Real-time event 46
SIG47         No    No    Yes        Real-time event 47
SIG48         No    No    Yes        Real-time event 48
SIG49         No    No    Yes        Real-time event 49
SIG50         No    No    Yes        Real-time event 50
SIG51         No    No    Yes        Real-time event 51
SIG52         No    No    Yes        Real-time event 52
SIG53         No    No    Yes        Real-time event 53
SIG58         No    No    Yes        Real-time event 58
SIG59         No    No    Yes        Real-time event 59
SIG60         No    No    Yes        Real-time event 60
SIG61         No    No    Yes        Real-time event 61
SIG62         No    No    Yes        Real-time event 62
SIG63         No    No    Yes        Real-time event 63
(gdb) set libthread-db-search-path /lib
(gdb) run
Starting program: /usr/bin/pulseaudio -vvvv
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
process 22198 is executing new program: /usr/bin/pulseaudio
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, 
thread debugging will not be available.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: 
Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: 
Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
I: [pulseaudio] core-util.c: Failed to acquire high-priority scheduling: 
No such file or directory
I: [pulseaudio] main.c: This is PulseAudio 0.99.3
D: [pulseaudio] main.c: Compilation host: x86_64-unknown-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -g -O2 -Wall -W -Wextra 
-pipe -Wno-long-long -Wvla -Wno-overlength-strings 
-Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op 
-Wsign-compare -Wformat-security -Wmissing-include-dirs 
-Wformat-nonliteral -Wpointer-arith -Winit-self 
-Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes 
-Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow 
-Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings 
-Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common 
-fdiagnostics-show-option
D: [pulseaudio] main.c: Running on host: Linux x86_64 2.6.39-SMGL-iso 
#15 SMP Wed Sep 7 20:23:10 MST 2011
D: [pulseaudio] main.c: Found 2 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: All asserts enabled.
I: [pulseaudio] main.c: Machine ID is 5bd09ee3206d3351db8a39ce0000001e.
I: [pulseaudio] main.c: Session ID is 
5bd09ee3206d3351db8a39ce0000001e-1315470015.8316-1488072180.
I: [pulseaudio] main.c: Using runtime directory 
/home/dan/.pulse/5bd09ee3206d3351db8a39ce0000001e-runtime.
I: [pulseaudio] main.c: Using state directory /home/dan/.pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-0.99/modules.
I: [pulseaudio] main.c: Running in system mode: no
W: [pulseaudio] pid.c: Stale PID file, overwriting.
I: [pulseaudio] main.c: Fresh high-resolution timers available! Bon appetit!
D: [pulseaudio] memblock.c: Using shared memory pool with 1024 slots of 
size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 
65472
I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3
I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
I: [pulseaudio] svolume_orc.c: Initialising ORC optimized volume functions.
D: [pulseaudio] database-tdb.c: Opened TDB database 
'/home/dan/.pulse/5bd09ee3206d3351db8a39ce0000001e-device-volumes.tdb'
I: [pulseaudio] module-device-restore.c: Successfully opened database 
file '/home/dan/.pulse/5bd09ee3206d3351db8a39ce0000001e-device-volumes'.
I: [pulseaudio] module.c: Loaded "module-device-restore" (index: #0; 
argument: "").
D: [pulseaudio] database-tdb.c: Opened TDB database 
'/home/dan/.pulse/5bd09ee3206d3351db8a39ce0000001e-stream-volumes.tdb'
I: [pulseaudio] module-stream-restore.c: Successfully opened database 
file '/home/dan/.pulse/5bd09ee3206d3351db8a39ce0000001e-stream-volumes'.
D: [pulseaudio] protocol-dbus.c: Interface 
org.PulseAudio.Ext.StreamRestore1 added for object 
/org/pulseaudio/stream_restore1
I: [pulseaudio] module.c: Loaded "module-stream-restore" (index: #1; 
argument: "").
D: [pulseaudio] database-tdb.c: Opened TDB database 
'/home/dan/.pulse/5bd09ee3206d3351db8a39ce0000001e-card-database.tdb'
I: [pulseaudio] module-card-restore.c: Successfully opened database file 
'/home/dan/.pulse/5bd09ee3206d3351db8a39ce0000001e-card-database'.
I: [pulseaudio] module.c: Loaded "module-card-restore" (index: #2; 
argument: "").
I: [pulseaudio] module.c: Loaded "module-augment-properties" (index: #3; 
argument: "").
D: [pulseaudio] module-device-restore.c: Database contains invalid data 
for key: sink:null (probably pre-v1.0 data)
D: [pulseaudio] module-device-restore.c: Attempting to load legacy 
(pre-v1.0) data for key: sink:null
D: [pulseaudio] module-device-restore.c: Size does not match.
D: [pulseaudio] module-device-restore.c: Unable to load legacy 
(pre-v1.0) data for key: sink:null. Ignoring.
D: [pulseaudio] module-device-restore.c: Database contains invalid data 
for key: sink:null:null
I: [pulseaudio] sink.c: Created sink 0 "null" with sample spec s16le 2ch 
44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c:     device.description = "Null Output"
I: [pulseaudio] sink.c:     device.class = "abstract"
I: [pulseaudio] sink.c:     device.icon_name = "audio-card"
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change 
event.
D: [pulseaudio] module-device-restore.c: Database contains invalid data 
for key: source:null.monitor (probably pre-v1.0 data)
D: [pulseaudio] module-device-restore.c: Attempting to load legacy 
(pre-v1.0) data for key: source:null.monitor
D: [pulseaudio] module-device-restore.c: Size does not match.
D: [pulseaudio] module-device-restore.c: Unable to load legacy 
(pre-v1.0) data for key: source:null.monitor. Ignoring.
D: [pulseaudio] module-device-restore.c: Database contains invalid data 
for key: source:null.monitor:null
I: [pulseaudio] source.c: Created source 0 "null.monitor" with sample 
spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     device.description = "Monitor of Null Output"
I: [pulseaudio] source.c:     device.class = "monitor"
I: [pulseaudio] source.c:     device.icon_name = "audio-input-microphone"
[New Thread 0x7fffed954700 (LWP 22201)]
D: [null-sink] module-null-sink.c: Thread starting up
^C
Program received signal SIGINT, Interrupt.
0x00007ffff35d84dd in pause () from /lib/libpthread.so.0
(gdb) thread apply all bt

Thread 2 (Thread 0x7fffed954700 (LWP 22201)):
#0  0x00007ffff2a9e578 in ppoll () from /lib/libc.so.6
#1  0x00007ffff7b81a19 in pa_rtpoll_run (p=0x652f40, wait_op=true) at 
pulsecore/rtpoll.c:314
#2  0x00007fffed956d0f in thread_func (userdata=0x654f70) at 
modules/module-null-sink.c:233
#3  0x00007ffff700f638 in internal_thread_func (userdata=0x657860) at 
pulsecore/thread-posix.c:83
#4  0x00007ffff35d0e1c in start_thread () from /lib/libpthread.so.0
#5  0x00007ffff2aa6fdd in clone () from /lib/libc.so.6

Thread 1 (Thread 0x7ffff7fd7760 (LWP 22198)):
#0  0x00007ffff35d84dd in pause () from /lib/libpthread.so.0
#1  0x00007ffff59d1689 in sem_wait () from /usr/lib/libpthread-stubs.so.0
#2  0x00007ffff700f898 in pa_semaphore_wait (s=0x6582f0) at 
pulsecore/semaphore-posix.c:63
#3  0x00007ffff7b65ffa in pa_asyncmsgq_send (a=0x64e4b0, 
object=<optimized out>, code=<optimized out>, userdata=<optimized out>, 
offset=<optimized out>, chunk=<optimized out>) at pulsecore/asyncmsgq.c:167
#4  0x00007ffff7b937a3 in sink_set_state (s=0x658720, 
state=PA_SINK_IDLE) at pulsecore/sink.c:420
#5  0x00007ffff7b95327 in pa_sink_put (s=0x658720) at pulsecore/sink.c:653
#6  0x00007fffed957690 in module_null_sink_LTX_pa__init (m=0x654f10) at 
modules/module-null-sink.c:318
#7  0x00007ffff7b79238 in pa_module_load (c=0x643920, name=0x63d510 
"module-null-sink", argument=0x0) at pulsecore/module.c:109
#8  0x00007ffff7b6d6dd in pa_cli_command_load (c=0x643920, t=0x63c5c0, 
buf=0x63b8d0, fail=<optimized out>) at pulsecore/cli-command.c:429
#9  0x00007ffff7b6eefe in pa_cli_command_execute_line_stateful 
(c=0x643920, s=<optimized out>, buf=0x63b8d0, fail=0x63ac05, 
ifstate=<optimized out>) at pulsecore/cli-command.c:1833
#10 0x00007ffff7b6f4d4 in pa_cli_command_execute_file_stream 
(c=0x643920, f=0x648d20, buf=0x63b8d0, fail=0x63ac05) at 
pulsecore/cli-command.c:1873
#11 0x0000000000407774 in main (argc=<optimized out>, argv=<optimized 
out>) at daemon/main.c:1074



More information about the pulseaudio-discuss mailing list