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: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, Jason Thorpe <thorpej%NetBSD.org@localhost>
Subject: Re: kern/56828: futex calls in Linux emulation sometimes hang
Date: Sat, 18 Jan 2025 12:17:02 +0100

 On Sat, Jan 18, 2025 at 11:03:37AM +0000, Taylor R Campbell wrote:
 > > Date: Sat, 18 Jan 2025 11:36:27 +0100
 > > From: Thomas Klausner <wiz%NetBSD.org@localhost>
 > > 
 > > The futex tests look much better now, but still quite a lot are
 > > failing (mostly futex_wait issues):
 > > 
 > > futex_cmp_requeue01.c:95: TBROK: fork() failed: EAGAIN/EWOULDBLOCK (11)
 > > tst_test.c:1606: TINFO: Killed the leftover descendant processes
 > 
 > Looks like you hit a process rlimit.  Can you bump ulimit -p or
 > kern.maxproc?
 
 I can't get 'ulimit -p' over 1044 (1045 throws an error). If I bump
 that and kern.maxproc=10000 (from 1044, what a coincidence), the test
 works:
 
 $ ./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 10
 futex_cmp_requeue01.c:140: TINFO: children woken, futex0: 0, futex1: 7, spurious wakeups: 0
 futex_cmp_requeue01.c:187: TPASS: futex_cmp_requeue()
 futex_cmp_requeue01.c:103: TINFO: Test 1: waiters: 10, wakes: 0, requeues: 10
 futex_cmp_requeue01.c:126: TINFO: futex_cmp_requeue() returned 10
 futex_cmp_requeue01.c:140: TINFO: children woken, futex0: 0, futex1: 10, spurious wakeups: 0
 futex_cmp_requeue01.c:187: TPASS: futex_cmp_requeue()
 futex_cmp_requeue01.c:103: TINFO: Test 2: waiters: 10, wakes: 2, requeues: 6
 futex_cmp_requeue01.c:126: TINFO: futex_cmp_requeue() returned 8
 futex_cmp_requeue01.c:140: TINFO: children woken, futex0: 2, futex1: 6, spurious wakeups: 0
 futex_cmp_requeue01.c:187: TPASS: futex_cmp_requeue()
 futex_cmp_requeue01.c:103: TINFO: Test 3: waiters: 100, wakes: 50, requeues: 50
 futex_cmp_requeue01.c:126: TINFO: futex_cmp_requeue() returned 100
 futex_cmp_requeue01.c:140: TINFO: children woken, futex0: 0, futex1: 50, spurious wakeups: 0
 futex_cmp_requeue01.c:187: TPASS: futex_cmp_requeue()
 futex_cmp_requeue01.c:103: TINFO: Test 4: waiters: 100, wakes: 0, requeues: 70
 futex_cmp_requeue01.c:126: TINFO: futex_cmp_requeue() returned 70
 futex_cmp_requeue01.c:140: TINFO: children woken, futex0: 30, futex1: 70, spurious wakeups: 0
 futex_cmp_requeue01.c:187: TPASS: futex_cmp_requeue()
 futex_cmp_requeue01.c:103: TINFO: Test 5: waiters: 1000, wakes: 100, requeues: 900
 futex_cmp_requeue01.c:126: TINFO: futex_cmp_requeue() returned 1000
 futex_cmp_requeue01.c:140: TINFO: children woken, futex0: 0, futex1: 900, spurious wakeups: 0
 futex_cmp_requeue01.c:187: TPASS: futex_cmp_requeue()
 futex_cmp_requeue01.c:103: TINFO: Test 6: waiters: 1000, wakes: 300, requeues: 500
 futex_cmp_requeue01.c:126: TINFO: futex_cmp_requeue() returned 800
 futex_cmp_requeue01.c:140: TINFO: children woken, futex0: 200, futex1: 500, spurious wakeups: 0
 futex_cmp_requeue01.c:187: TPASS: futex_cmp_requeue()
 
 Summary:
 passed   7
 failed   0
 broken   0
 skipped  0
 warnings 0
 
 
 > These failures are all about the limited resolution of sleeps.  I'm
 > guessing you're running at 100 Hz.  These times are around 1-2 ticks
 > past the requested deadline, or 10-20ms = 10000-20000us (plus a tiny
 > slop of a few dozen microseconds).  I would expect this to slow things
 > down but not make them deadlock.
 
 I'm running a GENERIC, so you're probably right with 100 Hz.
 
 Cheers,
  Thomas
 


Home | Main Index | Thread Index | Old Index