You are not logged in.

#1 2017-09-06 17:57:05

svartalf
Member
Registered: 2015-08-16
Posts: 6

[Solved] bluetoothd using 100% cpu

I was creating bluetooth hid module with a custom kernel and broke bluetoothd or bluetooth device itself somehow (not sure what exactly), and now bluetooth process is using 100% cpu all the time and not responding anymore. Process restarts are not helping, it just stuck.
All following logs are from the vanilla kernel and latest updates (as for post creation time), Macbook Air 2015 with arch only.

$ top -b -n 1 | grep bluetooth
  PID USER      PR  NI    VIRT    RES  %CPU %MEM     TIME+ S COMMAND
  566 root      20   0   97.6m  69.4m 100.0  0.9   1:43.32 R  `- bluetoothd
$ uname -a
Linux tardis 4.12.10-1-ARCH #1 SMP PREEMPT Wed Aug 30 12:18:42 CEST 2017 x86_64 GNU/Linux
$ pacman -Ss bluez | grep installed
extra/bluez 5.46-1 [installed]
extra/bluez-libs 5.46-1 [installed]
extra/bluez-qt 5.37.0-1 (kf5) [installed]
extra/bluez-utils 5.46-1 [installed]
community/bluez-tools 0.2.0-1 [installed]
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 05ac:0291 Apple, Inc. 
Bus 001 Device 006: ID 05ac:828f Apple, Inc. 
Bus 001 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ dmesg | grep Blue
[    4.731368] Bluetooth: Core ver 2.22
[    4.731388] Bluetooth: HCI device and connection manager initialized
[    4.731391] Bluetooth: HCI socket layer initialized
[    4.731394] Bluetooth: L2CAP socket layer initialized
[    4.731398] Bluetooth: SCO socket layer initialized
[    5.761443] Bluetooth: hci0: BCM: chip id 73 build 0845
[    5.762499] Bluetooth: hci0: BCM: product 05ac:828f
[    5.778539] Bluetooth: hci0: BCM20702B0 Generic USB Class 1 @ 20 MHz
[    6.414790] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    6.414792] Bluetooth: BNEP filters: protocol multicast
[    6.414797] Bluetooth: BNEP socket layer initialized
$ journalctl -b | grep blue
Sep 06 19:51:08 tardis bluetoothd[549]: Bluetooth daemon 5.46
Sep 06 19:51:08 tardis bluetoothd[549]: Starting SDP server
Sep 06 19:51:08 tardis bluetoothd[549]: Bluetooth management interface 1.14 initialized
Sep 06 19:51:08 tardis NetworkManager[551]: <info>  [1504716668.4653] Loaded device plugin: NMBluezManager (/usr/lib/NetworkManager/libnm-device-plugin-bluetooth.so)
Sep 06 19:51:22 tardis kdeinit5[724]: kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/bluedevil.so"
Sep 06 19:51:25 tardis kdeinit5[724]: bluedevil: Created
Sep 06 19:51:26 tardis kdeinit5[724]: bluedevil: ObexManager operational changed false
Sep 06 19:51:26 tardis dbus-daemon[693]: Activating via systemd: service name='org.bluez.obex' unit='dbus-org.bluez.obex.service'
Sep 06 19:51:26 tardis dbus-daemon[693]: Successfully activated service 'org.bluez.obex'
Sep 06 19:51:27 tardis kdeinit5[724]: bluedevil: ObexManager operational changed true
Sep 06 19:51:27 tardis kdeinit5[724]: bluedevil: ObexAgent registered
Sep 06 19:51:39 tardis sudo[1012]: svartalf : TTY=pts/1 ; PWD=/etc/netctl ; USER=root ; COMMAND=/usr/bin/systemctl stop bluetooth
Sep 06 19:51:48 tardis pulseaudio[772]: E: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Sep 06 19:51:51 tardis kdeinit5[724]: bluedevil: Error initializing manager: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
Sep 06 19:51:51 tardis obexd[893]: bluetooth: RequestProfile error: org.freedesktop.DBus.Error.NoReply, Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Sep 06 19:51:51 tardis obexd[893]: bluetooth: RequestProfile error: org.freedesktop.DBus.Error.NoReply, Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Sep 06 19:51:51 tardis obexd[893]: bluetooth: RequestProfile error: org.freedesktop.DBus.Error.NoReply, Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Sep 06 19:51:51 tardis obexd[893]: bluetooth: RequestProfile error: org.freedesktop.DBus.Error.NoReply, Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Sep 06 19:51:51 tardis obexd[893]: bluetooth: RequestProfile error: org.freedesktop.DBus.Error.NoReply, Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Sep 06 19:51:51 tardis obexd[893]: bluetooth: RequestProfile error: org.freedesktop.DBus.Error.NoReply, Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Sep 06 19:51:51 tardis obexd[893]: bluetooth: RequestProfile error: org.freedesktop.DBus.Error.NoReply, Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Sep 06 19:53:09 tardis systemd[1]: bluetooth.service: State 'stop-sigterm' timed out. Killing.
Sep 06 19:53:09 tardis systemd[1]: bluetooth.service: Killing process 549 (bluetoothd) with signal SIGKILL.
Sep 06 19:53:09 tardis systemd[1]: bluetooth.service: Main process exited, code=killed, status=9/KILL
Sep 06 19:53:09 tardis systemd[1]: bluetooth.service: Unit entered failed state.
Sep 06 19:53:09 tardis systemd[1]: bluetooth.service: Failed with result 'timeout'.
$ sudo rfkill list
0: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
1: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no

Any ideas how to unblock it?

Last edited by svartalf (2017-09-09 11:28:26)

Offline

#2 2017-09-09 08:56:35

svartalf
Member
Registered: 2015-08-16
Posts: 6

Re: [Solved] bluetoothd using 100% cpu

Well, it seems like removing /var/lib/bluetooth/<mac-address> did the thing. Still have no idea what it was. perf for bluetooth process said it just stuck on some strlen call.

Offline

#3 2017-09-09 09:08:16

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,868
Website

Re: [Solved] bluetoothd using 100% cpu

Please do not use [closed], as this denotes a locked thread. Use [solved] instead.

https://wiki.archlinux.org/index.php/Co … ow_to_post


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2017-09-09 11:28:37

svartalf
Member
Registered: 2015-08-16
Posts: 6

Re: [Solved] bluetoothd using 100% cpu

WorMzy, got it

Offline

Board footer

Powered by FluxBB