On Sat, Oct 31, 1998, Ben Laurie wrote:
> >[...]
> > | nRead=saferead(nFD,&usLength,sizeof usLength);
> > | assert(nRead == sizeof usLength);
> >
> > Here the assert makes sure that really the requested number of bytes are read.
> > But when an I/O error or some other communication problem occurs the actual
> > number of read bytes can be different. Then the gcache process falls down.
> > And I've seen exactly gcache exits with this assertion on my boxes (Solaris
> > 2.6) while I was mostly sure that no personal attacker was involved. Instead
> > I really assume it was just some I/O communication error...
>
> This is exactly where it failed when gcache was crashing because of a
> bug. Could it be that you assumed there was a network error instead?
> Since gcache was fixed I have had no reports of this assertion failing.
May be, I've the error messages no longer available.
> I do not believe that an I/O error is possible on a locally connected
> socket.
But isn't this assumption at least _risky_, Ben?
> I would be most reluctant to fix this without evidence that it
> is actually a bug. Since this seems to be the thread for maxims, one of
> my favourites is "if you don't understand why it is broken, don't fix
> it", and I intend to stick to that.
That's a good maxim, of course.
But always do good prevention is another good maxim, too ;-)
You know: Just because one knows that on a one-way street cars can come only
from one side doesn't mean it isn't a good approach to look at both sides
before crossing the street...
Ralf S. Engelschall
[EMAIL PROTECTED]
www.engelschall.com
______________________________________________________________________
Apache Interface to SSLeay (mod_ssl) www.engelschall.com/sw/mod_ssl/
Official Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]