Description of problem: systemd[1]: bluetooth.service: Main process exited, code=dumped, status=11/SEGV With a USB Bluetooth adapter Bus 003 Device 078: ID 0461:4d75 Primax Electronics, Ltd Rocketfish RF-FLBTAD Bluetooth Adapter Version-Release number of selected component (if applicable): bluez-5.49-1.fc27.rpm most likely as well in bluez-5.49-2.fc28.rpm How reproducible: every time i attempt to connect bluetooth headphones Steps to Reproduce: 1. start bluetooth service 2. attempt to connect headphones Actual results: Apr 19 20:16:50 haswell kernel: bluetoothd[5048]: segfault at 8 ip 00005629670b02d0 sp 00007ffea0f99368 error 4 in bluetoothd[56296704d000+f6000] Expected results: Apr 19 20:17:45 haswell bluetoothd[5313]: Bluetooth daemon 5.49 Apr 19 20:17:45 haswell systemd[1]: Started Bluetooth service. Additional info: Appears to be known and patch available https://www.spinics.net/lists/linux-bluetooth/msg74984.html I patched bluez-5.49-1.fc27.src.rpm with the below and can confirm the fix # cat ../0001-btd_adv_manager_refresh.patch From dc29fa5306991ce80e5479c44559119fca57d11d Mon Sep 17 00:00:00 2001 From: rpm-build <rpm-build> Date: Thu, 19 Apr 2018 19:37:13 -0400 Subject: [PATCH] 001-btd_adv_manager_refresh.patch --- src/advertising.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/advertising.c b/src/advertising.c index b976562..101b9a9 100644 --- a/src/advertising.c +++ b/src/advertising.c @@ -1173,6 +1173,8 @@ void btd_adv_manager_destroy(struct btd_adv_manager *manager) void btd_adv_manager_refresh(struct btd_adv_manager *manager) { - queue_foreach(manager->clients, (queue_foreach_func_t)refresh_adv, - NULL); + if (manager != NULL) { + queue_foreach(manager->clients, (queue_foreach_func_t)refresh_adv, + NULL); + } } -- 2.14.3 I checked also bluez-5.49-2.fc28.src.rpm and don't see this being fixed there.
*** This bug has been marked as a duplicate of bug 1567622 ***
In my version of bluez this patch has not been integrated as far as i can tell. This version is slightly closer to the upstream fix: diff --git a/src/advertising.c b/src/advertising.c index b976562c4..0cb6eac3a 100644 --- a/src/advertising.c +++ b/src/advertising.c @@ -1173,6 +1173,9 @@ void btd_adv_manager_destroy(struct btd_adv_manager *manager) void btd_adv_manager_refresh(struct btd_adv_manager *manager) { + if (!manager) + return; + queue_foreach(manager->clients, (queue_foreach_func_t)refresh_adv, NULL); } Cheers!