pulseaudio crashes when bluetooth-connected phone starts playing audio
Warning
Missing data may cause bugs to languish.
Summary
My Android phone is connected to PC via bluetooth to route the phone's audio to PC. However, immediately after the phone starts playing audio, bluetooth is disconnected.
environment
- Arch Linux
- pulseaudio 12.99+
- bluez 5.50
- pa-info.txt
Steps to reproduce
- Pair an android phone with PC via bluetooth.
- Connect bluetooth to PC from the phone.
- Play any audio from the phone.
What is the current bug behavior?
Bluetooth is disconnected. Below is the log.
bluetoothd[1120]: /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/fd4: fd(25) ready
audit[6512]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 pid=6512 comm="bluetooth" exe="/usr/bin/pulseaudio" sig=8 res=1
kernel: traps: bluetooth[6528] trap divide error ip:7fe1de5a6370 sp:7fe18bffed40 error:0 in module-bluez5-device.so[7fe1de5a2000+7000]
kernel: audit: type=1701 audit(1566242853.831:181): auid=1000 uid=1000 gid=1000 ses=3 pid=6512 comm="bluetooth" exe="/usr/bin/pulseaudio" sig=8 res=1
systemd[1]: Started Process Core Dump (PID 6531/UID 0).
audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@4-6531-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
kernel: audit: type=1130 audit(1566242853.851:182): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@4-6531-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
bluetoothd[1120]: Endpoint unregistered: sender=:1.3596 path=/MediaEndpoint/A2DPSource/sbc
bluetoothd[1120]: Endpoint unregistered: sender=:1.3596 path=/MediaEndpoint/A2DPSink/sbc
bluetoothd[1120]: Endpoint unregistered: sender=:1.3596 path=/MediaEndpoint/A2DPSource/sbc
bluetoothd[1120]: Endpoint unregistered: sender=:1.3596 path=/MediaEndpoint/A2DPSink/sbc
systemd[1751]: pulseaudio.service: Main process exited, code=killed, status=8/FPE
systemd[1751]: pulseaudio.service: Failed with result 'signal'.
/usr/lib/gdm-x-session[1779]: (II) config/udev: removing device xx:xx:xx:xx:xx:xx
/usr/lib/gdm-x-session[1779]: (**) Option "fd" "67"
/usr/lib/gdm-x-session[1779]: (II) event19 - xx:xx:xx:xx:xx:xx: device removed
/usr/lib/gdm-x-session[1779]: (II) UnloadModule: "libinput"
/usr/lib/gdm-x-session[1779]: (II) systemd-logind: releasing fd for 13:83
systemd[1751]: pulseaudio.service: Service RestartSec=100ms expired, scheduling restart.
systemd[1751]: pulseaudio.service: Scheduled restart job, restart counter is at 5.
systemd[1751]: Stopped Sound Service.
systemd[1751]: Starting Sound Service...
systemd-coredump[6532]: Process 6512 (pulseaudio) of user 1000 dumped core.
Stack trace of thread 6528:
#0 0x00007fe1de5a6370 n/a (module-bluez5-device.so)
#1 0x00007fe1e422bd0c n/a (libpulsecommon-12.99.so)
#2 0x00007fe1e3a2e57f start_thread (libpthread.so.0)
#3 0x00007fe1e44410e3 __clone (libc.so.6)
Stack trace of thread 6516:
#0 0x00007fe1e42e45db pa_sconv_s16le_to_float32ne (libpulsecore-12.99.so)
#1 0x00007fe1e42ed44d pa_resampler_run (libpulsecore-12.99.so)
#2 0x00007fe1e42d2b2c pa_sink_input_peek (libpulsecore-12.99.so)
#3 0x00007fe1e42aeef4 n/a (libpulsecore-12.99.so)
#4 0x00007fe1e42de0ac pa_sink_render_into (libpulsecore-12.99.so)
#5 0x00007fe1e42de670 pa_sink_render_into_full (libpulsecore-12.99.so)
#6 0x00007fe1de615a41 n/a (libalsa-util.so)
#7 0x00007fe1e422bd0c n/a (libpulsecommon-12.99.so)
#8 0x00007fe1e3a2e57f start_thread (libpthread.so.0)
#9 0x00007fe1e44410e3 __clone (libc.so.6)
Stack trace of thread 6519:
#0 0x00007fe1e4436756 ppoll (libc.so.6)
#1 0x00007fe1e42ea5b5 pa_rtpoll_run (libpulsecore-12.99.so)
#2 0x00007fe1de607c7c n/a (libalsa-util.so)
#3 0x00007fe1e422bd0c n/a (libpulsecommon-12.99.so)
#4 0x00007fe1e3a2e57f start_thread (libpthread.so.0)
#5 0x00007fe1e44410e3 __clone (libc.so.6)
Stack trace of thread 6518:
#0 0x00007fe1e4436756 ppoll (libc.so.6)
#1 0x00007fe1e42ea5b5 pa_rtpoll_run (libpulsecore-12.99.so)
#2 0x00007fe1de61542f n/a (libalsa-util.so)
#3 0x00007fe1e422bd0c n/a (libpulsecommon-12.99.so)
#4 0x00007fe1e3a2e57f start_thread (libpthread.so.0)
#5 0x00007fe1e44410e3 __clone (libc.so.6)
Stack trace of thread 6517:
#0 0x00007fe1e4436756 ppoll (libc.so.6)
#1 0x00007fe1e42ea5b5 pa_rtpoll_run (libpulsecore-12.99.so)
#2 0x00007fe1de607c7c n/a (libalsa-util.so)
#3 0x00007fe1e422bd0c n/a (libpulsecommon-12.99.so)
#4 0x00007fe1e3a2e57f start_thread (libpthread.so.0)
#5 0x00007fe1e44410e3 __clone (libc.so.6)
Stack trace of thread 6512:
#0 0x00007fe1e4436756 ppoll (libc.so.6)
#1 0x00007fe1e41d40e3 pa_mainloop_poll (libpulse.so.0)
#2 0x00007fe1e41de301 pa_mainloop_iterate (libpulse.so.0)
#3 0x00007fe1e41de3b1 pa_mainloop_run (libpulse.so.0)
#4 0x0000555e4a81cc7b main (pulseaudio)
#5 0x00007fe1e436bee3 __libc_start_main (libc.so.6)
#6 0x0000555e4a81d9ee n/a (pulseaudio)
rtkit-daemon[1547]: Successfully made thread 6536 of process 6536 owned by '1000' high priority at nice level -11.
rtkit-daemon[1547]: Supervising 3 threads of 3 processes of 1 users.
pulseaudio[6536]: W: [pulseaudio] pid.c: Stale PID file, overwriting.
rtkit-daemon[1547]: Supervising 3 threads of 3 processes of 1 users.
rtkit-daemon[1547]: Successfully made thread 6539 of process 6536 owned by '1000' RT at priority 5.
rtkit-daemon[1547]: Supervising 4 threads of 3 processes of 1 users.
rtkit-daemon[1547]: Supervising 4 threads of 3 processes of 1 users.
rtkit-daemon[1547]: Successfully made thread 6540 of process 6536 owned by '1000' RT at priority 5.
rtkit-daemon[1547]: Supervising 5 threads of 3 processes of 1 users.
systemd[1]: systemd-coredump@4-6531-0.service: Succeeded.
What is the expected correct behavior?
Bluetooth should remain connected and the audio is transferred to PC. This behavior is the case with pulseaudio 12.2.