In parallel.c, if HAVE_SYNC_BUILTINS is #undef'ed, then GOMP_parallel_end uses a mutex to atomically modify the team->nthreads field. The mutex that is used to atomically write to nthreads is locked but never unlocked.
parallel.c, GOMP_parallel_end: #ifdef HAVE_SYNC_BUILTINS __sync_fetch_and_add (&gomp_remaining_threads_count, 1UL - team->nthreads); #else gomp_mutex_lock (&gomp_remaining_threads_lock); gomp_remaining_threads_count -= team->nthreads - 1; #endif -- Summary: parallel.c: GOMP_parallel_end locks a mutex but fails to unlock it after atomic operation complete Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: shreyasp at ti dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45240