bug-cvs
[Top][All Lists]
Advanced

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

cvs 1.11.1p1 server: fails to detect errors (causes "Protocol error: unc


From: Stewart Brodie
Subject: cvs 1.11.1p1 server: fails to detect errors (causes "Protocol error: uncounted data discarded" errors)
Date: Wed, 07 Nov 2001 10:58:12 GMT
User-agent: Messenger-Pro/2.58beta3 (Newsbase/0.61b) (RISC-OS/4.00-Ursula002f)

To recap from an earlier report:

Our CVS erver (1.11.1p1, on x86 Solaris 2.7) sometimes returns faults:

  Protocol error: uncounted data discarded

Typically, the error is generated during a "cvs checkout" operation, although
it has been seen less often in a "cvs update".  All clients are accessing the
server using pserver.


New information:

After further investigation, it looks like the cause of this error is a
failure to detect an out of memory condition from the 3 calls to
buf_input_data in server.c (at around lines 3014, 3086, 3111)

buf_input_data is documented as returning -2 if buffer memory could not be
allocated, but the server.c code checks the return value for being either -1
or greater than 0.

One possible fix would be for buf_input_data to return ENOMEM instead of -2
to indicate the memory exhaustion problem at line 704 of buffer.c

I am unsure what else to propose as a fix for this except inserting the text

               else if (status == -2)
               {
                   buf_output0 (buf_to_net, "E memory exhaustion\n");
                   goto error_exit;
               }

in between the checks for -1 and >0 in each of the three cases.

Perhaps a better solution would be to wait for memory to become available? 
If any allocated output buffers could be flushed, then buffers would become
available.

-- 
Stewart Brodie, Senior Software Engineer          CVS administration team
Pace Micro Technology PLC
645 Newmarket Road
Cambridge, CB5 8PB, United Kingdom         WWW: http://www.pacemicro.com/



reply via email to

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