Re: NoCatSplash bugs

"Casey T. Deccio" <[email protected]>
Newsgroups gmane.network.nocat
Organization Sandia National Laboratories
Message-ID <[email protected]>
On Mon, 2005-08-08 at 17:08 +0200, Kristoffer Koch wrote:
> I also think that the sockets dont get set to non-blocking, as the
> splashd sometimes hangs while reading a client (browser) for header
> data. It hangs until one hits stop in the browser (disconnects). At
> the moment, I cant reproduce this bug, but I have observed it a couple
> of times.
> 

In the current implementation the server blocks when receiving the
client request, as you mentioned.  This blocking characteristic was
actually written as a kind of temporary fix for some incorrect
functionality in the glib code.  The previous code (pre 0.93pre2?) was a
better technique (though some additional patches would need to be
applied to it at this point) and non-blocking, but the server would only
receive the first packet in any given http request, at which point it
would terminate the connection.  I'm convinced that the problem is with
the glib (GIOChannel watching/reading) library because when I upgraded
to glib2, the old code worked okay.  However, glib2 will not be used in
NoCatSplash because of the size of the library.

> It might also be a good idea to use SO_REUSEADDR? (nice when it
> crashes and has to be restarted, so that one dont have to wait
> "forever")
> 

The NoCatSplash code already uses the SO_REUSEADDR option on the socket,
but there are other difficulties with using it.  I haven't fully
scrutinized the problem, but [1] disusses some of the issues.  I've
experimented with other ways to address this, but have been unsuccessful
in finding something better.

[1] http://hea-www.harvard.edu/~fine/Tech/addrinuse.html
-- 
Casey T. Deccio
Network Operations
Sandia National Laboratories
Livermore, CA, USA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.