FS#62543 - [systemd] Running "udevadm trigger" causes high cpu usage for a few seconds

Attached to Project: Arch Linux
Opened by Mthw (jari_45) - Saturday, 04 May 2019, 10:08 GMT
Last edited by Toolybird (Toolybird) - Monday, 25 September 2023, 08:21 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Christian Hesse (eworm)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

... even a mouse cursor moves very laggy.

Steps to reproduce:

1. Run "udevadm trigger"
2. While it is running mouse cursor barely moves
3. Even after it is finished, there is high CPU usage, htop shows processes using cpu a lot are these: Xorg, Upowerd, plasmashell and Kglobalaccel5

This bug was originally found while using KDE Partitionmanager, but all commands except for this one cause no issues, so it is not a bug in KDE Partitionmanager.

I attached a log from "journalctl -xb | grep udev" after running "udevadm trigger" but I don't know what to look for. (>5000 lines)

This bug is also discused here: https://bugs.kde.org/show_bug.cgi?id=407191
   txt.txt (641.9 KiB)
This task depends upon

Closed by  Toolybird (Toolybird)
Monday, 25 September 2023, 08:21 GMT
Reason for closing:  Upstream
Additional comments about closing:  Old and stale. If still an issue, please report upstream, because it doesn't seem like a packaging issue.
Comment by Dave Reisner (falconindy) - Saturday, 04 May 2019, 13:38 GMT
Do you always run udev with debug logging?

To be clear, 'udevadm trigger' does little more than write to some "files" in sysfs. What happens after is a result of udev rule processing.
Comment by Mthw (jari_45) - Saturday, 04 May 2019, 14:24 GMT
No, I don't always run udev with debug logging, I was advised to do so to find out what might be the problem.
Comment by Mthw (jari_45) - Saturday, 04 May 2019, 15:12 GMT
To be also clear, I am not complaining about 'udevadm trigger' writing a lot of stuff into the log. I am saying, that what 'udevadm trigger' does, uses so much CPU, that my mouse cursor barely moves.
Comment by Dave Reisner (falconindy) - Saturday, 04 May 2019, 17:54 GMT
I understood that, but I'm stating that it isn't udevadm trigger which causes your CPU usage, it's whatever reacts to device events.
Comment by Mthw (jari_45) - Saturday, 04 May 2019, 18:08 GMT
So the issue is in one of these: Xorg, Upowerd, plasmashell or Kglobalaccel5, right? Since using Wayland session reduces this problem to barely noticable, I would say it's a bug in Xorg, but Upowerd still has high CPU usage even on Wayland, so maybe also Upower (or only Upower)? What can I do now to find the source of the problem?
Comment by Andrius Štikonas (stikonas) - Wednesday, 08 May 2019, 19:59 GMT
Maybe try to move suspicious udev rules out of udev rules.d folder. That way you can try to isolate which udev rule(s) causes problem.
Comment by Mthw (jari_45) - Thursday, 09 May 2019, 03:49 GMT
Folder /etc/udev/rules.d/ is empty, /etc/udev/hwdb.d/ is also empty and /etc/udev/udev.conf contains only comments.
Comment by Andrius Štikonas (stikonas) - Thursday, 09 May 2019, 08:15 GMT
There is still system udev folder. Try with rules in /lib/udev/rules.d and see if removing some of them helps.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...