Bug 1086731 - bluez: Segfault in btd_adv_manager_refresh, bluetooth service fails
bluez: Segfault in btd_adv_manager_refresh, bluetooth service fails
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Other Other
: P5 - None : Major (vote)
: ---
Assigned To: Stefan Seyfried
E-mail List
Depends on:
  Show dependency treegraph
Reported: 2018-03-24 11:29 UTC by Antoine Belvire
Modified: 2018-03-30 18:57 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---

Output of hwinfo --bluetooth (681 bytes, text/plain)
2018-03-24 11:29 UTC, Antoine Belvire
Proposed patch (2.32 KB, patch)
2018-03-25 12:49 UTC, Antoine Belvire
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Belvire 2018-03-24 11:29:58 UTC
Created attachment 764838 [details]
Output of hwinfo --bluetooth

Since snapshot 20180319 and bluez 5.49, bluetooth service dumps core when trying to discover bluetooth devices via GNOME's ui.

Core was generated by `/usr/lib/bluetooth/bluetoothd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  btd_adv_manager_refresh (manager=0x0) at src/advertising.c:1176
1176		queue_foreach(manager->clients, (queue_foreach_func_t)refresh_adv,
(gdb) bt
#0  btd_adv_manager_refresh (manager=0x0) at src/advertising.c:1176
#1  0x0000556fe45fcb02 in settings_changed (settings=<optimized out>, 
    adapter=0x556fe53f7c70) at src/adapter.c:543
#2  new_settings_callback (index=<optimized out>, length=<optimized out>, 
    param=<optimized out>, user_data=0x556fe53f7c70) at src/adapter.c:573
#3  0x0000556fe462c278 in request_complete (mgmt=mgmt@entry=0x556fe53f20c0, 
    status=<optimized out>, opcode=opcode@entry=7, index=index@entry=0, 
    length=length@entry=4, param=0x556fe53eb5f9) at src/shared/mgmt.c:261
#4  0x0000556fe462cd9d in can_read_data (io=<optimized out>, 
    user_data=0x556fe53f20c0) at src/shared/mgmt.c:353
#5  0x0000556fe46396e3 in watch_callback (channel=<optimized out>, 
    cond=<optimized out>, user_data=<optimized out>)
    at src/shared/io-glib.c:170
#6  0x00007fe351c980e5 in g_main_context_dispatch ()
   from /usr/lib64/libglib-2.0.so.0
#7  0x00007fe351c984b0 in ?? () from /usr/lib64/libglib-2.0.so.0
#8  0x00007fe351c987c2 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#9  0x0000556fe45abc75 in main (argc=<optimized out>, argv=<optimized out>)
    at src/main.c:770

Someone reported a similar case upstream: https://www.spinics.net/lists/linux-bluetooth/msg74982.html.
Comment 1 Antoine Belvire 2018-03-25 12:49:03 UTC
Created attachment 764857 [details]
Proposed patch
Comment 2 Antoine Belvire 2018-03-26 06:04:43 UTC
Comment 3 Stefan Seyfried 2018-03-26 06:10:58 UTC

Comment 4 Swamp Workflow Management 2018-03-26 06:50:05 UTC
This is an autogenerated message for OBS integration:
This bug (1086731) was mentioned in
https://build.opensuse.org/request/show/590957 Factory / bluez
Comment 5 Antoine Belvire 2018-03-30 18:57:41 UTC
Accepted in Factory => resolved fixed.

Patch accepted by upstream too, so it will be included in the next release of bluez: https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=2c3bba7b38be03834162e34069156f1fd49f0528