https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113005
benh at kernel dot crashing.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |benh at kernel dot crashing.org --- Comment #20 from benh at kernel dot crashing.org --- I don't know if this data point is worth it but I've been chasing a hang in Koji when trying to build our gcc 14 that points to that test as well. It appears that it was sporadic until recent updates to our glibc (basically c9s glibc) which makes it happen much more often (maybe due to changes in the cond vars implementation ? not sure...). What I observe is that sometimes rwlock_1.ext doesn't just fail/timeout, it actually deadlocks in what looks like a cleanup path (and stays there forever). The build has to be killed (or ssh in the builder & kill rwlock_1.ext and the test suite then continues). Now when I just run that test manually (with pretty much the same libgomp & libgfortran installed system-wide), I get a slightly different "error": [ec2-user@ip-172-31-17-247 libgomp5]$ ./rwlock_1.exe STOP 2 STOP 2 Internal Error: Trying to free nonempty asynchronous unit Error termination. Backtrace: #0 0x7f210b4d8d7e in free_async_unit at ../../../libgfortran/io/async.c:211 #1 0x7f210b4cd429 in close_unit_1 at ../../../libgfortran/io/unit.c:759 #2 0x7f210b57109d in _dl_fini at /usr/src/debug/glibc-2.34-196.al2023benh.0.2.x86_64/elf/dl-fini.c:142 #3 0x7f210ae4231c in __run_exit_handlers at /usr/src/debug/glibc-2.34-196.al2023benh.0.2.x86_64/stdlib/exit.c:126 #4 0x7f210ae4246f in __GI_exit at /usr/src/debug/glibc-2.34-196.al2023benh.0.2.x86_64/stdlib/exit.c:156 #5 0x401884 in ??? #6 0x7f210b0f0b4d in gomp_thread_start at ../../../libgomp/team.c:129 #7 0x7f210ae8b4e9 in start_thread at /usr/src/debug/glibc-2.34-196.al2023benh.0.2.x86_64/nptl/pthread_create.c:443 #8 0x7f210af106cf in clone3 at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 #9 0xffffffffffffffff in ??? and in gdb: Thread 13 "rwlock_1.exe" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff09f4640 (LWP 2491931)] __pthread_clockjoin_ex (threadid=140736011957824, thread_return=thread_return@entry=0x0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, block=block@entry=true) at pthread_join_common.c:43 43 if (INVALID_NOT_TERMINATED_TD_P (pd)) (gdb) backtrace #0 __pthread_clockjoin_ex (threadid=140736011957824, thread_return=thread_return@entry=0x0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, block=block@entry=true) at pthread_join_common.c:43 #1 0x00007ffff788ce83 in ___pthread_join (threadid=<optimized out>, thread_return=thread_return@entry=0x0) at pthread_join.c:25 #2 0x00007ffff7ed8d30 in __gthread_join (__threadid=<optimized out>, __value_ptr=0x0) at ../libgcc/gthr-default.h:682 #3 _gfortrani_async_close (au=0x7fffbc003540) at ../../../libgfortran/io/async.c:486 #4 0x00007ffff7ecd42a in close_unit_1 (u=0x7fffbc000fb0, locked=locked@entry=1) at ../../../libgfortran/io/unit.c:759 #5 0x00007ffff7ecd61a in _gfortrani_close_units () at ../../../libgfortran/io/unit.c:836 #6 0x00007ffff7fcb09e in _dl_fini () at dl-fini.c:142 #7 0x00007ffff784231d in __run_exit_handlers (status=status@entry=2, listp=0x7ffff79fa838 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:126 #8 0x00007ffff7842470 in __GI_exit (status=status@entry=2) at exit.c:156 #9 0x00007ffff7c25cb3 in _gfortran_stop_numeric (code=2, quiet=<optimized out>) at ../../../libgfortran/runtime/stop.c:126 #10 0x0000000000401885 in MAIN__._omp_fn.0 () #11 0x00007ffff7f88b4e in gomp_thread_start (xdata=<optimized out>) at ../../../libgomp/team.c:129 #12 0x00007ffff788b4ea in start_thread (arg=<optimized out>) at pthread_create.c:443 #13 0x00007ffff79106d0 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 Thread 13 "rwlock_1.exe" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff09f4640 (LWP 2491931)] __pthread_clockjoin_ex (threadid=140736011957824, thread_return=thread_return@entry=0x0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, block=block@entry=true) at pthread_join_common.c:43 43 if (INVALID_NOT_TERMINATED_TD_P (pd)) (gdb) backtrace #0 __pthread_clockjoin_ex (threadid=140736011957824, thread_return=thread_return@entry=0x0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, block=block@entry=true) at pthread_join_common.c:43 #1 0x00007ffff788ce83 in ___pthread_join (threadid=<optimized out>, thread_return=thread_return@entry=0x0) at pthread_join.c:25 #2 0x00007ffff7ed8d30 in __gthread_join (__threadid=<optimized out>, __value_ptr=0x0) at ../libgcc/gthr-default.h:682 #3 _gfortrani_async_close (au=0x7fffbc003540) at ../../../libgfortran/io/async.c:486 #4 0x00007ffff7ecd42a in close_unit_1 (u=0x7fffbc000fb0, locked=locked@entry=1) at ../../../libgfortran/io/unit.c:759 #5 0x00007ffff7ecd61a in _gfortrani_close_units () at ../../../libgfortran/io/unit.c:836 #6 0x00007ffff7fcb09e in _dl_fini () at dl-fini.c:142 #7 0x00007ffff784231d in __run_exit_handlers (status=status@entry=2, listp=0x7ffff79fa838 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:126 #8 0x00007ffff7842470 in __GI_exit (status=status@entry=2) at exit.c:156 #9 0x00007ffff7c25cb3 in _gfortran_stop_numeric (code=2, quiet=<optimized out>) at ../../../libgfortran/runtime/stop.c:126 #10 0x0000000000401885 in MAIN__._omp_fn.0 () #11 0x00007ffff7f88b4e in gomp_thread_start (xdata=<optimized out>) at ../../../libgomp/team.c:129 #12 0x00007ffff788b4ea in start_thread (arg=<optimized out>) at pthread_create.c:443 #13 0x00007ffff79106d0 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81