This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/42624] libstdc++ parallel mode deadlocks in barrier
- From: "singler at kit dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jan 2010 14:29:30 -0000
- Subject: [Bug libstdc++/42624] libstdc++ parallel mode deadlocks in barrier
- References: <bug-42624-15165@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #16 from singler at kit dot edu 2010-01-15 14:29 -------
First, let's remove superfluous #pragma omp single in two occurences, to make
things simpler (see attached patch for trunk).
The problem still persists, the program deadlocks.
When dropping in some prints (see attached patch), the log ends like this:
find going parallel, requesting 2 thread
thread 0 of 2 starts
thread 0 finished
thread 1 of 2 starts
thread 1 finished
successful join
find going parallel, requesting 2 thread
thread 0 of 2 starts
thread 0 finished
Analysis: Thread 1 never starts (or at least does not reach the first printf).
In general, for more threads, only thread 0 starts. This obviously leads to
the deadlock.
So on first sight, I would blame it on the OpenMP implementation. Maybe yet
some interference with the pthreads. Any other explanations?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42624