working on a 2.5.6pre1 release

Wayne Davison wayned at users.sourceforge.net
Fri Jan 10 08:47:00 EST 2003


On Thu, Jan 09, 2003 at 05:09:07PM -0600, Dave Dykstra wrote:
> I'm stuck on a problem that some machines on build.samba.org are
> showing on the 'chgrp' test.

I've checked in a fix for this bug.  Here's what I discovered:

The reason only the chgrp test failed is that it is the only test that
uses -vvv instead of just -vv.  This is significant because -vvv is
needed for the receiver to try to do IO after killing off the generator.
This IO would sometimes fail if the generator died before it finished.

More specific details:

(Background) The receiver forks off the generator with an error pipe
open from the generator to the receiver.  The receiver notes this
error-receiving fd so that it gets monitored on all IO (and thus remains
unblocked).

(The bug) When the receiver signals the generator to die, it was not
clearing io_error_fd, and thus if it did any IO that just happened to
occur after the generator closed its end of the pipe, the IO would
notice the EOF on io_error_fd and cause the receiver to exit with
error 12.  Now that rsync properly notices the return value of the
receiver process, this causes the sender to also exit with an error.

(The fix) Just call io_set_error_fd(-1) prior to signaling the generator
to die.

I've appended the patch I just checked in.

..wayne..

---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: main.c
--- main.c	9 Jan 2003 19:04:06 -0000	1.157
+++ main.c	10 Jan 2003 08:28:39 -0000
@@ -461,6 +461,7 @@
 	}
 	io_flush();
 
+	io_set_error_fd(-1);
 	kill(pid, SIGUSR2);
 	wait_process(pid, &status);
 	return status;
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---



More information about the rsync mailing list