stdlib/tst-arc4random-thread
Tests what?
Test is verifying that arc4random behaves as expected in the presence of multiple threads.
Fails where?
- Release/2.41
- x86_64
- Fedora 41
info: outer_threads=2 inner_threads=4 info: arc4random: minimum of 163840 blob results expected info: arc4random: 163894 blob results observed error: arc4random: duplicate blob: "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" (16 bytes) first source: thread -1, index 0 second source: thread -1, index 1 info: arc4random_buf: minimum of 163840 blob results expected info: arc4random_buf: 163840 blob results observed info: arc4random_uniform: minimum of 163840 blob results expected info: arc4random_uniform: 163840 blob results observed error: 1 test failures
Fails where?
- Release/2.39
- MIPS64 (N64)
- Binutils 2.41.90.20240115, GCC 13.2.0, Linux 6.8.0-rc1+
info: outer_threads=1 inner_threads=4 info: arc4random: minimum of 81920 blob results expected Fatal glibc error: cannot get entropy for arc4random Aborted (core dumped)
With GDB:
[Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". info: outer_threads=1 inner_threads=4 info: arc4random: minimum of 81920 blob results expected [New Thread 0xfff7d5f180 (LWP 710)] [Detaching after fork from child process 711] [New Thread 0xfff755b180 (LWP 714)] [New Thread 0xfff6d57180 (LWP 715)] [Detaching after fork from child process 716] [New Thread 0xfff6553180 (LWP 719)] [Detaching after fork from child process 720] [New Thread 0xfff5d4f180 (LWP 721)] Fatal glibc error: cannot get entropy for arc4random [Detaching after fork from child process 724] [New Thread 0xfff554b180 (LWP 727)] [Thread 0xfff6d57180 (LWP 715) exited] Thread 5 "tst-arc4random-" received signal SIGABRT, Aborted. [Switching to Thread 0xfff6553180 (LWP 719)] 0x000000fff7e2bda8 in __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at pthread_kill.c:43 43 int ret = INTERNAL_SYSCALL_CALL (tgkill, __getpid (), tid, signo); (gdb) bt #0 0x000000fff7e2bda8 in __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at pthread_kill.c:43 #1 __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78 #2 __GI___pthread_kill (threadid=<optimized out>, signo=6) at pthread_kill.c:89 #3 0x000000fff7dce7b8 in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26 #4 0x000000fff7db0058 in __GI_abort () at abort.c:79 #5 0x000000fff7e1a398 in __libc_message_impl (fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:132 #6 0x000000fff7e1a3c4 in __GI___libc_fatal (message=<optimized out>) at ../sysdeps/posix/libc_fatal.c:141 #7 0x000000fff7dd00e8 in arc4random_getrandom_failure () at arc4random.c:30 #8 0x000000fff7dd01c0 in __GI___arc4random_buf (p=p@entry=0xfff6552764, n=n@entry=4) at arc4random.c:56 #9 0x000000fff7dd0460 in __GI___arc4random_buf (n=4, p=0xfff6552764) at arc4random.c:40 #10 __GI___arc4random () at arc4random.c:98 #11 0x000000aaaaaa29c4 in generate_arc4random ( bytes=0xffd80139a4 "3<\252\243", size=15) at tst-arc4random-thread.c:69 #12 0x000000aaaaaa2f04 in inner_thread ( closure=0xaaaaaa2958 <generate_arc4random>) at tst-arc4random-thread.c:160 #13 0x000000fff7e29760 in start_thread (arg=0x800000) at pthread_create.c:447 #14 0x000000fff7ebdac4 in __thread_start_clone3 () at ../sysdeps/unix/sysv/linux/mips/clone3.S:131
TEMP_FAILURE_RETRY (__getrandom_nocancel (p, n, 0)) returns -EFAULT.
Confirmed as a kernel issue.