There seems to be a fixup upstream:
commit d9ec73301099ec5975505e1c3effbe768bab9490
Author: Max Kellermann <[email protected]>
Date: Tue Apr 29 20:58:27 2025 +0200
fs/eventpoll: fix endless busy loop after timeout has expired
After commit 0a65bc27bd64 ("eventpoll: Set epoll timeout if it's in
the future"), the following program would immediately enter a busy
loop in the kerne
I am preparing a test kernel based on -17.17 with that applied.
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/2110289
Title:
snapd has high CPU usage for exactly 150 seconds every 5, 7.5 or 10
minutes
Status in Go:
Invalid
Status in Linux:
Fix Committed
Status in snapd:
Invalid
Status in linux package in Ubuntu:
Confirmed
Status in linux source package in Plucky:
In Progress
Bug description:
SRU Justification:
[Impact]
fs/eventpoll: fix endless busy loop after timeout has expired
commit 0a65bc27bd64 introduced a regression where if the epoll time-out
is too small and ep_poll(...) is entered after the time-out already
reached, the kernel will soft-lock itself due to improper time-out handling.
[Fix]
Plucky: cherry-picked from upstream stable linux-6.14.y
Oracular: not affected
Noble: not affected
Jammy: not affected
Focal: not affected
Bionic: not affected
Xenial: not affected
Trusty: not affected
[Test Plan]
* Use the provided reproducer to check if the test program will
cause high CPU usage.
* Check if snapd still causes high CPU usage every 5 minutes.
[Where problems could occur]
The change involves fixing the timed-out handling logic when
the timer expires before the event is processed in the wait queue.
This may cause epoll-related issues if the fix is found to
be inappropriate.
[Notes]
Oracular and below are not affected, as the commit introduced regression
was not present in older kernels or their stable trees.
[Original Description]
Since recently, I have observed a periodic high CPU spike on the snapd
process.
It first occurs 5 minutes after start of the snapd systemd service. It
always lasts for exactly 150 seconds (2.5 minutes) and occurs every 5,
7.5 or 10 minutes. It maxes out a CPU core for the 150 seconds it is
running.
If you run `sudo snap refresh` while the CPU spike is occurring, the
spike stops immediately.
I have attached a CPU usage log which logs the CPU usage of the snapd
process every 5 seconds.
Some info about my system:
snap --version:
snap 2.68.4
snapd 2.68.4
series 16
ubuntu 22.04
kernel 6.14.5-1-liquorix-amd64
lsb_release -a:
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
uname -a:
Linux schneeflocke 6.14.5-1-liquorix-amd64 #1 ZEN SMP PREEMPT_DYNAMIC
liquorix 6.14-7ubuntu1~jammy (2025-05 x86_64 x86_64 x86_64 GNU/Linux
Measurements:
Spike Start - Spike End -> Total Time
12:25:26 - 12:22:56 -> 2:30 min
12:35:26 - 12:37:56 -> 2:30 min
12:40:26 - 12:42:56 -> 2:30 min
12:47:56 - 12:50:26 -> 2:30 min
12:52:56 - 12:55:26 -> 2:30 min
What additional info can I provide to identify the problem?
To manage notifications about this bug go to:
https://bugs.launchpad.net/golang/+bug/2110289/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp