Bug 1789108 - fwupd uses constantly ~2.5% of cpu time
Summary: fwupd uses constantly ~2.5% of cpu time
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: fwupd
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-08 18:46 UTC by Matthias Runge
Modified: 2020-09-14 16:06 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-14 16:06:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
gdb output (11.06 KB, text/plain)
2020-01-27 08:05 UTC, Chris Murphy
no flags Details

Description Matthias Runge 2020-01-08 18:46:41 UTC
Description of problem:

with latest update on f31, I see fwupd 1.3.6-1.fc31 uses a good amount of cpu time, even when it's not doing anything
 top shows it uses ~ 2.3% of CPU time, and within 12 hours today, it used 15 minutes in total

[root@hilbert ~]# rpm -q fwupd
fwupd-1.3.6-1.fc31.x86_64
[root@hilbert ~]# journalctl -u fwupd -f

-- Reboot --
Jan 08 07:53:55 hilbert.berg.ol systemd[1]: Starting Firmware update daemon...
Jan 08 07:53:56 hilbert.berg.ol systemd[1]: Started Firmware update daemon.
Jan 08 19:38:00 hilbert.berg.ol systemd[1]: Stopping Firmware update daemon...
Jan 08 19:38:00 hilbert.berg.ol systemd[1]: fwupd.service: Succeeded.
Jan 08 19:38:00 hilbert.berg.ol systemd[1]: Stopped Firmware update daemon.
Jan 08 19:38:00 hilbert.berg.ol systemd[1]: fwupd.service: Consumed 15min 13.482s CPU time.


Version-Release number of selected component (if applicable):
fwupd-1.3.6-1.fc31.x86_64



I don't recall it using that much CPU in earlier versions.

Comment 1 Albert Flügel 2020-01-18 12:55:28 UTC
Indeed i'm observing this phenomenon, too, and consider this a noticable waste of CPU resources.
Before, the fwupd was polling an eventfd and an inotifyfd with a timeout of 3 seconds. Now it polls an USB related filedesciptor with a timeout of 1 ms. The CPU consumption is about 75 % in system space (the poll) and 25 % in user space. I really wonder, if this high polling frequency is really necessary. A poll returns on a relevant event on a filedescriptor. To timeout a poll makes sense, if other conditions need to be checked between polling the filedescriptors. I encourage the developers to ask themselves, if this is really necessary every millisecond.
In the meantime i'll disable fwupd. It did not run on Fedora 30. I wonder, if i'll be missing it on 31.

Comment 2 grant.brown73@gmail.com 2020-01-22 02:34:26 UTC
I am also experiencing this issue on Fedora 31 on a Late 2011 Macbook Pro - I wondered at first if it was some sort of compromise. 

Here are the last few days of relevant journalctl entries:

Jan 18 09:10:04 localhost.localdomain gnome-software[2480]: not handling error download-failed for action refresh: failed to download https://cdn.fwupd.org/downloads/firmware.xml.gz.asc: Cannot resolve hostname
Jan 18 09:10:51 localhost.localdomain systemd[1]: fwupd.service: Succeeded.
Jan 18 09:10:51 localhost.localdomain systemd[1]: fwupd.service: Consumed 53min 54.364s CPU time.
Jan 18 09:10:51 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=fwupd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 18 09:11:36 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=fwupd-offline-update comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 18 09:11:36 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=fwupd-offline-update comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 18 09:11:36 localhost.localdomain systemd[1]: fwupd-offline-update.service: Succeeded.
Jan 18 09:15:30 localhost.localdomain gnome-software[7016]: enabled plugins: desktop-categories, fwupd, os-release, packagekit, packagekit-local, packagekit-offline, packagekit-proxy, packagekit-refresh, packagekit-upgrade, packagekit-url-to-app, shell-extensions, appstream, fedora-pkgdb-collections, desktop-menu-path, epiphany, fedora_langpacks, flatpak, hardcoded-blacklist, hardcoded-featured, hardcoded-popular, modalias, packagekit-refine, rewrite-resource, odrs, packagekit-history, provenance, repos, systemd-updates, generic-updates, packagekit-refine-repos, provenance-license, icons, key-colors, key-colors-metadata
Jan 18 09:15:30 localhost.localdomain fwupd[7297]: 15:15:30:0953 FuPluginUefi         SMBIOS BIOS Characteristics Extension Byte 2 is invalid -- UEFI Specification is unsupported, but /sys/firmware/efi exists: System does not support UEFI mode
Jan 18 09:15:30 localhost.localdomain fwupd[7297]: 15:15:30:0956 FuPluginThunderbolt  /sys/devices/pci0000:00/0000:00:01.1/0000:05:00.0/0000:06:00.0/0000:07:00.0/domain0/0-0 is in safe mode --  VID/DID will need to be set by another plugin
Jan 18 09:15:30 localhost.localdomain fwupd[7297]: 15:15:30:0968 FuPluginUefi         Error opening directory “/sys/firmware/efi/esrt/entries”: No such file or directory
Jan 18 09:15:31 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=fwupd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 19 10:31:13 localhost.localdomain gnome-software[7016]: not handling error download-failed for action refresh: failed to download https://cdn.fwupd.org/downloads/firmware.xml.gz.asc: Cannot resolve hostname
Jan 19 10:31:13 localhost.localdomain gnome-software[7016]: not handling error download-failed for action refresh: failed to download https://cdn.fwupd.org/downloads/firmware.xml.gz.asc: Cannot resolve hostname
Jan 19 13:37:58 localhost.localdomain fwupd[7297]: 19:37:58:0195 FuPluginDfu          truncated DFU interface data, no bcdDFUVersion
Jan 21 15:40:24 localhost.localdomain gnome-software[7016]: not handling error download-failed for action refresh: failed to download https://cdn.fwupd.org/downloads/firmware.xml.gz.asc: Cannot resolve hostname
Jan 21 15:40:24 localhost.localdomain gnome-software[7016]: not handling error download-failed for action refresh: failed to download https://cdn.fwupd.org/downloads/firmware.xml.gz.asc: Cannot resolve hostname

