NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/56828: futex calls in Linux emulation sometimes hang
The following reply was made to PR kern/56828; it has been noted by GNATS.
From: Thomas Klausner <wiz%NetBSD.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/56828: futex calls in Linux emulation sometimes hang
Date: Sat, 25 Mar 2023 06:44:46 +0100
I compiled
https://github.com/linux-test-project/ltp/releases/download/20230127/ltp-full-20230127.tar.bz2
on a CentOS (exact version unknown, sorry) and copied the contents of
testcases/kernel/syscalls/futex (see
https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/syscalls/futex)
to a NetBSD 10.99.2/amd64 system and ran them. The output shows quite
a number of problems (look for 'failed' and 'broken' below):
*** futex_cmp_requeue01 ***
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
futex_cmp_requeue01.c:194: TINFO: Testing variant: syscall with old kernel spec
futex_cmp_requeue01.c:103: TINFO: Test 0: waiters: 10, wakes: 3, requeues: 7
futex_cmp_requeue01.c:126: TINFO: futex_cmp_requeue() returned 3
futex_cmp_requeue01.c:140: TINFO: children woken, futex0: 0, futex1: 7, spurious wakeups: 0
futex_cmp_requeue01.c:180: TFAIL: woken up -4, expected range (3, 3)
futex_cmp_requeue01.c:103: TINFO: Test 1: waiters: 10, wakes: 0, requeues: 10
futex_cmp_requeue01.c:126: TINFO: futex_cmp_requeue() returned 0
futex_cmp_requeue01.c:140: TINFO: children woken, futex0: 0, futex1: 10, spurious wakeups: 0
futex_cmp_requeue01.c:180: TFAIL: woken up -10, expected range (0, 0)
futex_cmp_requeue01.c:103: TINFO: Test 2: waiters: 10, wakes: 2, requeues: 6
futex_cmp_requeue01.c:126: TINFO: futex_cmp_requeue() returned 2
futex_cmp_requeue01.c:140: TINFO: children woken, futex0: 2, futex1: 6, spurious wakeups: 0
futex_cmp_requeue01.c:180: TFAIL: woken up -4, expected range (2, 2)
futex_cmp_requeue01.c:103: TINFO: Test 3: waiters: 100, wakes: 50, requeues: 50
futex_cmp_requeue01.c:126: TINFO: futex_cmp_requeue() returned 50
futex_cmp_requeue01.c:140: TINFO: children woken, futex0: 0, futex1: 50, spurious wakeups: 0
futex_cmp_requeue01.c:180: TFAIL: woken up 0, expected range (50, 50)
futex_cmp_requeue01.c:103: TINFO: Test 4: waiters: 100, wakes: 0, requeues: 70
futex_cmp_requeue01.c:126: TINFO: futex_cmp_requeue() returned 0
futex_cmp_requeue01.c:140: TINFO: children woken, futex0: 30, futex1: 70, spurious wakeups: 0
futex_cmp_requeue01.c:180: TFAIL: woken up -70, expected range (0, 0)
futex_cmp_requeue01.c:95: TBROK: fork() failed: EAGAIN/EWOULDBLOCK (11)
tst_test.c:1606: TINFO: Killed the leftover descendant processes
Summary:
passed 0
failed 5
broken 1
skipped 0
warnings 0
*** futex_cmp_requeue02 ***
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
futex_cmp_requeue02.c:71: TINFO: Testing variant: syscall with old kernel spec
futex_cmp_requeue02.c:64: TPASS: futex_cmp_requeue() failed as expected: EINVAL (22)
futex_cmp_requeue02.c:64: TPASS: futex_cmp_requeue() failed as expected: EINVAL (22)
futex_cmp_requeue02.c:53: TFAIL: futex_cmp_requeue() succeeded unexpectedly
HINT: You _MAY_ be missing kernel fixes:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fbe0e839d1e2
HINT: You _MAY_ be vulnerable to CVE(s):
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-6927
Summary:
passed 2
failed 1
broken 0
skipped 0
warnings 0
*** futex_wait01 ***
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
futex_wait01.c:69: TINFO: Testing variant: syscall with old kernel spec
futex_wait01.c:62: TPASS: futex_wait() passed: ETIMEDOUT (110)
futex_wait01.c:62: TPASS: futex_wait() passed: EAGAIN/EWOULDBLOCK (11)
futex_wait01.c:62: TPASS: futex_wait() passed: ETIMEDOUT (110)
futex_wait01.c:62: TPASS: futex_wait() passed: EAGAIN/EWOULDBLOCK (11)
Summary:
passed 4
failed 0
broken 0
skipped 0
warnings 0
*** futex_wait02 ***
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
futex_wait02.c:66: TINFO: Testing variant: syscall with old kernel spec
futex_wait02.c:59: TPASS: futex_wait() woken up
Summary:
passed 1
failed 0
broken 0
skipped 0
warnings 0
*** futex_wait03 ***
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
futex_wait03.c:63: TINFO: Testing variant: syscall with old kernel spec
Test timeouted, sending SIGKILL!
tst_test.c:1612: TINFO: If you are running on slow machine, try exporting LTP_TIMEOUT_MUL > 1
tst_test.c:1614: TBROK: Test killed! (timeout?)
Summary:
passed 0
failed 0
broken 1
skipped 0
warnings 0
*** futex_wait04 ***
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
futex_wait04.c:50: TINFO: Testing variant: syscall with old kernel spec
futex_wait04.c:39: TPASS: futex_wait() returned -1: EAGAIN/EWOULDBLOCK (11)
Summary:
passed 1
failed 0
broken 0
skipped 0
warnings 0
*** futex_wait05 ***
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
sh: systemd-detect-virt: not found
tst_timer_test.c:357: TINFO: CLOCK_MONOTONIC resolution 69ns
tst_timer_test.c:365: TINFO: prctl(PR_GET_TIMERSLACK) = -1, using 50us
tst_test.c:1566: TINFO: Updating max runtime to 0h 00m 09s
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 39s
tst_timer_test.c:379: TINFO: Failed to set zero latency constraint: No such file or directory
tst_timer_test.c:263: TINFO: futex_wait() sleeping for 1000us 500 iterations, threshold 450.01us
tst_timer_test.c:285: TINFO: Found 500 outliners in [20033,10715] range
tst_timer_test.c:305: TINFO: min 10715us, max 20033us, median 19998us, trunc mean 19811.95us (discarded 25)
tst_timer_test.c:314: TFAIL: futex_wait() slept for too long
Time: us | Frequency
--------------------------------------------------------------------------------
10715 | *
11206 |
11697 |
12188 | .
12679 |
13170 |
13661 |
14152 |
14643 |
15134 |
15625 |
16116 |
16607 |
17098 |
17589 |
18080 |
18571 | +
19062 | -
19553 | ********************************************************************
--------------------------------------------------------------------------------
491us | 1 sample = 0.14108 '*', 0.28216 '+', 0.56432 '-', non-zero '.'
tst_timer_test.c:263: TINFO: futex_wait() sleeping for 2000us 500 iterations, threshold 450.01us
tst_timer_test.c:285: TINFO: Found 11 outliners in [20014,20001] range
tst_timer_test.c:305: TINFO: min 11091us, max 20014us, median 19998us, trunc mean 19963.34us (discarded 25)
tst_timer_test.c:314: TFAIL: futex_wait() slept for too long
Time: us | Frequency
--------------------------------------------------------------------------------
11091 | .
11561 |
12031 |
12501 |
12971 |
13441 |
13911 | .
14381 |
14851 |
15321 |
15791 |
16261 |
16731 |
17201 |
17671 |
18141 |
18611 | .
19081 |
19551 | ********************************************************************
--------------------------------------------------------------------------------
470us | 1 sample = 0.13682 '*', 0.27364 '+', 0.54728 '-', non-zero '.'
tst_timer_test.c:263: TINFO: futex_wait() sleeping for 5000us 300 iterations, threshold 450.04us
tst_timer_test.c:305: TINFO: min 19554us, max 20000us, median 19998us, trunc mean 19996.26us (discarded 15)
tst_timer_test.c:314: TFAIL: futex_wait() slept for too long
Time: us | Frequency
--------------------------------------------------------------------------------
19554 | .
19578 |
19602 |
19626 |
19650 |
19674 |
19698 |
19722 |
19746 |
19770 |
19794 |
19818 |
19842 |
19866 |
19890 |
19914 |
19938 |
19962 |
19986 | ********************************************************************
--------------------------------------------------------------------------------
24us | 1 sample = 0.22742 '*', 0.45485 '+', 0.90970 '-', non-zero '.'
tst_timer_test.c:263: TINFO: futex_wait() sleeping for 10000us 100 iterations, threshold 450.33us
tst_timer_test.c:305: TINFO: min 19678us, max 20001us, median 19998us, trunc mean 19994.49us (discarded 5)
tst_timer_test.c:314: TFAIL: futex_wait() slept for too long
Time: us | Frequency
--------------------------------------------------------------------------------
19678 | +
19695 |
19712 |
19729 |
19746 |
19763 |
19780 |
19797 |
19814 |
19831 |
19848 |
19865 |
19882 |
19899 |
19916 |
19933 |
19950 |
19967 |
19984 | ********************************************************************
20001 | +
--------------------------------------------------------------------------------
17us | 1 sample = 0.69388 '*', 1.38776 '+', 2.77551 '-', non-zero '.'
tst_timer_test.c:263: TINFO: futex_wait() sleeping for 25000us 50 iterations, threshold 451.29us
tst_timer_test.c:305: TINFO: min 39713us, max 40000us, median 39998us, trunc mean 39992.19us (discarded 2)
tst_timer_test.c:314: TFAIL: futex_wait() slept for too long
Time: us | Frequency
--------------------------------------------------------------------------------
39713 | *-
39729 |
39745 |
39761 |
39777 |
39793 |
39809 |
39825 |
39841 |
39857 |
39873 |
39889 |
39905 |
39921 |
39937 |
39953 |
39969 |
39985 | ********************************************************************
--------------------------------------------------------------------------------
16us | 1 sample = 1.38776 '*', 2.77551 '+', 5.55102 '-', non-zero '.'
tst_timer_test.c:263: TINFO: futex_wait() sleeping for 100000us 10 iterations, threshold 537.00us
tst_timer_test.c:305: TINFO: min 109716us, max 110001us, median 109999us, trunc mean 109967.78us (discarded 1)
tst_timer_test.c:314: TFAIL: futex_wait() slept for too long
Time: us | Frequency
--------------------------------------------------------------------------------
109716 | ********+
109731 |
109746 |
109761 |
109776 |
109791 |
109806 |
109821 |
109836 |
109851 |
109866 |
109881 |
109896 |
109911 |
109926 |
109941 |
109956 |
109971 |
109986 | ********************************************************************
110001 | ********+
--------------------------------------------------------------------------------
15us | 1 sample = 8.50000 '*', 17.00000 '+', 34.00000 '-', non-zero '.'
tst_timer_test.c:263: TINFO: futex_wait() sleeping for 1000000us 2 iterations, threshold 4400.00us
tst_timer_test.c:305: TINFO: min 1009721us, max 1010012us, median 1009721us, trunc mean 1009721.00us (discarded 1)
tst_timer_test.c:314: TFAIL: futex_wait() slept for too long
Time: us | Frequency
--------------------------------------------------------------------------------
1009721 | ********************************************************************
1009737 |
1009753 |
1009769 |
1009785 |
1009801 |
1009817 |
1009833 |
1009849 |
1009865 |
1009881 |
1009897 |
1009913 |
1009929 |
1009945 |
1009961 |
1009977 |
1009993 |
1010009 | ********************************************************************
--------------------------------------------------------------------------------
16us | 1 sample = 68.00000 '*', 136.00000 '+', 272.00000 '-', non-zero '.'
Summary:
passed 0
failed 7
broken 0
skipped 0
warnings 0
*** futex_wait_bitset01 ***
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
futex_wait_bitset01.c:99: TINFO: Testing variant: syscall with old kernel spec
futex_wait_bitset01.c:44: TINFO: testing futex_wait_bitset() timeout with CLOCK_MONOTONIC
futex_wait_bitset01.c:86: TPASS: futex_wait_bitset() waited 114236us, expected 100010us
futex_wait_bitset01.c:44: TINFO: testing futex_wait_bitset() timeout with CLOCK_REALTIME
futex_wait_bitset01.c:86: TPASS: futex_wait_bitset() waited 119960us, expected 100010us
Summary:
passed 2
failed 0
broken 0
skipped 0
warnings 0
*** futex_waitv01 ***
tst_test.c:899: TCONF: The test requires kernel 5.16 or newer
*** futex_waitv02 ***
tst_test.c:899: TCONF: The test requires kernel 5.16 or newer
*** futex_waitv03 ***
tst_test.c:899: TCONF: The test requires kernel 5.16 or newer
*** futex_wake01 ***
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
futex_wake01.c:59: TINFO: Testing variant: syscall with old kernel spec
futex_wake01.c:52: TPASS: futex_wake() passed
futex_wake01.c:52: TPASS: futex_wake() passed
futex_wake01.c:52: TPASS: futex_wake() passed
futex_wake01.c:52: TPASS: futex_wake() passed
futex_wake01.c:52: TPASS: futex_wake() passed
futex_wake01.c:52: TPASS: futex_wake() passed
Summary:
passed 6
failed 0
broken 0
skipped 0
warnings 0
*** futex_wake02 ***
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
futex_wake02.c:134: TINFO: Testing variant: syscall with old kernel spec
futex_utils.h:69: TINFO: 0 threads sleeping, expected 55
futex_wake02.c:91: TPASS: futex_wake() woken up 1 threads
futex_wake02.c:91: TPASS: futex_wake() woken up 2 threads
futex_wake02.c:91: TPASS: futex_wake() woken up 3 threads
futex_wake02.c:91: TPASS: futex_wake() woken up 4 threads
futex_wake02.c:91: TPASS: futex_wake() woken up 5 threads
futex_wake02.c:91: TPASS: futex_wake() woken up 6 threads
futex_wake02.c:91: TPASS: futex_wake() woken up 7 threads
futex_wake02.c:91: TPASS: futex_wake() woken up 8 threads
futex_wake02.c:91: TPASS: futex_wake() woken up 9 threads
futex_wake02.c:91: TPASS: futex_wake() woken up 10 threads
futex_wake02.c:103: TPASS: futex_wake() woken up 0 threads
Summary:
passed 11
failed 0
broken 0
skipped 0
warnings 0
*** futex_wake03 ***
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
tst_memutils.c:141: TINFO: oom_score_adj does not exist, skipping the adjustment
futex_wake03.c:97: TINFO: Testing variant: syscall with old kernel spec
futex_wake03.c:61: TPASS: futex_wake() woken up 1 childs
futex_wake03.c:61: TPASS: futex_wake() woken up 2 childs
futex_wake03.c:61: TPASS: futex_wake() woken up 3 childs
futex_wake03.c:61: TPASS: futex_wake() woken up 4 childs
futex_wake03.c:61: TPASS: futex_wake() woken up 5 childs
futex_wake03.c:61: TPASS: futex_wake() woken up 6 childs
futex_wake03.c:61: TPASS: futex_wake() woken up 7 childs
futex_wake03.c:61: TPASS: futex_wake() woken up 8 childs
futex_wake03.c:61: TPASS: futex_wake() woken up 9 childs
futex_wake03.c:61: TPASS: futex_wake() woken up 10 childs
futex_wake03.c:89: TPASS: futex_wake() woken up 0 children
Summary:
passed 11
failed 0
broken 0
skipped 0
warnings 0
*** futex_wake04 ***
tst_test.c:1152: TCONF: Test needs to be run as root
Running the last as root just gives:
tst_hugepage.c:34: TCONF: hugetlbfs is not supported
Perhaps these are easier-to-debug cases?
Thomas
Home |
Main Index |
Thread Index |
Old Index