Must really be safe_read(), not full_read()? (was: [PATCH] fix httpd lockup in cgi POSTs)

Rob Landley rob at landley.net
Thu Feb 15 23:01:13 UTC 2007


On Thursday 15 February 2007 4:53 pm, Paul Albrecht wrote:
> Thanks for clarifying what the standard is for pipes, but this doesn't
> really help much because it's a fact that busybox httpd fails
> intermittently when the I run a simple cgi script to redirect a request.
> 
> It doesn't seem to me to do much good to fall back on a standard if the
> it isn't applicable in the real world. The user receiving garbage back
> from a web server doesn't really care if the server is standard
> conforming or not.

I didn't say there wasn't a bug, just that it's not in the Linux pipe 
implementation. :)

> Again, it's a fact that a simple cgi program that returns status back to
> the busybox httpd server will intermittently fail in the manner I have
> previously described.

Taking a wild guess without actually looking at the httpd code: nobody said 
that sigchild's delivery had to be delayed until a process that performs a 
blocking read gets scheduled again, just that if you do a read _after_ 
getting sigchild you should get all pending data in one gulp (or EOF).

> If you're suggesting the it's a kernel bug perhaps you should post it to
> the linux kernel mailing list because that's what I'm using for an
> operating system.

I'm not suggesting it's a kernel bug.  Lots and lots of other people would 
have hit it by now.

Rob
-- 
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery



More information about the busybox mailing list