pthreads differences between glibc 2.0 and 2.1?

pthreads differences between glibc 2.0 and 2.1?

Post by Derrick J Brashea » Fri, 26 Nov 1999 04:00:00



I have a library which is a wrapper around pthreads, providing another API
for backward compatibility. It works with pthreads on several other
platforms, and worked with the pthreads in glibc 2.0.7; However with glibc
2.1 it no longer works for the programs that I have that link against it.

The application I'm interested in when used with this library and glibc
2.0.7 started about 20 clones. Under 2.1 if left to background itself, the
process is not cloned. If run in "no fork" mode it clones itself but a
deadlock condition results anyhow.

Does this sound familiar to anyone? Is there anywhere I can read more
about the changes in glibc pthreads between 2.0 and 2.1? A look at the
glibc pages revealed nothing.

I'm reluctant to call this a glibc bug until I understand what's going on;
Hence, no bug report has been filed.

-D

 
 
 

pthreads differences between glibc 2.0 and 2.1?

Post by Rene van Paasse » Fri, 26 Nov 1999 04:00:00



Quote:> I have a library which is a wrapper around pthreads, providing another API
> for backward compatibility. It works with pthreads on several other
> platforms, and worked with the pthreads in glibc 2.0.7; However with glibc
> 2.1 it no longer works for the programs that I have that link against it.

> The application I'm interested in when used with this library and glibc
> 2.0.7 started about 20 clones. Under 2.1 if left to background itself, the
> process is not cloned. If run in "no fork" mode it clones itself but a
> deadlock condition results anyhow.

> Does this sound familiar to anyone? Is there anywhere I can read more
> about the changes in glibc pthreads between 2.0 and 2.1? A look at the
> glibc pages revealed nothing.

The problem sounds familiar, but I don't have a solution yet. I
developed a program that uses threading, mutexes and conditions, as
well as an execlp to start a different process. It can run in
single-thread mode, and in multi-thread mode. What we are experiencing
is a deadlock when run in multi-thread mode, it still runs in single
thread mode (however, we still use the mutexes and conditions in this
case).

The strangest thing is that it crashes gdb as soon as the program is
loaded. I have not yet found a trimmed down version that also does this.

This program works on redhat 5.2, but stopped working on 6.0 and 6.1 .

Quote:> I'm reluctant to call this a glibc bug until I understand what's going on;
> Hence, no bug report has been filed.

If you find anything, please let me know. I installed redhat 6.1 on my home
machine to force myself to start looking for the bug.

good luck,

        Rene

--

Faculty of Aerospace Engineering                
                                         Delft University of Technology
The Netherlands