wireplumber icon indicating copy to clipboard operation
wireplumber copied to clipboard

wireplumber crashes with SIGSEGV in libspa-bluez5 during Bluetooth device parameter enumeration

Open FrancKINANI opened this issue 1 month ago • 1 comments

Crash Report: wireplumber SIGSEGV in libspa-bluez5

Summary

wireplumber process crashes with SIGSEGV when handling Bluetooth audio devices whose connection has been terminated unexpectedly. This has occurred 4 times over 3 weeks on this system.

Crash Details

  • Process: wireplumber (PID 246186, also PIDs 781, 810, 785)
  • Signal: SIGSEGV (signal 11)
  • Timestamp of latest crash: Sat 2026-10-10 08:20:59 +00
  • Binary: /usr/bin/wireplumber
  • si_code: SI_KERNEL

Backtrace (from coredumpctl)

#0  0x0000722c3364b21e n/a (libspa-bluez5.so + 0x4121e)
#1  0x0000722c3364bba2 n/a (libspa-bluez5.so + 0x41ba2)
#2  0x0000722c336521f6 n/a (libspa-bluez5.so + 0x481f6)
#3  0x0000722c3365eee7 n/a (libspa-bluez5.so + 0x54ee7)
#4  wp_spa_device_enum_params_sync (libwireplumber-0.5.so.0 + 0x2b659)
#5  0x0000722c52aabf0c n/a (libwireplumber-module-lua-scripting.so + 0x15f0c)
#6  0x0000722c52a5af68 n/a (liblua.so.5.5 + 0xef68)
#7-#11 liblua.so.5.5 (lua_pcallk through lua_pcallk)
#12 0x0000722c52aaf533 n/a (libwireplumber-module-lua-scripting.so + 0x19533)
#13 0x0000722c52ab61a2 n/a (libwireplumber-module-lua-scripting.so + 0x201a2)
#14 g_closure_invoke (libgobject-2.0.so.0 + 0x11bcc)
#15 0x0000722c551cb9c5 n/a (libwireplumber-0.5.so.0 + 0x249c5)
#16 0x0000722c551d0982 n/a (libwireplumber-0.5.so.0 + 0x29982)
#17-19 g_main_loop_run (libglib-2.0.so.0)
#20-23 wireplumber main

Journal Entries (from latest crash, Oct 10 08:20:57-59)

Oct 10 08:20:57 Julie wireplumber[246186]: spa.bluez5.sink.media: 0x5cfcfeac0d58: connection (/org/bluez/hci0/dev_D2_9C_87_6B_B4_88/sep2/fd0) terminated unexpectedly
Oct 10 08:20:57 Julie wireplumber[246186]: spa.audioconvert: 0x5cfcfeae23c0: (0 suppressed) out of buffers on port 0 3
Oct 10 08:20:57 Julie wireplumber[246186]: pw.node: (bluez_output.D2_9C_87_6B_B4_88.1-86) running -> error (Received error event)
Oct 10 08:20:57 Julie wireplumber[246186]: spa.bluez5: Failure in Bluetooth audio transport /org/bluez/hci0/dev_D2_9C_87_6B_B4_88/sep2/fd0
Oct 10 08:20:59 Julie systemd-coredump[261265]: Process 246186 (wireplumber) of user 1000 dumped core.

Crash Pattern (4 incidents)

Date PID Signal Core Size
Mon 2026-09-14 21:08:34 +01 785 SIGSEGV missing
Thu 2026-10-08 17:40:34 +00 781 SIGSEGV 1.2M
Fri 2026-10-09 22:21:48 +00 810 SIGSEGV 1.2M
Sat 2026-10-10 08:20:59 +00 246186 SIGSEGV 1.1M

All four share identical call chain: libspa-bluez5.so → wp_spa_device_enum_params_sync → Lua scripting module → segfault.

System Information

  • Hostname: Julie
  • User: julius (UID 1000)
  • Memory: 15Gi total, 2.5Gi free, 9.5Gi available (no OOM)
  • Swap: 30Gi, completely free
  • Boot ID: fd79877771a74c5b82bf1731d2f71875
  • Machine ID: 922b2029fd0a464ab2365158753b3f07

Bluetooth Device

  • MAC Address: D2:9C:87:6B:B4:88
  • Device: /org/bluez/hci0/dev_D2_9C_87_6B_B4_88/sep2/fd0
  • Audio transport: Failed with "Failure in Bluetooth audio transport"

Expected Behavior

wireplumber should handle Bluetooth audio device disconnection gracefully without crashing. The SPA library should not segfault when enumerating parameters on a device whose transport has terminated.

Steps to Reproduce

  1. Have a Bluetooth audio device connected to the system
  2. Allow the Bluetooth audio connection to terminate unexpectedly (this happens spontaneously)
  3. wireplumber continues running and attempts to enumerate device parameters
  4. Crash in libspa-bluez5.so occurs

Diagnosis

This is a bug in the libspa-bluez5 library (BlueZ5 SPA plugin for PipeWire). When a Bluetooth audio device's connection is terminated unexpectedly, subsequent calls to wp_spa_device_enum_params_sync() cause a segfault because the library does not properly handle the case where the audio transport has been terminated.

The journal shows the connection terminated unexpectedly, then immediately after wireplumber tried to enumerate parameters and crashed.

Proposed Fix (hypothesis)

The libspa-bluez5 SPA plugin should check if the Bluetooth audio transport is active before allowing parameter enumeration, or properly handle the case where the transport has terminated by returning an error rather than crashing.

Alternatively, wireplumber could check the device state before calling wp_spa_device_enum_params_sync() and skip or handle terminated devices gracefully.

Attribution

Filed by pi agent via omarchy harness.

FrancKINANI avatar Oct 10 '26 08:10 FrancKINANI

This is not the correct place to file bugs, see #12

ford-prefect avatar Oct 12 '26 06:10 ford-prefect