systemd-udev cause high cpu load after upgrade to bionic
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Expired
|
High
|
|||
bluez (Debian) |
New
|
Unknown
|
|||
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
After upgraded from xenial to bionic (kernel 4.15.0-20) systemd-udevd runs with high cpu load in 2 instances (50%, 15%) on Dell Precision M6500 when wlan switch will be enabled.
With xenial this problem did't happen and Dell bluetooth & wifi (b43) are working.
After some research I found that /var/log/syslog gets filled with a lot of messages (see log sample below).
If I modify /lib/udev/
My modification for the rule just was (just as proof):
--- before ---
ATTR{bInterface
ATTRS{
RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_
--- end before ---
--- after ---
ATTR{bInterface
ATTRS{
RUN+="/bin/sh", ENV{HID2HCI_
--- end after ---
If you need some experiment or testing I can do (compiling software is not a problem, I'm a developer).
lsusb:
Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 058: ID 413c:8162 Dell Computer Corp. Integrated Touchpad [Synaptics]
Bus 001 Device 057: ID 413c:8161 Dell Computer Corp. Integrated Keyboard
Bus 001 Device 056: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 004: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 001 Device 003: ID 05ca:1815 Ricoh Co., Ltd
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lspci:
Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 058: ID 413c:8162 Dell Computer Corp. Integrated Touchpad [Synaptics]
Bus 001 Device 057: ID 413c:8161 Dell Computer Corp. Integrated Keyboard
Bus 001 Device 056: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 004: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 001 Device 003: ID 05ca:1815 Ricoh Co., Ltd
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@precision:~# lspci
00:00.0 Host bridge: Intel Corporation Core Processor DMI (rev 11)
00:03.0 PCI bridge: Intel Corporation Core Processor PCI Express Root Port 1 (rev 11)
00:08.0 System peripheral: Intel Corporation Core Processor System Management Registers (rev 11)
00:08.1 System peripheral: Intel Corporation Core Processor Semaphore and Scratchpad Registers (rev 11)
00:08.2 System peripheral: Intel Corporation Core Processor System Control and Status Registers (rev 11)
00:08.3 System peripheral: Intel Corporation Core Processor Miscellaneous Registers (rev 11)
00:10.0 System peripheral: Intel Corporation Core Processor QPI Link (rev 11)
00:10.1 System peripheral: Intel Corporation Core Processor QPI Routing and Protocol Registers (rev 11)
00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05)
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05)
00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 05)
00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 (rev 05)
00:1c.4 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 5 (rev 05)
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 05)
00:1c.6 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 7 (rev 05)
00:1c.7 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 8 (rev 05)
00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)
00:1f.0 ISA bridge: Intel Corporation PM55 Chipset LPC Interface Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation G92GLM [Quadro FX 2800M] (rev a2)
03:01.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
03:01.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller
03:01.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
03:01.3 SD Host controller: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller
09:00.0 Ethernet controller: Broadcom Limited NetXtreme BCM5761e Gigabit Ethernet PCIe (rev 10)
0c:00.0 Network controller: Broadcom Limited BCM4322 802.11a/b/g/n Wireless LAN Controller (rev 01)
11:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03)
3f:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-Core Registers (rev 04)
3f:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 04)
3f:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 04)
3f:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 04)
3f:03.0 Host bridge: Intel Corporation Core Processor Integrated Memory Controller (rev 04)
3f:03.1 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Target Address Decoder (rev 04)
3f:03.4 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Test Registers (rev 04)
3f:04.0 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Control Registers (rev 04)
3f:04.1 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Address Registers (rev 04)
3f:04.2 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Rank Registers (rev 04)
3f:04.3 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Thermal Control Registers (rev 04)
3f:05.0 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Control Registers (rev 04)
3f:05.1 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Address Registers (rev 04)
3f:05.2 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Rank Registers (rev 04)
3f:05.3 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Thermal Control Registers (rev 04)
/var/log/syslog:
Apr 30 10:27:40 precision upowerd[2464]: unhandled action 'bind' on /sys/devices/
Apr 30 10:27:40 precision upowerd[2464]: unhandled action 'bind' on /sys/devices/
Apr 30 10:27:40 precision upowerd[2464]: unhandled action 'bind' on /sys/devices/
Apr 30 10:27:40 precision systemd-
Apr 30 10:27:40 precision upowerd[2464]: unhandled action 'bind' on /sys/devices/
Apr 30 10:27:40 precision systemd-
Apr 30 10:27:40 precision upowerd[2464]: unhandled action 'bind' on /sys/devices/
Apr 30 10:27:40 precision upowerd[2464]: unhandled action 'bind' on /sys/devices/
Apr 30 10:27:40 precision upowerd[2464]: unhandled action 'unbind' on /sys/devices/
Apr 30 10:27:40 precision systemd-
Apr 30 10:27:40 precision upowerd[2464]: unhandled action 'unbind' on /sys/devices/
Apr 30 10:27:40 precision systemd-
Apr 30 10:27:40 precision upowerd[2464]: unhandled action 'bind' on /sys/devices/
Apr 30 10:27:40 precision systemd-
Apr 30 10:27:40 precision upowerd[2464]: unhandled action 'unbind' on /sys/devices/
Apr 30 10:27:40 precision systemd-
Apr 30 10:27:40 precision upowerd[2464]: unhandled action 'bind' on /sys/devices/
Apr 30 10:27:40 precision systemd-
Apr 30 10:27:40 precision upowerd[2464]: unhandled action 'unbind' on /sys/devices/
Apr 30 10:27:41 precision systemd-
Apr 30 10:27:41 precision upowerd[2464]: unhandled action 'bind' on /sys/devices/
Changed in udev: | |
importance: | Unknown → High |
status: | Unknown → Confirmed |
Changed in bluez (Debian): | |
status: | Unknown → New |
affects: | udev (Ubuntu) → systemd (Ubuntu) |
affects: | udev → linux |
Changed in linux: | |
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