On Thu, Sep 10, 2009 at 2:29 PM, Philip Guenther<guent...@gmail.com> wrote:
> It happens at initialization time of libpthread and is undone at exit
> and exec. B It applies to all fds. B There is no manpage, as it's not
> (supposed to be) application visible.

OK, so basically this is an OpenBSD/pthread bug.  I'm still sort of
shell-shocked here.  The idea is that *all* file descriptors are made
non-blocking, and then the file-descriptor syscalls are wrapped to
pretend they are blocking.  As long as all of the code operating on
those "pseudo-blocking" files is using the wrapped syscalls, all is
well.  However, when one of those files is accessed by a binary not
linked to libpthread, the illusion breaks down.

Do I have that right?

Why does the fcntl(fd, F_GETFL) fix it?  Does it really fix it, or are
we just lucky?

This sounds like more of a design bug than a code bug, so I don't
expect a fix in a 4.5 patch release.  So we'll need to do something to
work around it in Amanda.  Presumably this is a fairly common problem,
so what is the usual solution?

Dustin

--
Open Source Storage Engineer
http://www.zmanda.com

Reply via email to