Issue 125510
Summary Many libcxx/test/benchmarks tests FAIL
Labels libc++
Assignees
Reporter rorth
    When running a LLVM 20.1.0 rc1 reltest on Linux/x86_64, many (49 out of 75) new `libcxx/test/benchmarks` tests `FAIL`.  It seems the failure mode is always the same:
```
# .---command stderr------------
# | 2025-02-02T09:25:53+01:00
# | Running /var/llvm/reltest/llvm-20.1.0/rc1/Phase3/Release/llvmCore-20.1.0-rc1.obj/runtimes/runtimes-bins/libcxx/test/benchmarks/Output/atomic_wait_1_waiter_1_notifier.bench.cpp.dir/t.tmp.exe
# | Run on (64 X 2350 MHz CPU s)
# | CPU Caches:
# |   L1 Data 32 KiB (x32)
# |   L1 Instruction 32 KiB (x32)
# |   L2 Unified 512 KiB (x32)
# | L3 Unified 16384 KiB (x8)
# | Load Average: 174.90, 123.26, 82.05
# | ***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
# | libc++abi: terminating due to uncaught exception of type std::runtime_error: failed to create thread
# `-----------------------------
# error: command failed with exit status: 250
```
The system is running Ubuntu 20.04 and has a single AMD EPYC 7452 32-Core cpu.

Unfortunately, the error message (from `libcxx/test/benchmarks/atomic_wait_helper.h (HighPrioTask::HighPrioTask)`) isn't particularly helpful: it should include the error returned from `pthread_create`.

When running one of the failing tests under `strace`, I find
```
139055 sched_get_priority_max(SCHED_FIFO) = 99
1139055 sched_get_priority_min(SCHED_FIFO) = 1
1139055 sched_get_priority_max(SCHED_FIFO) = 99
1139055 clone(child_stack=0x7f706411dfb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tid=[1139741], tls=0x7f706411e700, child_tidptr=0x7f706411e9d0) = 1139741
1139055 sched_setscheduler(1139741, SCHED_FIFO, [99] <unfinished ...>
1139741 set_robust_list(0x7f706411e9e0, 24 <unfinished ...>
1139055 <... sched_setscheduler resumed>) = -1 EPERM (Operation not permitted)
```
It seems this code was introduced only recently in
```
commit 699f19605579f25083152a9ad21e14c2751d5d66
Author: Hui <hui.xie1...@gmail.com>
Date:   Sat Jan 18 14:50:53 2025 +0000

 [libc++] remove yield from atomic::wait (#120012)
```
@huixie90 : this introduces an enormous amount of noise and should be fixed before the LLVM 20.1.0 release.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to