Comment 3 Sébastien 2020-01-23 01:04:14 UTC
Same issue here. It looks like it is stuck on an endless loop on `poll`.

$ sudo strace -fp 2724
Linux LAPTOP-RJKFH31C.lan 5.4.10-200.fc31.x86_64 #1 SMP Thu Jan 9 19:58:12 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


$ ps -elf|grep fwupd
4 S root        2724       1  2  80   0 - 141190 -     01:52 ?        00:00:14 /usr/libexec/fwupd/fwupd

$ sudo strace -fp 2724

strace: Process 2724 attached with 5 threads
[pid  2730] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid  2729] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid  2728] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid  2726] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid  2724] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid  2729] <... restart_syscall resumed>) = 0
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)
[pid  2729] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1^Cstrace: Process 2724 detached
strace: Process 2726 detached
strace: Process 2728 detached
strace: Process 2729 detached
 <detached ...>
strace: Process 2730 detached

Comment 4 Wayne 2020-01-23 07:56:35 UTC
The issue has been recognized upstream:
https://github.com/fwupd/fwupd/issues/1712
And fixed in libgusb:
https://github.com/hughsie/libgusb/pull/25

The patch is fairly simple, maybe Fedora could provide a patched version of the libgusb package?
(There is no new libgusb release yet.)

Comment 5 Albert Flügel 2020-01-25 23:24:14 UTC
if anyone is interested: i uninstalled fwupd with: rpm -e --nodeps fwupd
Did not observe any problems, though rpm reported a dependency of gnome

Comment 6 Sébastien 2020-01-26 23:45:59 UTC
Note that instead of removing it, you can also stop and disable the service:
$ sudo systemctl stop fwupd
$ sudo systemctl disable fwupd

Then, to reenable it later, when the issue is fixed:
$ sudo systemctl enable fwupd

Comment 7 Chris Murphy 2020-01-27 08:05:07 UTC
Created attachment 1655616 [details]
gdb output

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                
   1794 root      20   0  641296  34824  19812 S   3.6   0.4   1:28.15 fwupd 

[chris@flap ~]$ sudo strace -p 1794
[sudo] password for chris: 
strace: Process 1794 attached
restart_syscall(<... resuming interrupted read ...>^Cstrace: Process 1794 detached
 <detached ...>

attaching gdb stack trace, but the problem doesn't happen when gdb is attached to the fwupd process, when I quit gdb, it resumes.

Comment 8 Albert Flügel 2020-01-27 17:11:20 UTC
Comment #6 is not true. I stopped and disabled fwupd, but after next boot it ran again, probably due to dependencies.

Comment 9 Sébastien 2020-01-27 18:16:14 UTC
Comment #8 is correct! And I thought I was the admin of my system!

I don't like to remove it because gnome depends on it.
So instead, I commented it out in /usr/lib/systemd/system/fwupd.service like this:
#ExecStart=/usr/libexec/fwupd/fwupd
ExecStart=/bin/echo


comment #7 should do the test again with `strace -fp`.
The option -f is required because it is a child process that enters a busy loop, see pids below:

$ sudo strace -fp 20005
strace: Process 20005 attached with 5 threads
[pid 20017] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 20015] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 20014] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 20011] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 20005] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 20015] <... restart_syscall resumed>) = 0
[pid 20015] poll([{fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 2, 1) = 0 (Timeout)

Comment 10 Chris Murphy 2020-01-27 18:24:22 UTC
fwupd is a static service, so you can't disabled it, but you can mask it: systemctl mask fwupd.service. This is persistent though, any reset to systemd unit presets has no affect on masked units. You have to manually unmask it.

Comment 11 rhbz 2020-02-01 15:56:36 UTC
This is fixed by libgusb update: https://bodhi.fedoraproject.org/updates/FEDORA-2020-bd3bcad200

Comment 12 Ben Cotton 2020-02-11 17:21:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 13 Richard Hughes 2020-09-14 16:06:11 UTC
> This is fixed by libgusb update

Indeed.


Note You need to log in before you can comment on or make changes to this bug.