IO deadlock

Thorsten Kukuk kukuk@weber-eb.uni-paderborn.de
Tue Jul 21 23:28:00 GMT 1998


> 
> Thorsten Kukuk <kukuk@weber-eb.uni-paderborn.de> writes:
> 
> > I have a big problem with the current glibc snapshot, there is a
> > deadlock in the IO code. I have append an older version of the
> > getpass() function, which makes the problem reproduceable:
> 
> It stucks for me in the kernel and can only be killed, no C-c.  I now
> have to get my hacked version of strace running here to analyze the
> arguments passed to the signal handling functions.
> 

I have found the problem: We have a lock deadlock.
fflush() locks the stream, and _IO_SYNC, too. It will hang in _IO_SYNC
in flockfile().

There are some more functions, which makes a double lock on the stream.
Haven't found them all yet, but getpwuid_r will also hang.

There are some patches for gdb/glibc 2.0.7 for debugging threads.
As anybody tested them or applied them to the current snapshot ?

 Thorsten


-- 
Thorsten Kukuk  kukuk@vt.uni-paderborn.de
                http://www-vt.uni-paderborn.de/~kukuk
Linux is like a Vorlon.  It is incredibly powerful, gives terse,
cryptic answers and has a lot of things going on in the background.



More information about the Libc-hacker mailing list