bluetoothd crashed with SIGILL in agent_get() from adapter_register()

Bug #1767124 reported by Bearsh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Undecided
Unassigned

Bug Description

systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: failed (Result: core-dump) since Don 2018-04-26 16:16:36 CEST; 2min 25s ago
     Docs: man:bluetoothd(8)
  Process: 1458 ExecStart=/usr/lib/bluetooth/bluetoothd (code=dumped, signal=ILL)
 Main PID: 1458 (code=dumped, signal=ILL)
   Status: "Running"

Apr 26 16:16:35 tiger systemd[1]: Starting Bluetooth service...
Apr 26 16:16:35 tiger bluetoothd[1458]: Bluetooth daemon 5.37
Apr 26 16:16:35 tiger systemd[1]: Started Bluetooth service.
Apr 26 16:16:35 tiger bluetoothd[1458]: Starting SDP server
Apr 26 16:16:35 tiger bluetoothd[1458]: Bluetooth management interface 1.14 initialized
Apr 26 16:16:36 tiger systemd[1]: bluetooth.service: Main process exited, code=dumped, status=4/ILL
Apr 26 16:16:36 tiger systemd[1]: bluetooth.service: Unit entered failed state.
Apr 26 16:16:36 tiger systemd[1]: bluetooth.service: Failed with result 'core-dump'.
Apr 26 16:16:36 tiger systemd[1]: bluetooth.service: Start request repeated too quickly.
Apr 26 16:16:36 tiger systemd[1]: Failed to start Bluetooth service.

sudo gdb /usr/lib/bluetooth/bluetoothd
...
Program received signal SIGILL, Illegal instruction.
agent_get (owner=owner@entry=0x0) at src/agent.c:267
267 src/agent.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0 agent_get (owner=owner@entry=0x0) at src/agent.c:267
#1 0x00005555555d861b in adapter_register (adapter=0x55555587fed0) at src/adapter.c:7434
#2 read_info_complete (status=<optimized out>, length=<optimized out>, param=<optimized out>, user_data=0x55555587fed0) at src/adapter.c:7897
#3 0x0000555555602656 in request_complete (mgmt=mgmt@entry=0x555555879ef0, status=<optimized out>, opcode=opcode@entry=4, index=index@entry=0, length=length@entry=280, param=0x555555879f79) at src/shared/mgmt.c:261
#4 0x000055555560311c in can_read_data (io=<optimized out>, user_data=0x555555879ef0) at src/shared/mgmt.c:353
#5 0x000055555560ee25 in watch_callback (channel=<optimized out>, cond=<optimized out>, user_data=<optimized out>) at src/shared/io-glib.c:170
#6 0x00007ffff7b1004a in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7 0x00007ffff7b103f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8 0x00007ffff7b10712 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9 0x000055555557009d in main (argc=1, argv=0x7fffffffe658) at src/main.c:687

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I can't seem to find any existing reports of this crash. All I can tell is that it looks like Ubuntu 16.04...

Please help us to debug it further by:

1. Applying the workaround from bug 994921.

2. Look in /var/crash for .crash files and when found run:
   ubuntu-bug /var/crash/YOURFILE.crash

3. Tell us here the ID of the newly-created bug.

tags: added: xenial
summary: - bluetoothd crashed with SIGILL
+ bluetoothd crashed with SIGILL in agent_get() from adapter_register()
Changed in bluez (Ubuntu):
status: New → Incomplete
Revision history for this message
Bearsh (bearsh) wrote :

for whatever reason 'ubuntu-bug /var/crash/YOURFILE.crash' doesn't provide an URL or open a browser window :(
I'll attache the .cash file here

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Download full text (5.2 KiB)

That would be because you failed to apply a workaround for bug 994921. It might require some tweaking :/

But lucky for you we did get enough info from the crash file:

