Found the cause of the hang with -vvv

Carson Gaspar carson+rsync at taltos.org
Wed Jan 7 02:06:25 GMT 2004


If rsync is invoked with -vvv, it invokes the server with -vvv as well. 
Testing with a client -> server sync:

During recv_file_name(), the server does:

		if (verbose > 2) {
			rprintf(FINFO, "recv_file_name(%s)\n",
				f_name(flist->files[i]));
		}

which end up in mplex_write().

However, the client _never_ reads during send_file_list() (as far as I can 
tell).

Eventually, the pipe from the server to the client fills up, causing the 
server to hang waiting for the socket to become writeable.

After some time, (as the server is now stalled forever), the pipe from the 
client to the server fills up, causing the client to hang waiting for the 
socket to become writeable.

And now we have a deadlock.

Either the server should _never_ write during recv_file_list(), or the 
client has to check for input during send_file_list(). Sadly, I haven't 
been able to figure out where to modify the code so that the client reads 
the FINFO messages and sends them to stdout/stderr.

Can someone who better understands the rsync code base fix this, or hand me 
a few more clues so I can fix it myself?

-- 
Carson



More information about the rsync mailing list