Mailing List Archive

hold the next release
I fixed a nasty bug in http_protocol.c where

while ((n= fread(buf, sizeof(char), IOBUFSIZE, f)) < 1
&& errno == EINTR)
continue;

gets into an endless loop on our solaris machine. Seems that if
a document contains the output of a script that fails, any
file I/O after that causes the httpd process to spin forever (no
alarm is set at this point since it was cleared by the spawn
code in alloc I think).

The "nasty" is the errno is set to EINTR (from the last timeout)
but fread is returning with an EOF condition (errno was not reset
since no error occured). Some OSs can handle this since they reset
errno, but apparently not solaris.


Since the man page for fread does say :

The ferror() or feof() routines must be used to distinguish
between an error condition and end-of-file condition.


I changed it to:

while ((n= fread(buf, sizeof(char), IOBUFSIZE, f)) < 1
&& ferror(f) && errno == EINTR)
continue;


And all is well :)


This may be the solaris nasty people have been hitting.


Cliff
Re: hold the next release [ In reply to ]
Sigh... I held up 0.8.10 yesterday because one of the two serious bugs
in David's "this really works!" patch to the error-log-locking stuff
had taken a server that works reliably on Solaris for some people, and
turned it into a server that worked reliably on Solaris for nobody (in
my view, an unacceptable regression). I guess I'm getting what I deserve.

However, this particular item, while clearly a bug, does not constitute
a regression for anybody --- plenty of people are making good use of
0.8.8 on Solaris (I've got one right down the hall from me), even with
this behavior, however undesirable, still there in the server. In the
meantime, we have had a *vast* improvement on 0.8.8 in hand for nearly
a week now, and we keep sitting on it while people all over the net
report bugs which we have already fixed, over and over and over. In my
view, a world in which 0.8.10 is released in its current condition is
better than a world in which *nothing* is released while we keep up the
endless round of "come on, it's just this one simple thing..." (does
anyone doubt there will be another tomorrow morning?)

I'm also not entirely sure about this "fix" --- if there's some other
system on which ferror() screws up, it wouldn't be the strangest thing
yet we've seen out of A/UX.

In my view, we should get 0.8.10 out the door now, as is, and put this
fix (along with many other fixes, already in hand, to bugs which affect
more people) into 0.8.11.

rst

PS --- Cliff, would it have killed you to do a context diff?
Re: hold the next release [ In reply to ]
> Sigh... I held up 0.8.10 yesterday because one of the two serious bugs

Release what we have. We can update again in a week or so.

It's better to show that the bugs are being fixed at a healthy rate.


rob
Re: hold the next release [ In reply to ]
On Sat, 19 Aug 1995 10:46:34 EDT, rst@ai.mit.edu (Robert S. Thau) wrote:

} However, this particular item, while clearly a bug, does not constitute
} a regression for anybody --- plenty of people are making good use of
} 0.8.8 on Solaris (I've got one right down the hall from me), even with
} this behavior, however undesirable, still there in the server. In the
} meantime, we have had a *vast* improvement on 0.8.8 in hand for nearly
} a week now, and we keep sitting on it while people all over the net
} report bugs which we have already fixed, over and over and over. In my
} view, a world in which 0.8.10 is released in its current condition is
} better than a world in which *nothing* is released while we keep up the
} endless round of "come on, it's just this one simple thing..." (does
} anyone doubt there will be another tomorrow morning?)

Fine, then release. One think we may wish to do is keep a
running patch list for users to see. That way we can stop
at least some of the bug report for people who bother to read.
}
} I'm also not entirely sure about this "fix" --- if there's some other
} system on which ferror() screws up, it wouldn't be the strangest thing
} yet we've seen out of A/UX.

If ferror() is busted the OS is seriously busted, it
is an easy thing to test for. If you are scared I guess you
could do a !feof() instead. I just think this reason being
concerned is lame. After all read() may be broken on some OS
so we should not use it...arg...ferror() is POSIX.

} In my view, we should get 0.8.10 out the door now, as is, and put this
} fix (along with many other fixes, already in hand, to bugs which affect
} more people) into 0.8.11.
}
} PS --- Cliff, would it have killed you to do a context diff?

Rarely do I post something which is not a diff. Unfortunately I hosed
a bunch of files durring the fixing with tons of debuging crap. It
was early in the AM and I thought it would be best to do the cleanup
when I was more awake. Since it was only one line I though people
could handle it. It was 1 of two fread() calls in the source file
so it was not hard to find.

Cliff
Re: hold the next release [ In reply to ]