Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 815151 - sys-process/iotop broken on kernel >=5.14
Summary: sys-process/iotop broken on kernel >=5.14
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matthew Thode ( prometheanfire )
URL:
Whiteboard:
Keywords: PullRequest
: 833617 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-09-27 13:03 UTC by Thomas Capricelli
Modified: 2023-02-06 11:02 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Capricelli 2021-09-27 13:03:02 UTC
With recent kernels, iotop will display "CONFIG_TASK_DELAY_ACCT not enabled in kernel, cannot determine SWAPIN and IO" and indeed columns 'swapin' and 'io' will be empty.

It's a known problem, but upstream kinda... doesn't care:
https://www.spinics.net/lists/kernel/msg4054591.html

I create this ticket to gather information on the problem. The kernel link has a workaround. I'm not aware of any 'easy' solution (patch) for gentoo.
Comment 1 Jack 2022-02-27 02:53:10 UTC
The information in https://superuser.com/questions/610581/iotop-complains-config-task-delay-acct-not-enabled-in-kernel-only-for-specific seems relevant, if not tremendously useful.
Comment 2 Joe Kappus 2023-01-21 07:25:49 UTC
*** Bug 833617 has been marked as a duplicate of this bug. ***
Comment 3 Joe Kappus 2023-01-21 07:32:03 UTC
Fedora pulls this revision: https://repo.or.cz/iotop.git/commit/4e4fbca5618ba264bf502c2dad0ecb9cb458cd7a

In the least we could add an ewarn/einfo like #833617 was doing, but it's probably better to just bump to the latest revision. 

Though it's probably better to do this: 

sysctl kernel.task_delayacct=1

or add kernel.task_delayacct=1 to /etc/sysctl.conf

Instead of advising passing the kernel commandline.
Comment 4 Larry the Git Cow gentoo-dev 2023-02-04 22:50:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4a2e1576fa423a575a475dc2e24c37bdc75e6e3

commit d4a2e1576fa423a575a475dc2e24c37bdc75e6e3
Author:     Joe Kappus <joe@wt.gd>
AuthorDate: 2023-01-24 10:23:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-04 22:49:44 +0000

    sys-process/iotop: add 0.6_p20230124
    
    This bump fixes a lot of lingering issues as well as removing
    the need for patching. Moved to EAPI8 and PEP517.
    
    Closes: https://github.com/gentoo/gentoo/pull/24258
    Closes: https://bugs.gentoo.org/815151
    Co-authored-by: Sam James <sam@cmpct.info>
    Co-authored-by: Hairu/budgetazoo?
    Signed-off-by: Joe Kappus <joe@wt.gd>
    Closes: https://github.com/gentoo/gentoo/pull/29240
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-process/iotop/Manifest                   |  1 +
 sys-process/iotop/iotop-0.6_p20230124.ebuild | 32 ++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)
Comment 5 Thomas Capricelli 2023-02-05 17:58:04 UTC
I accepted ~amd64 on one system for the iotop package to get the 0.6_p20230124 version mentionned in the patch.

It still displays this at the bottom:
"CONFIG_TASK_DELAY_ACCT and kernel.task_delayacct sysctl not enabled in kernel, cannot determine SWAPIN and IO %"

The "swapin" and "io" columns are not displayed anymore (instead of displaying errors on each line previously).

Is that the expected behaviour ? 

That's independant of sysctl kernel.task_delayacct=0/1, on a very recent kernel (6.1.9)
Comment 6 Joe Kappus 2023-02-06 07:39:32 UTC
Some of it is expected behavior. However, the columns shouldn't be missing unless your terminal window is not wide enough.

iotop doesn't support toggling kernel.task_delayacct itself. iotop-c does and is the more active project, I generally recommend it where it's applicable to run it. The past 10 years, iotop's upstream has just been housekeeping and occasional patches, not active development, so that's why it seems like the minimal amount of effort for warning messages was done. My motivation for updating to later snapshot is so users have better documentation and Gentoo doesn't have to keep a bunch of patches in the tree. 

iotop-c currently blocks iotop because they both have the same executable name, but it's my plan to submit a PR to rename iotop to iotop-c as other distros have done so users have the option of installing both at the same time. 

Also, after turning on kernel.task_delayacct with sysctl, your system needs like 30 seconds or so of data collection, just leave iotop up and the warning should go away, values should show up.
Comment 7 Thomas Capricelli 2023-02-06 11:02:24 UTC
I didn't know about iotop-c. I'm happy to unmerge iotop and merge it instead. Both blocking each other is not a big deal, there's no real use case of having both.

Thanks for all this valuable information.