FS#57939 - [bluez] bluez 5.49.1 segfault when trying to activate visibility

Attached to Project: Arch Linux
Opened by Francisco Gonzalez (gzmorell) - Saturday, 24 March 2018, 18:09 GMT
Last edited by Andreas Radke (AndyRTR) - Thursday, 31 January 2019, 21:12 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Unable to activate bluetooth device visibility in Lenovo T420

Additional info:
* package version(s)
bluez 5.49.1

The problem seems to be described here:
https://www.spinics.net/lists/linux-bluetooth/msg74984.html
It seems to affect to bluetooth adapters with no BLE which is the case of mine.
Applying the patch recommended the issue is solved:

* config and/or log files etc.
--- a/src/advertising.c 2018-03-10 07:37:07.000000000 -0800
+++ b/src/advertising.c 2018-03-22 13:57:17.229968345 -0700
@@ -1171,8 +1171,10 @@ void btd_adv_manager_destroy(struct btd_
manager_destroy(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);
+ }
}

Steps to reproduce:
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Thursday, 31 January 2019, 21:12 GMT
Reason for closing:  Fixed
Comment by Andreas Radke (AndyRTR) - Saturday, 24 March 2018, 18:28 GMT
That patch has not landed in in upstream git so far it seems.
Comment by Andy Botting (andybz) - Monday, 26 March 2018, 00:57 GMT
I can confirm the patch fixes the segfaults I've been seeing.
Comment by Andreas Radke (AndyRTR) - Monday, 26 March 2018, 17:38 GMT
Applying that single patch make the test suite hang at unit/test-gatt. I guess it's not enough to only apply that patch.
Let's wait for a proper fix that goes upstream.
Comment by Andreas Radke (AndyRTR) - Wednesday, 30 January 2019, 11:37 GMT
How's status with recent updates?
Comment by Andy Botting (andybz) - Wednesday, 30 January 2019, 21:41 GMT
Working fine on 5.50-6

Loading...