[pulseaudio-tickets] [Bug 54779] New: Live lock on daemon startup when module combine is used and real time scheduling is enabled

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Sep 11 08:06:32 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=54779

             Bug #: 54779
           Summary: Live lock on daemon startup when module combine is
                    used and real time scheduling is enabled
    Classification: Unclassified
           Product: PulseAudio
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: medium
         Component: modules
        AssignedTo: pulseaudio-bugs at lists.freedesktop.org
        ReportedBy: tvrtko.ursulin at onelan.co.uk
         QAContact: pulseaudio-bugs at lists.freedesktop.org
                CC: lennart at poettering.net


Reproduced with version 0.9.23 and 1.1.

I think it is easier to trigger this on slow machines. I get it 100% of time on
a single core Celeron G440, while with a i3 CPU on the same motherboard it
happens only occasionally.

Setting "realtime-scheduling" to "no" in /etc/pulse/daemon.conf makes it work.

daemon.conf:

allow-module-loading = no
allow-exit = no
high-priority = yes
nice-level = -11
realtime-scheduling = no
rlimit-rttime = 10000000
default-sample-format = s16le
default-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragment-size-msec = 10
resample-method = speex-float-0

default.pa:

load-module module-alsa-sink device=hw:0,7
load-module module-alsa-sink device=hw:0,3
load-module module-alsa-sink device=hw:0,1
load-module module-alsa-sink device=hw:0,0
load-module module-combine
slaves=alsa_output.hw_0_7,alsa_output.hw_0_3,alsa_output.hw_0_1,alsa_output.hw_0_0

set-default-sink combined

load-module module-native-protocol-unix
load-module module-rescue-streams
load-module module-always-sink
load-module module-intended-roles
load-module module-suspend-on-idle
load-module module-console-kit

Happens also with only one slave.

Core dump while in live lock state attached.

Threads call traces look like this:

