Wayne,

I've applied your simple nohang patch. The longer nohang patch I'm not
nearly as confident of. It goes back to a method used in early
versions of rsync where it uses a buffer that can grow indefinately. 

Just some history on this. The earliest versions of rsync had no
buffer, then when I first saw hangs I added a growing buffer very
similar to what your patch adds. Several people found that it grew to
enormous sizes and brought the machine to its knees. I then added an
arbitrary limit on its size (about 4M I think) and then some people
found they got hangs when that filled up. Then I got rid of the
buffer, and we did the pipe/socketpair thing which reduced the hangs a
lot. Next it was discovered that the error pipe could still cause
hangs, and I have fixed that in the current CVS tree, but without a
infinitely growing buffer. Now perhaps you have discovered another
(much less common) way for it to hang, but I don't think the solution
is a buffer. Instead we need a way of reproducing the bug and see if
we can find a solution without a buffer.

The horrors of a badly designed prototcol :(


Reply via email to