Stacktrace:
 #0 agent_get (owner=owner@entry=0x0) at src/agent.c:267
         agent = <optimized out>
 #1 0x000055922049561b in adapter_register (adapter=0x559220a77c20) at src/adapter.c:7434
         agent = <optimized out>
         db = <optimized out>
 #2 read_info_complete (status=<optimized out>, length=<optimized out>, param=<optimized out>, user_data=0x559220a77c20) at src/adapter.c:7897
         adapter = 0x559220a77c20
         rp = <optimized out>
         missing_settings = <optimized out>
         __func__ = "read_info_complete"
 #3 0x00005592204bf656 in request_complete (mgmt=mgmt@entry=0x559220a71d90, status=<optimized out>, opcode=opcode@entry=4, index=index@entry=0, length=length@entry=280, param=0x559220a72d29) at src/shared/mgmt.c:261
         match = {opcode = 4, index = 0}
         request = 0x559220a72fb0
 #4 0x00005592204c011c in can_read_data (io=<optimized out>, user_data=0x559220a71d90) at src/shared/mgmt.c:353
         hdr = <optimized out>
         cc = 0x559220a72d26
         cs = <optimized out>
         opcode = 4
         event = <optimized out>
         index = <optimized out>
         length = 283
 #5 0x00005592204cbe25 in watch_callback (channel=<optimized out>, cond=<optimized out>, user_data=<optimized out>) at src/shared/io-glib.c:170
         watch = <optimized out>
         result = <optimized out>
         destroy = <optimized out>
 #6 0x00007f310746b04a in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 No symbol table info available.
 #7 0x00007f310746b3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 No symbol table info available.
 #8 0x00007f310746b712 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 No symbol table info available.
 #9 0x000055922042d09d in main (argc=1, argv=0x7ffe83a0edb8) at src/main.c:687
         context = <optimized out>
         err = 0x0
         sdp_flags = <optimized out>
         gdbus_flags = <optimized out>
         watchdog = 0
         watchdog_usec = <optimized out>
         __func__ = "main"
StacktraceAddressSignature: /usr/lib/bluetooth/bluetoothd:4:/usr/lib/bluetooth/bluetoothd+8461b:/usr/lib/bluetooth/bluetoothd+ae656:/usr/lib/bluetooth/bluetoothd+af11c:/usr/lib/bluetooth/bluetoothd+bae25:/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2+4a04a:/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2+4a3f0:/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2+4a712:/usr/lib/bluetooth/bluetoothd+1c09d
StacktraceTop:
 agent_get (owner=owner@entry=0x0) at src/agent.c:267
 adapter_register (adapter=0x559220a77c20) at src/adapter.c:7434
 read_info_complete (status=<optimized out>, length=<optimized out>, param=<optimized out>, user_data=0x559220a77c20) at src/adapter.c:7897
 request_complete (mgmt=mgmt@entry=0x559220a71d90, status=<optimized out>, opcode=opcode@entry=4, index=index@entry=0, length=length@entry=280, param=0x559220a72d29) at src/shared/mgmt.c:261
 can_read_data (io=<optimized out>, user_data=0x559220a71d90) at src/shared/mgmt.c:353
Tags: xenial third-...

Read more...

Changed in bluez (Ubuntu):
status: Incomplete → New
Revision history for this message
Bearsh (bearsh) wrote :

and with the workaround from bug 994921, it refuses to report the bug because it's not an official kde package (well for sure it is not...) and I have to remove some third party packages...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

In that case please also send us your package listing (dpkg -l).

Changed in bluez (Ubuntu):
status: New → Incomplete
Revision history for this message
Bearsh (bearsh) wrote :

here we go...

Changed in bluez (Ubuntu):
status: Incomplete → New
Revision history for this message
Bearsh (bearsh) wrote :

any news on this?
is there something I can do to help?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I can't find any other reports of this crash globally. But also the stack in comment #3 may be wrong.

Please upgrade to Ubuntu 18.04 if you can. Otherwise there is little we can do (also because the upstream BlueZ developers won't want to help while you're on an old version).

Revision history for this message
Bearsh (bearsh) wrote :

in any case someone faces the same problem, installing bluez_5.46-0ubuntu3_amd64.deb from artful (together with libreadline7) solved the problem for me.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. We call that "Fix Released" if any release contains a fix.

In order to get a fix into 16.04 though, we would need to know exactly which code change between versions 5.37 and 5.46 fixed it.

Changed in bluez (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers