bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #4992] Client/Server connection timeout


From: Derek Robert Price
Subject: [patch #4992] Client/Server connection timeout
Date: Fri, 24 Mar 2006 19:50:47 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

URL:
  <http://savannah.nongnu.org/patch/?func=detailitem&item_id=4992>

                 Summary: Client/Server connection timeout
                 Project: Concurrent Versions System
            Submitted by: dprice
            Submitted on: Fri 03/24/06 at 19:50
                Category: Feature (patch attached)
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
           Fixed Release: None
   Fixed Feature Release: None

    _______________________________________________________

Details:

Any thoughts on the attached patch to feature, other than the fact that I
haven't added test cases and doc yet?  It adds a connection timeout to the
client or server via a command line option.

The original impetus for this feature was a bunch of hung CVS servers on
Solaris that appear to be hung either in the read to or write from net
routines.  Since some of these servers were hung for weeks and the reporter
was fairly certain that the client connections were gone, it is fairly
obvious that SO_KEEPALIVE wasn't working as advertised on this system to
return an error when the connection breaks.

This was the fix I came up with.  It has the additional advantages of
noticing broken connections after a configurable amount of time (a working
SO_KEEPALIVE is defined such that it can take up to two hours to notice a
broken connection) and being a line of defense against simple DOS attacks
that might open multiple connections to a CVS server without sending data
across them in an attempt to create many servers and fill up the server's
available memory.

Once you have applied this patch, a simple test it to run `cvs --timeout 5
server' and see the error message output after 5 seconds.

I may have to add a bit of timeout code to the proxy server select()s as
well.  If this timeout feature is considered acceptable, I will add that with
tests and doc before committing the final version.





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 03/24/06 at 19:50  Name: ccvs-timeout.diff  Size: 7.89KB   By:
dprice
The patch to add a configurable timeout to client/server connections.
<http://savannah.nongnu.org/patch/download.php?item_id=4992&item_file_id=6071>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?func=detailitem&item_id=4992>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]