run_hugetlbfs_test.sh in memfd of ubuntu_kernel_selftests causing sut-test failure on J-6.8

Bug #2075275 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
New
Undecided
Unassigned

Bug Description

Found on Jammy 6.8 variants since 2024.04.29:
  * J-oracle-6.8.0-1006.6~22.04.3 (2024.04.29)
  * J-azure-6.8.0-1008.8~22.04.1 (2024.04.29)
  * J-aws-6.8.0-1009.9~22.04.2 (2024.04.29)
  * J-gcp-6.8.0-1010.11~22.04.1 (2024.06.10)
  * J-hwe-6.8.0-38.38~22.04.1 (2024.06.10)
  * J-ibm-6.8.0-1008.8~22.04.1 (2024.06.10)
  * J-lowlatency-hwe-6.8.0-38.38.1~22.04.2 (2024.06.10)
  * J-nvidia-6.8.0-1009.9~22.04.1 (2024.06.10)
  * J-realtime-6.8.1-1004.4~22.04.1 (2024.06.10)

When trying to run the memfd test in ubuntu_kernel_selftests, the run_hugetlbfs_test.sh sub-test will have a leftover process the prevents the test to finish properly, and consequently causing sut-test failure in our infrastructure.

$ cd ~/autotest/client/tmp/ubuntu_kernel_selftests/src/linux/tools/testing/selftests/
$ sudo make TARGETS=memfd
$ cd memfd
$ sudo ./run_hugetlbfs_test.sh
memfd-hugetlb: CREATE
memfd-hugetlb: BASIC
memfd-hugetlb: SEAL-EXEC
memfd-hugetlb: Apply SEAL_EXEC
fchmod(/memfd:kern_memfd_seal_exec (deleted), 00777) didn't fail as expected
./run_hugetlbfs_test.sh: line 60: 1424 Aborted (core dumped) ./memfd_test hugetlbfs
fusermount: failed to unmount /home/ubuntu/autotest/client/tmp/ubuntu_kernel_selftests/src/linux/tools/testing/selftests/memfd/mnt: Invalid argument
eopening: ./mnt/memfd
cho $?ADD_SEALS(4, 0 -> 8) failed: Device or resource busy
8 != 0 = GET_SEALS(4)
Aborted (core dumped)
$ echo $?
0
$ ps aux | grep fuse
root 1431 0.0 0.0 150776 1292 ? Ssl 01:50 0:00 ./fuse_mnt ./mnt
ubuntu 1454 0.0 0.0 7008 2304 pts/0 S+ 01:50 0:00 grep --color=auto fuse

$ sudo strace -p 1431
strace: Process 1431 attached
futex(0x7fff9738a3f0, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY
^C

Nothing interesting in dmesg output.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This is not affect Noble 6.8, despite the test output is identical:

 Running 'make run_tests -C memfd TEST_PROGS=run_hugetlbfs_test.sh TEST_GEN_PROGS='' TEST_CUSTOM_PROGS='''
 make: Entering directory '/home/ubuntu/autotest/client/tmp/ubuntu_kernel_selftests/src/linux/tools/testing/selftests/memfd'
 TAP version 13
 1..1
 # timeout set to 45
 # selftests: memfd: run_hugetlbfs_test.sh
 # memfd-hugetlb: CREATE
 # memfd-hugetlb: BASIC
 # memfd-hugetlb: SEAL-EXEC
 # memfd-hugetlb: Apply SEAL_EXEC
 # fchmod(/memfd:kern_memfd_seal_exec (deleted), 00777) didn't fail as expected
 # ./run_hugetlbfs_test.sh: line 60: 15915 Aborted (core dumped) ./memfd_test hugetlbfs
 # opening: ./mnt/memfd
 # ADD_SEALS(6, 0 -> 8) failed: Device or resource busy
 # 8 != 0 = GET_SEALS(6)
 # Aborted (core dumped)
 ok 1 selftests: memfd: run_hugetlbfs_test.sh

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.