Fwd: AMD64: dead-lock issue with gcc-4_0-branch libstdc++ and POSIX write locks.

Andrew Pinski pinskia@physics.uc.edu
Sat May 14 16:39:00 GMT 2005


Forwarding to the correct list about libstdc++.

-- Pinski

Begin forwarded message:

> From: Karel Gardas <kgardas@objectsecurity.com>
> Date: May 14, 2005 8:18:21 AM EDT
> To: gcc@gcc.gnu.org
> Subject: AMD64: dead-lock issue with gcc-4_0-branch libstdc++ and 
> POSIX write locks.
>
>
> Hello,
>
> in a process of installing new box I've found interesting issue: 
> MICO's IDL compiler dead-locks while compiled with 4.0.x, but not 
> while compiled with 3.4.4 (provided by OS). It is even more 
> interesting, since it dead-locks only when linked against 4.0.x's 
> libstdc++ but not when linked against 3.4.4's libstdc++ -- even if it 
> is compiled by 4.0.x compiler, so this is not miscompilation, but 
> rather some issue in libstdc++ itself. The library changes were done 
> by a matter of changing LD_LIBRARY_PATH. Also the problem is that I 
> don't remember seeing this issue on my old i686 box where I used 4.0.x 
> for development recently. Also this might not be an issue caused by 
> arch change, but caused by libc change: old system provides 2.2.5, but 
> new provides 2.3.2 version. I have also tried to find out if this is 
> the first invocation of pthread_rwlock_wrlock or it is not and it is 
> not, so MICO invokes few pthread_rwlock_wrlock calls before dead-lock 
> happen.
>
> The dead-lock itself looks:
>
> (gdb) bt
> #0  0x0000002a96940f8a in pthread_rwlock_wrlock () from 
> /lib/libpthread.so.0
> #1  0x0000002a95e6933d in MICOMT::RWLock::wrlock (this=0x6e0078) at 
> pthreads.h:382
> #2  0x0000002a95e694ce in AutoWRLock (this=0x7fbfffe880, l=@0x6e0078) 
> at os-thread.h:241
> #3  0x0000002a95e60f50 in CORBA::ORB::add_invoke (this=0x6dff30, 
> rec=0x6f9350) at orb.cc:2160
>
> The compiler is configured with:
>
> silence:~/tmp/mico3/demo/poa/hello-1$ c++ -v
> Using built-in specs.
> Target: x86_64-unknown-linux-gnu
> Configured with: ../gcc-4_0-branch/configure 
> --prefix=/home/karel/usr/local/gcc-4_0-branch-20050514 --enable-shared 
> --enable-threads --enable-languages=c++ --disable-checking 
> --enable-__cxa_atexit --disable-multilib
> Thread model: posix
> gcc version 4.0.1 20050514 (prerelease)
> silence:~/tmp/mico3/demo/poa/hello-1$
>
> The OS is Debian sarge amd64 port, which is pure 64bit port w/o 
> providing 32bit compatibility libraries, hence my usage of 
> --disable-multilib
>
> I've tested 4.0.0 release, snapshot from 20050507 and cvs checkout 
> from 20050514 and the issue is presented in every version.
>
>
> Is this already known issue reported somewhere or should I try to 
> debug it a bit more or test something specific for you?
>
> Thanks!
> Karel
>



More information about the Libstdc++ mailing list