Hi, all,
With the latest 6.9-rc7 torvalds tree kernel, the "make kselftest"
always hangs in the following
/pidfd_setns_test.
Symptoms are that all ./pidfd_netne_test processes end up in pause()
syscalls, with
nothing to wake them up.
Please find the config attached. All the options from the
selftests/pidfdconfig are on (verified):
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_CGROUPS=y
CONFIG_CHECKPOINT_RESTORE=y
root 2090101 5211 0 21:53 pts/1 00:00:00 make
OUTPUT=/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests/pidfd
-C pidfd run_tests
SRC_PATH=/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests
OB
root 2090102 2090101 0 21:53 pts/1 00:00:00 /bin/sh -c
BASE_DIR="/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests";
/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests/kselftest/runner.sh;
if
root 2133026 2090102 0 21:54 pts/1 00:00:00 /bin/sh -c
BASE_DIR="/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests";
/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests/kselftest/runner.sh;
if
root 2133027 2133026 0 21:54 pts/1 00:00:00 /bin/sh -c
BASE_DIR="/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests";
/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests/kselftest/runner.sh;
if
root 2133028 2133027 0 21:54 pts/1 00:00:00 /bin/sh -c
BASE_DIR="/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests";
/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests/kselftest/runner.sh;
if
root 2133031 2133028 0 21:54 pts/1 00:00:00 /bin/sh -c
BASE_DIR="/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests";
/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests/kselftest/runner.sh;
if
root 2133033 2133031 0 21:54 pts/1 00:00:00 perl
/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests/kselftest/prefix.pl
root 2133050 2887 0 21:54 pts/1 00:00:00 ./pidfd_setns_test
root 2133051 2887 0 21:54 pts/1 00:00:00 ./pidfd_setns_test
root 2133056 2887 0 21:54 pts/1 00:00:00 ./pidfd_setns_test
root 2133057 2887 0 21:54 pts/1 00:00:00 ./pidfd_setns_test
root 2133062 2887 0 21:54 pts/1 00:00:00 ./pidfd_setns_test
root 2133063 2887 0 21:54 pts/1 00:00:00 ./pidfd_setns_test
root 2133068 2887 0 21:54 pts/1 00:00:00 ./pidfd_setns_test
root 2133069 2887 0 21:54 pts/1 00:00:00 ./pidfd_setns_test
.
.
.
marvin@defiant:~/linux/kernel/linux_torvalds$ sudo bash
[sudo] password for marvin:
root@defiant:/home/marvin/linux/kernel/linux_torvalds# strace -p 2133050
strace: Process 2133050 attached
pause(^Cstrace: Process 2133050 detached
<detached ...>
root@defiant:/home/marvin/linux/kernel/linux_torvalds# strace -p 2133051
strace: Process 2133051 attached
pause(^Cstrace: Process 2133051 detached
<detached ...>
root@defiant:/home/marvin/linux/kernel/linux_torvalds# strace -p 2133056
strace: Process 2133056 attached
pause(^Cstrace: Process 2133056 detached
<detached ...>
root@defiant:/home/marvin/linux/kernel/linux_torvalds# strace -p 2133057
strace: Process 2133057 attached
pause(^Cstrace: Process 2133057 detached
<detached ...>
root@defiant:/home/marvin/linux/kernel/linux_torvalds# strace -p 2133062
strace: Process 2133062 attached
pause(^Cstrace: Process 2133062 detached
<detached ...>
root@defiant:/home/marvin/linux/kernel/linux_torvalds# strace -p 2133063
strace: Process 2133063 attached
pause(^Cstrace: Process 2133063 detached
<detached ...>
root@defiant:/home/marvin/linux/kernel/linux_torvalds#
root@defiant:/home/marvin/linux/kernel/linux_torvalds#
root@defiant:/home/marvin/linux/kernel/linux_torvalds# strace -p 2133068
strace: Process 2133068 attached
pause(^Cstrace: Process 2133068 detached
<detached ...>
root@defiant:/home/marvin/linux/kernel/linux_torvalds# strace -p 2133069
strace: Process 2133069 attached
pause(^Cstrace: Process 2133069 detached
<detached ...>
root@defiant:/home/marvin/linux/kernel/linux_torvalds#
The output log is:
# selftests: pidfd: pidfd_setns_test
# TAP version 13
# 1..7
# # Starting 7 tests from 2 test cases.
# # RUN global.setns_einval ...
# # OK global.setns_einval
# ok 1 global.setns_einval
# # RUN current_nsset.invalid_flags ...
# # pidfd_setns_test.c:161:invalid_flags:Expected
self->child_pid_exited (0) > 0 (0)
# # OK current_nsset.invalid_flags
# ok 2 current_nsset.invalid_flags
# # RUN current_nsset.pidfd_exited_child ...
# # pidfd_setns_test.c:161:pidfd_exited_child:Expected
self->child_pid_exited (0) > 0 (0)
# # OK current_nsset.pidfd_exited_child
# ok 3 current_nsset.pidfd_exited_child
# # RUN current_nsset.pidfd_incremental_setns ...
# # pidfd_setns_test.c:161:pidfd_incremental_setns:Expected
self->child_pid_exited (0) > 0 (0)
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to
correctly setns to user namespace of 2133050 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to
correctly setns to mnt namespace of 2133050 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to
correctly setns to pid namespace of 2133050 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to
correctly setns to uts namespace of 2133050 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to
correctly setns to ipc namespace of 2133050 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to
correctly setns to net namespace of 2133050 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to
correctly setns to cgroup namespace of 2133050 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to
correctly setns to pid_for_children namespace of 2133050 via pidfd 20
# # pidfd_setns_test.c:391:pidfd_incremental_setns:Expected
setns(self->child_pidfd1, info->flag) (-1) == 0 (0)
# # pidfd_setns_test.c:392:pidfd_incremental_setns:Too many users -
Failed to setns to time namespace of 2133050 via pidfd 20
# # pidfd_incremental_setns: Test terminated by assertion
# # FAIL current_nsset.pidfd_incremental_setns
# not ok 4 current_nsset.pidfd_incremental_setns
# # RUN current_nsset.nsfd_incremental_setns ...
# # pidfd_setns_test.c:161:nsfd_incremental_setns:Expected
self->child_pid_exited (0) > 0 (0)
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly
setns to user namespace of 2133056 via nsfd 19
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly
setns to mnt namespace of 2133056 via nsfd 24
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly
setns to pid namespace of 2133056 via nsfd 27
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly
setns to uts namespace of 2133056 via nsfd 30
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly
setns to ipc namespace of 2133056 via nsfd 33
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly
setns to net namespace of 2133056 via nsfd 36
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly
setns to cgroup namespace of 2133056 via nsfd 39
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly
setns to pid_for_children namespace of 2133056 via nsfd 42
# # pidfd_setns_test.c:427:nsfd_incremental_setns:Expected
setns(self->child_nsfds1[i], info->flag) (-1) == 0 (0)
# # pidfd_setns_test.c:428:nsfd_incremental_setns:Too many users -
Failed to setns to time namespace of 2133056 via nsfd 45
# # nsfd_incremental_setns: Test terminated by assertion
# # FAIL current_nsset.nsfd_incremental_setns
# not ok 5 current_nsset.nsfd_incremental_setns
# # RUN current_nsset.pidfd_one_shot_setns ...
# # pidfd_setns_test.c:161:pidfd_one_shot_setns:Expected
self->child_pid_exited (0) > 0 (0)
# # pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding user namespace
of 2133062 to list of namespaces to attach to
# # pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding mnt namespace
of 2133062 to list of namespaces to attach to
# # pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding pid namespace
of 2133062 to list of namespaces to attach to
# # pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding uts namespace
of 2133062 to list of namespaces to attach to
# # pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding ipc namespace
of 2133062 to list of namespaces to attach to
# # pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding net namespace
of 2133062 to list of namespaces to attach to
# # pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding cgroup
namespace of 2133062 to list of namespaces to attach to
# # pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding
pid_for_children namespace of 2133062 to list of namespaces to attach
to
# # pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding time namespace
of 2133062 to list of namespaces to attach to
# # pidfd_setns_test.c:466:pidfd_one_shot_setns:Expected
setns(self->child_pidfd1, flags) (-1) == 0 (0)
# # pidfd_setns_test.c:467:pidfd_one_shot_setns:Too many users -
Failed to setns to namespaces of 2133062
# # pidfd_one_shot_setns: Test terminated by assertion
# # FAIL current_nsset.pidfd_one_shot_setns
# not ok 6 current_nsset.pidfd_one_shot_setns
# # RUN current_nsset.no_foul_play ...
# # pidfd_setns_test.c:161:no_foul_play:Expected
self->child_pid_exited (0) > 0 (0)
# # pidfd_setns_test.c:506:no_foul_play:Adding user namespace of
2133068 to list of namespaces to attach to
# # pidfd_setns_test.c:506:no_foul_play:Adding mnt namespace of
2133068 to list of namespaces to attach to
# # pidfd_setns_test.c:506:no_foul_play:Adding pid namespace of
2133068 to list of namespaces to attach to
# # pidfd_setns_test.c:506:no_foul_play:Adding uts namespace of
2133068 to list of namespaces to attach to
# # pidfd_setns_test.c:506:no_foul_play:Adding ipc namespace of
2133068 to list of namespaces to attach to
# # pidfd_setns_test.c:506:no_foul_play:Adding net namespace of
2133068 to list of namespaces to attach to
# # pidfd_setns_test.c:506:no_foul_play:Adding cgroup namespace of
2133068 to list of namespaces to attach to
# # pidfd_setns_test.c:506:no_foul_play:Adding time namespace of
2133068 to list of namespaces to attach to
# # pidfd_setns_test.c:510:no_foul_play:Expected
setns(self->child_pidfd1, flags) (-1) == 0 (0)
# # pidfd_setns_test.c:511:no_foul_play:Too many users - Failed to
setns to namespaces of 2133068 vid pidfd 20
# # no_foul_play: Test terminated by assertion
# # FAIL current_nsset.no_foul_play
# not ok 7 current_nsset.no_foul_play
# # FAILED: 3 / 7 tests passed.
# # Totals: pass:3 fail:4 xfail:0 xpass:0 skip:0 error:0
Thanks for your time and patience for reviewing this BUG report.
Best regards,
Mirsad Todorovac
P.S.
I have changed the email address because of the uncertainty whether the employer
would continue to support my work on the Linux kernel testing as the
part of my work
research.
Thank you.