https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88707
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> --- (on Darwin17 I had a recent build) I find that a built exe fails quite often; here's a sample of the hung program (it appears deadlocked, not consuming any CPU). The correct libraries are being loaded. Sampling process 23844 for 3 seconds with 1 millisecond of run time between samples Sampling completed, processing symbols... Analysis of sampling task-reduction-10.exe (pid 23844) every 1 millisecond Process: task-reduction-10.exe [23844] Path: /Volumes/scratch/10-13-his/gcc-trunk-gcc/x86_64-apple-darwin17/libgomp/testsuite/task-reduction-10.exe Load Address: 0x108350000 Identifier: task-reduction-10.exe Version: 0 Code Type: X86-64 Parent Process: bash [34246] Date/Time: 2019-01-05 12:53:30.784 +0000 Launch Time: 2019-01-05 12:52:40.943 +0000 OS Version: Mac OS X 10.13.6 (17G4015) Report Version: 7 Analysis Tool: /usr/bin/sample Physical footprint: 568K Physical footprint (peak): 576K ---- Call graph: 2799 Thread_58184392 DispatchQueue_1: com.apple.main-thread (serial) + 2799 ??? (in <unknown binary>) [0x7f9679c02718] + 2799 gomp_barrier_wait_end (in libgomp.1.dylib) + 86 [0x10862d606] bar.c:92 + 2799 gomp_sem_wait (in libgomp.1.dylib) + 40 [0x10862d488] sem.c:71 + 2799 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff53677589] + 2799 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff534aea16] 2799 Thread_58184395 + 2799 ??? (in <unknown binary>) [0x206000000000] + 2799 ??? (in <unknown binary>) [0x7f9679c02cb8] + 2799 gomp_barrier_wait_end (in libgomp.1.dylib) + 86 [0x10862d606] bar.c:92 + 2799 gomp_sem_wait (in libgomp.1.dylib) + 40 [0x10862d488] sem.c:71 + 2799 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff53677589] + 2799 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff534aea16] 2799 Thread_58184397 + 2799 ??? (in <unknown binary>) [0x206000000000] + 2799 ??? (in <unknown binary>) [0x7f9679c030b8] + 2799 gomp_barrier_wait_end (in libgomp.1.dylib) + 86 [0x10862d606] bar.c:92 + 2799 gomp_sem_wait (in libgomp.1.dylib) + 40 [0x10862d488] sem.c:71 + 2799 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff53677589] + 2799 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff534aea16] 2799 Thread_58184398 + 2799 ??? (in <unknown binary>) [0x206000000000] + 2799 ??? (in <unknown binary>) [0x7f9679c032b8] + 2799 gomp_barrier_wait_end (in libgomp.1.dylib) + 86 [0x10862d606] bar.c:92 + 2799 gomp_sem_wait (in libgomp.1.dylib) + 40 [0x10862d488] sem.c:71 + 2799 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff53677589] + 2799 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff534aea16] 2799 Thread_58184399 + 2799 ??? (in <unknown binary>) [0x206000000000] + 2799 ??? (in <unknown binary>) [0x7f9679c034b8] + 2799 gomp_barrier_wait_end (in libgomp.1.dylib) + 86 [0x10862d606] bar.c:92 + 2799 gomp_sem_wait (in libgomp.1.dylib) + 40 [0x10862d488] sem.c:71 + 2799 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff53677589] + 2799 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff534aea16] 2799 Thread_58184400 + 2799 ??? (in <unknown binary>) [0x206000000000] + 2799 ??? (in <unknown binary>) [0x7f9679d00118] + 2799 gomp_barrier_wait_end (in libgomp.1.dylib) + 86 [0x10862d606] bar.c:92 + 2799 gomp_sem_wait (in libgomp.1.dylib) + 40 [0x10862d488] sem.c:71 + 2799 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff53677589] + 2799 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff534aea16] 2799 Thread_58184401 2799 ??? (in <unknown binary>) [0x206000000000] 2799 ??? (in <unknown binary>) [0x7f9679d00318] 2799 gomp_barrier_wait_end (in libgomp.1.dylib) + 86 [0x10862d606] bar.c:92 2799 gomp_sem_wait (in libgomp.1.dylib) + 40 [0x10862d488] sem.c:71 2799 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff53677589] 2799 __psynch_cvwait (in libsystem_kernel.dylib) + 10 [0x7fff534aea16] Total number in stack (recursive counted multiple, when >=5): 7 __psynch_cvwait (in libsystem_kernel.dylib) + 0 [0x7fff534aea0c] 7 _pthread_cond_wait (in libsystem_pthread.dylib) + 732 [0x7fff53677589] 7 gomp_barrier_wait_end (in libgomp.1.dylib) + 86 [0x10862d606] bar.c:92 7 gomp_sem_wait (in libgomp.1.dylib) + 40 [0x10862d488] sem.c:71 6 ??? (in <unknown binary>) [0x206000000000] Sort by top of stack, same collapsed (when >= 5): __psynch_cvwait (in libsystem_kernel.dylib) 19593