PulseAudio gets reliably killed upon a big number of client connections
Submitted by Ahmed S. Darwish
Assigned to pul..@..op.org
Description
On master branch [1], connections from a high number of clients reliably kills the PulseAudio daemon.
Here is a minimal script that triggers the bug:
LARGE_WAVE_FILE=... for i in {1..60}; do echo "Client #$i"; ./src/pacat $LARGE_WAVE_FILE & sleep 1 done
Here are some important factors:
-
The bug is always triggered in regular -O2 build, ALSA sink. This usually happens after client #45. [2] [3]
-
Disabling SHM (--disable-shm) makes triggering the bug much quicker. Only after connection from client #27
-
Compiling at -O0 also makes the bug triggered much quicker. Only after connection from client #28
-
The bug disappears when choosing the NULL sink as default This is the case even after leaving the pacat clients run for an hour
-
In the point #4 above, resetting ALSA sink back as the default sink triggers the bug again.
-
This bug affects all versions of PulseAudiob back to v5.0! I could not test older versions (v4.0, v3.0, ..) as they always fail at runtime with my current toolchain. [4] [5]
Any thoughts on how to track this issue further?
Thanks,
==> footnotes:
[1] As of 19 March 2016, 4731690a
[2] No logs are produced from the Linux kernel in this case. Check Arun's work at http://goo.gl/0mq3ym for context.
[3] This is an old "AMD Athlon(tm) II X2 260" dual-core desktop machine
[4] Arch Linux, GCC 5.3.0 with target x86_64-unknown-linux-gnu, glibc version 2.23
[5] Runtime failure for v4.0 is: hashmap.c: Assertion 'h->iterate_list_head' failed at pulsecore/hashmap.c:151, function pa_hashmap_put(). Aborting.