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/

_______________________________________________
Bug-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-cvs

Reply via email to