[Gc] I/O issues

Nicolas Cannasse ncannasse at motion-twin.com
Fri Sep 12 02:42:28 PDT 2008


Nicolas Cannasse a écrit :
> Hello,
> 
> Sorry for the multiple messages recently, we could fix a lot of things 
> thanks to the help of the people on the list.
> 
> We are still experiencing one last issue, which is related to I/O 
> functions.
> 
> In some rare cases, two of our threads get blocked in a I/O function 
> (either recv() , fread() , or __read_nocancel()). The two threads are 
> usually unrelated - one can be a MYSQL response beeing read while the 
> other is reading a file - but they get blocked at the same time. Seems 
> like a deadlock to me.

We got further informations.

Some fread() calls which should be perfectly safe sometimes return with 
an error, and errno is set to EBADF , ENOTCONN or even EAGAIN. We don't 
seem to get EINTR at all.

We also had this strange thing several times where on MySQL connection 
would simply use another Database than it was connected to in the middle 
  of a request.

It seems to me like the file descriptors get somehow mixed up, so we 
happen to perform I/O on a FD that was not the one we just opened. If we 
reached the max FD count, then we should get an error on either accept() 
or fopen() and not this kind of problem I guess, unless the GC signals 
cause some troubles here.

Seems very strange, any advice ?

Best,
Nicolas



More information about the Gc mailing list