libc_r: threaded application could stuck in accept(2)

Ruslan Ermilov ru at FreeBSD.org
Fri May 30 10:16:51 PDT 2003


On Fri, May 30, 2003 at 07:07:23PM +0300, Enache Adrian wrote:
> On Fri, May 30, 2003 at 05:35:41PM +0300, Ruslan Ermilov wrote:
> > We had a bug in our threaded application that would mistakenly close
> > the descriptor 0, and this triggers a bug in libc_r which I will try
> > to describe below.
> ...
> > Some important notes: this bug is only applicable to descriptors
> > 0 - 2 (stdio set), and might have something to do with the code
> > in uthread_fd.c.  If you remove two lines that free the descriptor
> > 0 in the attached test case, the bug won't manifest itself.
> 
> please have a look at
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=51535
> 
Thanks, I had this same patch in my first version of the fix.
Yes it works too, but do you have an insight what's going on
without these fixes so that the 0..2 descriptors are left in
a blocking mode?  I just can't get it where this happens.

P.S.  I will commit both patches after the freeze is over.


Cheers,
-- 
Ruslan Ermilov		Sysadmin and DBA,
ru at sunbay.com		Sunbay Software AG,
ru at FreeBSD.org		FreeBSD committer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20030530/fece91e5/attachment.bin


More information about the freebsd-hackers mailing list