systemd-udevd consumes 100% of CPU due to hid2hci udev rule from bluez
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Ubuntu Power Consumption Project |
New
|
Undecided
|
Unassigned | ||
linux |
Expired
|
High
|
|||
bluez (Debian) |
New
|
Unknown
|
|||
bluez (Ubuntu) |
Fix Released
|
Medium
|
Dan Streetman | ||
Bionic |
Fix Released
|
Medium
|
Dan Streetman | ||
Disco |
Fix Released
|
Medium
|
Dan Streetman | ||
Eoan |
Fix Released
|
Medium
|
Dan Streetman | ||
linux (Ubuntu) |
Invalid
|
Low
|
Unassigned | ||
Bionic |
Invalid
|
Undecided
|
Unassigned | ||
Disco |
Invalid
|
Undecided
|
Unassigned | ||
Eoan |
Invalid
|
Low
|
Unassigned | ||
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bionic |
Invalid
|
Undecided
|
Unassigned | ||
Disco |
Invalid
|
Undecided
|
Unassigned | ||
Eoan |
Invalid
|
Undecided
|
Unassigned |
Bug Description
[impact]
on specific Dell systems, with a specific usb bluetooth device built-in, the udev rule 'hid2hci' provided by the 'bluez' package causes an endless loop of uevents resulting from 'bind' or 'unbind' kernel uevents. These new events were added to the kernel after the 'hid2hci' udev rule was written.
[test case]
the specific Dell system is required to be able to reproduce this, or at least the specific usb bluetooth hardware included in that system.
Reproducing this is reportedly easy, for example comment 75 indicates it happens on every boot.
When this happens, any process monitor (e.g. ps, top, etc) will show the 'udevd' process using 100% of a cpu, and 'udevadm monitor' should show repeated 'bind' and 'unbind' events as mentioned in comment 39.
[regression potential]
as this alters what kernel uevents the 'hid2hci' udev rule processes, regressions would involve the affected usb bluetooth device failing to be set up, or otherwise not processing the uevents correctly.
[other info]
this is not fixed yet upstream, as of my last check, but has been submitted upstream as mentioned in comment 95.
original description:
--
The systemd-udevd proccess consumes 100% of a thread everytime, but i'm not noticing any difference in my computer.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: systemd 237-3ubuntu6
ProcVersionSign
Uname: Linux 4.15.0-13-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu2
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Mar 29 08:52:54 2018
InstallationDate: Installed on 2018-03-05 (23 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180304)
MachineType: Dell Inc. Inspiron N5010
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
SystemdDelta:
[EXTENDED] /lib/systemd/
[EXTENDED] /lib/systemd/
2 overridden configuration files found.
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/25/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A12
dmi.board.name: 08R0GW
dmi.board.vendor: Dell Inc.
dmi.board.version: A12
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.
dmi.modalias: dmi:bvnDellInc.
dmi.product.name: Inspiron N5010
dmi.product.
dmi.sys.vendor: Dell Inc.
description: | updated |
Changed in bluez (Ubuntu): | |
status: | Incomplete → Invalid |
Changed in bluez: | |
importance: | Unknown → High |
status: | Unknown → Confirmed |
Changed in kernel: | |
importance: | Unknown → High |
status: | Unknown → Confirmed |
affects: | bluez → linux (Ubuntu) |
Changed in linux (Ubuntu): | |
importance: | High → Undecided |
status: | Confirmed → New |
importance: | Undecided → Low |
status: | New → Incomplete |
tags: | added: bios-outdated-a15 regression-potential |
tags: | added: cscc |
Changed in systemd (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in bluez (Ubuntu): | |
status: | Invalid → Confirmed |
assignee: | nobody → Dan Streetman (ddstreet) |
status: | Confirmed → In Progress |
importance: | Undecided → Medium |
Changed in linux (Ubuntu): | |
status: | Incomplete → Invalid |
Changed in bluez (Debian): | |
status: | Unknown → New |
summary: |
- systemd-udevd consumes 100% of CPU + systemd-udevd consumes 100% of CPU due to hid2hci udev rule from bluez |
Changed in systemd (Ubuntu Disco): | |
status: | New → Invalid |
Changed in systemd (Ubuntu Bionic): | |
status: | New → Invalid |
Changed in linux (Ubuntu Disco): | |
status: | New → Invalid |
Changed in linux (Ubuntu Bionic): | |
status: | New → Invalid |
Changed in bluez (Ubuntu Disco): | |
assignee: | nobody → Dan Streetman (ddstreet) |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in bluez (Ubuntu Bionic): | |
assignee: | nobody → Dan Streetman (ddstreet) |
importance: | Undecided → Medium |
status: | New → In Progress |
description: | updated |
tags: |
added: verification-done-disco removed: verification-needed-disco |
tags: | added: ubuntu-certified |
Changed in kernel: | |
status: | Confirmed → Expired |
Created attachment 274593
dmesg
Hi,
I'm currently running ubuntu 18.04 with a 4.15 kernel and i can observe very high cpu usage to the systemd-udevd deamon.
removing the rule : Class}= ="03", ATTR{bInterface SubClass} =="01", ATTR{bInterface Protocol} =="02", \ bDeviceClass} =="00", ATTRS{idVendor} =="413c" , ATTRS{bmAttribu tes}==" e0", \ SWITCH} ="1"
ATTR{bInterface
ATTRS{
RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_
Solved the high CPU usage eventhough my bluetooth card is not available anymore (as not in hci mode)
It seems that the command hid2hci creates a bind/unbind loop in udev that is looping trying to set the device in hci mode. (that what udevadm monitor seems to show, looping from bind to unbind for the device)
I suspect a0085f2510e8976 614ad8f766b2094 48b385492f introduced a regression (i have not tried to revert it yet).
Please not that there also seem to be a bug in hid2hci.c from bluez l148 :
if (err == 0) {
err = -1;
errno = EALREADY;
}
Correcting this and recompile bluez desn't solve the issue as cpu usage remains very high.
Using a 4.13 kernel result in a normal CPU usage, this seems a regression in 4.14.
Other people seems to have the same issue, here is a bug report related to this : /dev.solus- project. com/T5224
https:/
Thanks a lot for your support,
Mathieu Tournier