Assertion fails in `spa_bt_decode_buffer_write_packet()` during HFP
- PipeWire version (
pipewire --version
): latestmaster
(I think it was commit6144d037ce08d338caa00bcd28246109444c86d2
) - Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Ubuntu 22.04 (arm64), running on Parallels on M1 Mac. Note that I disabled pre-installed Pipewire and media session. - Desktop Environment: Gnome
- Kernel version (
uname -r
): 5.15.0-43-generic - BlueZ version (
bluetoothctl --version
): bluetoothctl: 5.64 -
lsusb
:
Bus 003 Device 004: ID 203a:fff9 PARALLELS FaceTime HD Camera
Bus 003 Device 003: ID 203a:fffb PARALLELS Virtual Keyboard
Bus 003 Device 002: ID 203a:fffc PARALLELS Virtual Mouse
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 013: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 002 Device 012: ID 203a:fffe PARALLELS Virtual USB1.1 HUB
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
- Bluetooth devices:
Device F0:5C:77:FD:39:14 Pixel 3a
(Note: I do not enable host Mac's Bluetooth device. I use a USB dongle.)
Description of Problem:
I was trying HFP using oFono backend. When I received a call on my paired Phone (Pixel 3a, running Android 12), the phone set up HFP transport and started sending ringtone. A few seconds later, I saw assertion failed in Pipewire:
'size % this->frame_size == 0' failed at ../spa/plugins/bluez5/decode-buffer.h:352 spa_bt_decode_buffer_write_packet()
How Reproducible:
I saw this issue a few times in the past so I decided to file an issue.
I tried to reproduce with capturing bluetooth packet for 10 times, but no luck.
Steps to Reproduce:
- Pipewire is already started
- Start WirePlumber to capture logs (
WIREPLUMBER_DEBUG=D wireplumber |& tee 20220804_pipewire_bt_assertion.log
) - Connect an Android phone with Bluetooth
- Receive a call (note: the phone will set up HFP at this time)
- Wait for a few seconds
Actual Results:
WirePlumber (and Pipewire I think) terminates with following log:
'size % this->frame_size == 0' failed at ../spa/plugins/bluez5/decode-buffer.h:352 spa_bt_decode_buffer_write_packet()
Expected Results:
They do not terminate.
Additional Info (as attachments):
- pw-dump.log and Bluetooth debug log are not available as I could not reproduce the issue once again yet.
- I usually enable mSBC codec in
50-bluez-config.lua
file (setting["bluez5.enable-msbc"] = true
) and I do not see this issue. When I disabled mSBC flag, I saw this issue a few times. So it might be related to cvsd codec??