Bug 1812176

Summary: dmeventd hogs CPU
Product: [Fedora] Fedora Reporter: Jan Pokorný [poki] <jpokorny>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: high    
Version: rawhideCC: agk, anprice, bmarzins, bmr, cfeist, heinzm, jbrassow, jonathan, kzak, leonid, lvm-team, mcsontos, mdaenzer, msnitzer, prajnoha, prockai, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.03.09-1.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-01 00:18:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Pokorný [poki] 2020-03-10 17:18:06 UTC
After recent update with my Rawhide install, I've noticed that
the laptop's fan has likely some good reason to go full speed over
a prolonged period of time, which made me to investigate the
cause.  Interestingly, the offender is said "/usr/sbin/dmeventd -f"
process:

# uptime; top -b -n 1 -w 120 -H | head -n3
> 18:17:02 up  3:32,  1 user,  load average: 2.45, 2.41, 2.39
>
>    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
>   1010 root      20   0   80932  25556   9536 R  99.9   0.1 210:59.28 dmeventd

strace sample:

# strace -p $(pidof dmeventd)
> strace: Process 1002 attached
> select(5, [4], NULL, NULL, {tv_sec=0, tv_usec=576585}) = 0 (Timeout)
> select(5, [4], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
> select(5, [4], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
> select(5, [4], NULL, NULL, {tv_sec=1, tv_usec=0}^Cstrace: Process 1002 detached
>  <detached ...>

Note: might be symptom of [bug 1809826], regretfully, that report
      is not specific about the symptoms observed (just "working
      improperly")

$ rpm -q $(rpm -qf /usr/sbin/dmeventd)
> device-mapper-event-1.02.167-2.fc32.x86_64

Comment 1 Jan Pokorný [poki] 2020-03-10 18:21:06 UTC
# gstack $(pidof dmeventd)
> Thread 3 (Thread 0x7f6730fd2700 (LWP 1006)):
> #0  0x000055835808c97c in _timeout_thread ()
> #1  0x00007f6731ce0462 in start_thread () from /lib64/libpthread.so.0
> #2  0x00007f6731b95b53 in clone () from /lib64/libc.so.6
> Thread 2 (Thread 0x7f673101f700 (LWP 1005)):
> #0  0x00007f6731b8c51b in ioctl () from /lib64/libc.so.6
> #1  0x00007f6731cb94dd in dm_task_run () from /lib64/libdevmapper.so.1.02
> #2  0x000055835808cea0 in _monitor_thread ()
> #3  0x00007f6731ce0462 in start_thread () from /lib64/libpthread.so.0
> #4  0x00007f6731b95b53 in clone () from /lib64/libc.so.6
> Thread 1 (Thread 0x7f6731859800 (LWP 1000)):
> #0  0x00007f6731b8d15b in select () from /lib64/libc.so.6
> #1  0x000055835808bc18 in _client_read ()
> #2  0x000055835808a751 in main ()

Comment 2 Zdenek Kabelac 2020-03-11 09:41:04 UTC
Fixed with 1809826.


Minor 'cpu hog' issue also covered with:

https://www.redhat.com/archives/lvm-devel/2020-March/msg00011.html

Comment 3 Leonid Podolny 2020-03-18 14:25:26 UTC
Happens in F32 Beta.

Comment 4 Michel Dänzer 2020-03-26 15:14:54 UTC
(In reply to Leonid Podolny from comment #3)
> Happens in F32 Beta.

I'm hitting this on F32 beta as well, should the version field be updated accordingly?

Comment 5 Marian Csontos 2020-03-26 17:57:18 UTC
Should be fixed: https://bodhi.fedoraproject.org/updates/FEDORA-2020-31b18adbb1

Comment 6 Fedora Update System 2020-03-26 18:09:06 UTC
FEDORA-2020-31b18adbb1 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-31b18adbb1

Comment 7 Fedora Update System 2020-03-27 15:58:37 UTC
FEDORA-2020-31b18adbb1 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-31b18adbb1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-31b18adbb1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Jan Pokorný [poki] 2020-03-31 01:08:18 UTC
Confirming the update has fixed the problem for me:
device-mapper-1.02.171-1.fc33.x86_64

Thanks!

Comment 9 Fedora Update System 2020-04-01 00:18:54 UTC
FEDORA-2020-31b18adbb1 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2020-04-01 16:33:40 UTC
FEDORA-2020-31b18adbb1 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.