[pulseaudio-tickets] [Bug 107044] PulseAudio is crashing when connecting AD2P device

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jun 27 15:49:11 UTC 2018


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

Tanu Kaskinen <tanuk at iki.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|NOTOURBUG                   |---

--- Comment #2 from Tanu Kaskinen <tanuk at iki.fi> ---
The crash indicates a bug in PulseAudio, even if there were other things
somehow broken when this happened. Here's what I found out from the stack
trace:

As the assertion error shows, u->thread is non-NULL when start_thread() is
called, so we need to find out how that is possible.

The crash happens in start_thread(), which is only called from set_profile_cb()
and pa__init(), and we can ignore pa__init() because pa__init() can't be
running  when the native protocol calls pa_card_set_profile().

set_profile_cb() calls stop_thread() before calling start_thread(), and
stop_thread() sets u->thread to NULL. Therefore, something must set u->thread
back to non-NULL before the execution gets to the start_thread() call. That can
only be done by set_profile_cb(), so apparently another card profile change was
made while the original profile change was still ongoing.

The init_profile() call that set_profile_cb() does between stop_thread() and
start_thread() can cause some hooks to fire, and I suspect that some module is
setting the profile in those hooks. The main candidates are
module-bluetooth-policy and module-switch-on-port-available.

module-bluetooth-policy probably isn't the culprit, because it only sets card
profiles when new record streams appear or go away and when the bluetooth
device is initially connected.

module-switch-on-port-available seems like a plausible explanation, if the
previous profile was "off" (if the previous profile was HSP, then
module-switch-on-port-available shouldn't switch the profile, because that
would make the source go away, and the module tries to avoid such actions).

Can you try setting the headset profile to off and then back to a2dp? Does
PulseAudio crash? (I can't try that myself, as I don't have a functional
bluetooth setup.)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20180627/e8fc298d/attachment.html>


More information about the pulseaudio-bugs mailing list