gdb) where
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:86
#1  0x00007ffff74f4e48 in pa_semaphore_wait (s=0x625e10) at
pulsecore/semaphore-posix.c:63
#2  0x00007ffff7b7216a in pa_asyncmsgq_send (a=0x623ad0, object=<optimized
out>, code=<optimized out>, userdata=<optimized out>, offset=<optimized out>,
chunk=<optimized out>) at pulsecore/asyncmsgq.c:169
#3  0x00007ffff7ba6ea7 in pa_sink_get_latency_range (s=0x637630,
min_latency=0x7fffffffd830, max_latency=0x7fffffffd838) at
pulsecore/sink.c:2399
#4  0x00007ffff7b9c2cd in pa_sink_input_set_requested_latency (i=0x65cab0,
usec=200000) at pulsecore/sink-input.c:932
#5  0x00007fffe5cdf3ee in output_create_sink_input (o=0x6524f0) at
modules/module-combine.c:883
#6  0x00007fffe5ce04f9 in output_enable (o=0x6524f0) at
modules/module-combine.c:961
#7  output_enable (o=0x6524f0) at modules/module-combine.c:949
#8  0x00007fffe5ce28a0 in module_combine_LTX_pa__init (m=0x64b500) at
modules/module-combine.c:1347
#9  0x00007ffff7b87068 in pa_module_load (c=0x6192f0, name=0x61a0d0
"module-combine", argument=0x64b4a0
"slaves=alsa_output.hw_0_7,alsa_output.hw_0_3,alsa_output.hw_0_1,alsa_output.hw_0_0")
at pulsecore/module.c:112
#10 0x00007ffff7b7971d in pa_cli_command_load (c=0x6192f0, t=0x615f50,
buf=0x6156e0, fail=<optimized out>) at pulsecore/cli-command.c:426
#11 0x00007ffff7b7af26 in pa_cli_command_execute_line_stateful (c=0x6192f0,
s=<optimized out>, buf=0x6156e0, fail=0x613065, ifstate=<optimized out>) at
pulsecore/cli-command.c:1744
#12 0x00007ffff7b7b269 in pa_cli_command_execute_file_stream (c=0x6192f0,
f=0x620700, buf=0x6156e0, fail=0x613065) at pulsecore/cli-command.c:1784
#13 0x0000000000405b97 in main (argc=<optimized out>, argv=<optimized out>) at
daemon/main.c:930
(gdb) thread 2
[Switching to thread 2 (Thread 0x7fffe7ee9700 (LWP 30992))]
#0  0x00007ffff4b7c693 in ppoll (fds=<optimized out>, nfds=<optimized out>,
timeout=<optimized out>, sigmask=<optimized out>) at
../sysdeps/unix/sysv/linux/ppoll.c:58
58                                     _NSIG / 8);
(gdb) where
#0  0x00007ffff4b7c693 in ppoll (fds=<optimized out>, nfds=<optimized out>,
timeout=<optimized out>, sigmask=<optimized out>) at
../sysdeps/unix/sysv/linux/ppoll.c:58
#1  0x00007ffff7b8f749 in pa_rtpoll_run (p=0x6160a0, wait_op=true) at
pulsecore/rtpoll.c:304
#2  0x00007fffe8408971 in thread_func (userdata=0x623640) at
modules/alsa/alsa-sink.c:1470
#3  0x00007ffff74f4be8 in internal_thread_func (userdata=0x6373a0) at
pulsecore/thread-posix.c:83
#4  0x00007ffff54e3d90 in start_thread (arg=0x7fffe7ee9700) at
pthread_create.c:309
#5  0x00007ffff4b84f5d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:115
(gdb) thread 3
[Switching to thread 3 (Thread 0x7fffe76e8700 (LWP 30993))]
#0  0x00007ffff4b7c693 in ppoll (fds=<optimized out>, nfds=<optimized out>,
timeout=<optimized out>, sigmask=<optimized out>) at
../sysdeps/unix/sysv/linux/ppoll.c:58
58                                     _NSIG / 8);
(gdb) where
#0  0x00007ffff4b7c693 in ppoll (fds=<optimized out>, nfds=<optimized out>,
timeout=<optimized out>, sigmask=<optimized out>) at
../sysdeps/unix/sysv/linux/ppoll.c:58
#1  0x00007ffff7b8f749 in pa_rtpoll_run (p=0x625b00, wait_op=true) at
pulsecore/rtpoll.c:304
#2  0x00007fffe8408971 in thread_func (userdata=0x636bd0) at
modules/alsa/alsa-sink.c:1470
#3  0x00007ffff74f4be8 in internal_thread_func (userdata=0x637e20) at
pulsecore/thread-posix.c:83
#4  0x00007ffff54e3d90 in start_thread (arg=0x7fffe76e8700) at
pthread_create.c:309
#5  0x00007ffff4b84f5d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:115
(gdb) thread 4
[Switching to thread 4 (Thread 0x7fffe6ee7700 (LWP 30994))]
#0  0x00007ffff4b7c693 in ppoll (fds=<optimized out>, nfds=<optimized out>,
timeout=<optimized out>, sigmask=<optimized out>) at
../sysdeps/unix/sysv/linux/ppoll.c:58
58                                     _NSIG / 8);
(gdb) where
#0  0x00007ffff4b7c693 in ppoll (fds=<optimized out>, nfds=<optimized out>,
timeout=<optimized out>, sigmask=<optimized out>) at
../sysdeps/unix/sysv/linux/ppoll.c:58
#1  0x00007ffff7b8f749 in pa_rtpoll_run (p=0x63afb0, wait_op=true) at
pulsecore/rtpoll.c:304
#2  0x00007fffe8408971 in thread_func (userdata=0x63e430) at
modules/alsa/alsa-sink.c:1470
#3  0x00007ffff74f4be8 in internal_thread_func (userdata=0x63e9c0) at
pulsecore/thread-posix.c:83
#4  0x00007ffff54e3d90 in start_thread (arg=0x7fffe6ee7700) at
pthread_create.c:309
#5  0x00007ffff4b84f5d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:115
(gdb) thread 5
[Switching to thread 5 (Thread 0x7fffe66e6700 (LWP 30995))]
#0  0x00007ffff4b7c693 in ppoll (fds=<optimized out>, nfds=<optimized out>,
timeout=<optimized out>, sigmask=<optimized out>) at
../sysdeps/unix/sysv/linux/ppoll.c:58
58                                     _NSIG / 8);
(gdb) where
#0  0x00007ffff4b7c693 in ppoll (fds=<optimized out>, nfds=<optimized out>,
timeout=<optimized out>, sigmask=<optimized out>) at
../sysdeps/unix/sysv/linux/ppoll.c:58
#1  0x00007ffff7b8f749 in pa_rtpoll_run (p=0x63e800, wait_op=true) at
pulsecore/rtpoll.c:304
#2  0x00007fffe8408971 in thread_func (userdata=0x644c30) at
modules/alsa/alsa-sink.c:1470
#3  0x00007ffff74f4be8 in internal_thread_func (userdata=0x64b870) at
pulsecore/thread-posix.c:83
#4  0x00007ffff54e3d90 in start_thread (arg=0x7fffe66e6700) at
pthread_create.c:309
#5  0x00007ffff4b84f5d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:115
(gdb) thread 6
[Switching to thread 6 (Thread 0x7fffe5cdb700 (LWP 30996))]
#0  0x00007ffff4b7c693 in ppoll (fds=<optimized out>, nfds=<optimized out>,
timeout=<optimized out>, sigmask=<optimized out>) at
../sysdeps/unix/sysv/linux/ppoll.c:58
58                                     _NSIG / 8);
(gdb) where
#0  0x00007ffff4b7c693 in ppoll (fds=<optimized out>, nfds=<optimized out>,
timeout=<optimized out>, sigmask=<optimized out>) at
../sysdeps/unix/sysv/linux/ppoll.c:58
#1  0x00007ffff7b8f749 in pa_rtpoll_run (p=0x6445a0, wait_op=true) at
pulsecore/rtpoll.c:304
#2  0x00007fffe5ce070e in thread_func (userdata=0x64b790) at
modules/module-combine.c:333
#3  0x00007ffff74f4be8 in internal_thread_func (userdata=0x659f00) at
pulsecore/thread-posix.c:83
#4  0x00007ffff54e3d90 in start_thread (arg=0x7fffe5cdb700) at
pthread_create.c:309
#5  0x00007ffff4b84f5d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:115

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the pulseaudio-bugs mailing list