Bug 1224285 - 6.9 broke pidfd
Summary: 6.9 broke pidfd
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Jiri Slaby
QA Contact: E-mail List
URL: https://github.com/lsof-org/lsof/issu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-15 11:13 UTC by Jiri Slaby
Modified: 2024-06-26 05:04 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Slaby 2024-05-15 11:13:25 UTC
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:K/lsof/standard/x86_64
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:K/util-linux/standard/x86_64

commit cb12fd8e0dabb9a1c8aef55a6a41e2c255fcdf4b
Author: Christian Brauner <brauner@kernel.org>
Date:   Mon Feb 12 16:32:38 2024 +0100

    pidfd: add pidfs


Without the commit, lsof shows:
systemd      ... 59 [pidfd:899]


With the commit:
systemd      ... 1187 pidfd


For util-linux, its test fail with:

> [  125s] --- tests/expected/lsfd/column-name-pidfd    2024-05-06 07:20:54.655845940 +0000
> [  125s] +++ tests/output/lsfd/column-name-pidfd    2024-05-15 01:04:15.406666666 +0000
> [  125s] @@ -1,2 +1,2 @@
> [  125s] -3 anon_inode:[pidfd] pid=1 comm= nspid=1
> [  125s] +3 pidfd:[INODENUM] pidfd:[INODENUM]
> [  125s]  pidfd:ASSOC,KNAME,NAME: 0
> [  125s]          lsfd: NAME and KNAME column: [02] pidfd             ... FAILED (lsfd/column-name-pidfd)

And:
> [  125s] --- tests/expected/lsfd/column-type-pidfd    2024-05-06 07:20:54.655845940 +0000
> [  125s] +++ tests/output/lsfd/column-type-pidfd    2024-05-15 01:04:15.573333333 +0000
> [  125s] @@ -1,2 +1,2 @@
> [  125s] -3 UNKN pidfd
> [  125s] +3 REG REG
> [  125s]  pidfd:ASSOC,STTYPE,TYPE: 0
> [  125s]          lsfd: TYPE and STTYPE column: [02] pidfd            ... FAILED (lsfd/column-type-pidfd)
Comment 2 Jiri Slaby 2024-05-16 08:13:50 UTC
util-linux is supposed to be fixed by:
commit 04db2ba9008e9635286b1aafc8ecd9533a0a91bf
Author: Xi Ruoyao <xry111@xry111.site>
Date:   Thu Mar 28 04:01:02 2024 +0800

    lsfd: test: Adapt test cases for pidfs

https://github.com/util-linux/util-linux/commit/04db2ba9008e9635286b1aafc8ecd9533a0a91bf

Backporting whole PR:
https://github.com/util-linux/util-linux/pull/2866
Comment 3 Jiri Slaby 2024-05-16 08:15:59 UTC
(In reply to Jiri Slaby from comment #2)
> Backporting whole PR:
> https://github.com/util-linux/util-linux/pull/2866

https://build.opensuse.org/request/show/1174396

lsof to be fixed yet.
Comment 4 Jiri Slaby 2024-06-18 10:26:34 UTC
I think we are done as lsof was fixed via https://github.com/lsof-org/lsof/issues/317 in SR#1174912.

And the kernel via:
commit db3d841ac9edb0b98cc002e3b27c0b266ecfe5ba
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Tue May 21 14:34:43 2024 +0200

    fs/pidfs: make 'lsof' happy with our inode changes
Comment 5 Stanislav Brabec 2024-06-25 16:33:00 UTC
Do we need to backport of these lsof and lsfd changes to older products like SLE15 SP5, SLE15 SP6, SLE Micro 6.0, or SLFO and Factory are sufficient?
Comment 6 Jiri Slaby 2024-06-26 05:04:45 UTC
(In reply to Stanislav Brabec from comment #5)
> Do we need to backport of these lsof and lsfd changes to older products like
> SLE15 SP5, SLE15 SP6, SLE Micro 6.0, or SLFO and Factory are sufficient?

Whatever distro is going to use kernel 6.9+, needs updates of the above.

(I.e. none of the SL above. Dunno what SLFO is.)