I'm getting this rather annoying error quite reproducably.

I'm running on linux, aolserver 3.5.2 using nsvhr+nsunix (3_5 cvs tags).

I suspect the error has something to do with http keepalives, even though
nsvhr should be turning those off.  The problem never comes up when I'm
browsing my site using IE, but with mozilla as soon as I view a page that
has more than 1 or 2 images on it, the first image gets loaded, then the
nsvhr server spits out this error and hangs (doesn't even die gracefully).

I made the following patch to keep the server running.  It tries to check
that a fd is actually open before adding it to the select set, and logs a
bug if its not.  Although in mozilla some connections will still hang, the
server now keeps running; but this is a workaround and not an actual fix.
Is there something else that should be fixed?  Is there a better way to
check that the fd is valid?

-J

Index: sock.cpp
===================================================================
RCS file: /cvsroot/aolserver/aolserver/nsssl/Attic/sock.cpp,v
retrieving revision 1.1.2.1
diff -r1.1.2.1 sock.cpp
719,724c719,729
<         FD_SET(connPtr->sock, &set);
<         if (max < connPtr->sock) {
<             max = connPtr->sock;
<         }
<         if (timeout > connPtr->closetimeout) {
<             timeout = connPtr->closetimeout;
---
>         if (read(connPtr->sock,NULL,0) == 0) {
>             FD_SET(connPtr->sock, &set);
>             if (max < connPtr->sock) {
>                 max = connPtr->sock;
>             }
>             if (timeout > connPtr->closetimeout) {
>                 timeout = connPtr->closetimeout;
>             }
>         } else {
>             Ns_Log(Bug,"read fails: %s",
>          ns_sockstrerror(ns_sockerrno));

Reply via email to