[Bug 2112552] Re: cat doesn't handle EPERM
Skia
2112552 at bugs.launchpad.net
Thu Jun 5 10:08:33 UTC 2025
Issue opened upstream: https://github.com/uutils/coreutils/issues/8068
** Description changed:
This was found while investigating FTBFS in util-linux
(https://launchpadlibrarian.net/797485933/buildlog_ubuntu-questing-
amd64.util-linux_2.41-4ubuntu1_BUILDING.txt.gz).
This is triggered by this test: tests/ts/lsfd/mkfds-multiplexing
This test was skipped with GNU coreutils, because at some point, `cat` fails (with reason) to read a file: https://github.com/util-linux/util-linux/blob/35128888075ade600413092214b62acf3601ead9/tests/ts/lsfd/mkfds-multiplexing#L49-L55
With uutils coreutils, the test is not skipped, but fails for unclear reasons.
It boils down to this very easy reproducer: cat /proc/$$/syscall
GNU coreutils output:
skia at noble:/$ cat /proc/$$/syscall
cat: /proc/208/syscall: Operation not permitted
skia at noble:/$ echo $?
1
uutils coreutils output:
skia at questing:/$ cat /proc/$$/syscall
skia at questing:/$ echo $?
0
+
+ `strace cat /proc/$$/syscall` clearly shows that `read()` return EPERM with both binaries:
+ ...
+ read(3, 0x7ffd4ef80798, 65536) = -1 EPERM (Operation not permitted)
+ ...
** Bug watch added: github.com/uutils/coreutils/issues #8068
https://github.com/uutils/coreutils/issues/8068
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rust-coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/2112552
Title:
cat doesn't handle EPERM
Status in rust-coreutils package in Ubuntu:
New
Status in util-linux package in Ubuntu:
New
Bug description:
This was found while investigating FTBFS in util-linux
(https://launchpadlibrarian.net/797485933/buildlog_ubuntu-questing-
amd64.util-linux_2.41-4ubuntu1_BUILDING.txt.gz).
This is triggered by this test: tests/ts/lsfd/mkfds-multiplexing
This test was skipped with GNU coreutils, because at some point, `cat` fails (with reason) to read a file: https://github.com/util-linux/util-linux/blob/35128888075ade600413092214b62acf3601ead9/tests/ts/lsfd/mkfds-multiplexing#L49-L55
With uutils coreutils, the test is not skipped, but fails for unclear reasons.
It boils down to this very easy reproducer: cat /proc/$$/syscall
GNU coreutils output:
skia at noble:/$ cat /proc/$$/syscall
cat: /proc/208/syscall: Operation not permitted
skia at noble:/$ echo $?
1
uutils coreutils output:
skia at questing:/$ cat /proc/$$/syscall
skia at questing:/$ echo $?
0
`strace cat /proc/$$/syscall` clearly shows that `read()` return EPERM with both binaries:
...
read(3, 0x7ffd4ef80798, 65536) = -1 EPERM (Operation not permitted)
...
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2112552/+subscriptions
More information about the foundations-bugs
mailing list