2.6.0 "file has vanished" fails to set exit code on local client

John Van Essen vanes002 at umn.edu
Wed Jan 14 04:38:23 GMT 2004

On Tue, 13 Jan 2004, Wayne Davison <wayned at samba.org> wrote:
> On Wed, Jan 07, 2004 at 02:11:35AM -0600, John Van Essen wrote:
>> But if the client is local and the server is remote, IOERR_VANISHED
>> gets set on the remote server, but is never passed to the local
>> client (the io_error value is passed at the end of the file list,
>> not during or after the file transfer phase).
> Yes it is, it is passed as the exit code.  In the tests I just ran, the
> new error message appears if both sides are 2.6.0:
> rsync warning: some files vanished before they could be transfered (code 24) at main.c(1064)

I didn't get that message at all.

> and the new error code (24) is still returned when a 2.6.0 rsync is
> sending to an older rsync (though the error is unexplained):
> rsync error: unexplained error (code 24) at main.c(1045)
> The old message appears if the sending side is 2.5.7 or older (here the
> receiver is 2.6.0):
> rsync error: some files could not be transferred (code 23) at main.c(1064)
> So, what test case do you have that shows a failure?

I am doing pulls (remote is the sender).  The problem also occurs
when pulling from a daemon.

Are you by any chance doing internal rsyncs?  The problem may
not happen then (and it does not happen when doing pushes).
But it definitely happens during pulls.

I looked at the code (as explained in my original post) and I
can see why this problem occurs on a pull.  It won't occur on
a push because it's the client (operating as a local sender)
that sets IOERR_VANISHED, and thus it gets properly reported
and the proper exit code is returned when pushing.

BTW, how do you do a test case for a vanished file?  You'd have
to put a sleep ay the beginning of the generator or something
to give you a chance to delete a file to make it vanish.

For the record, here's the output when doing a non-daemon pull:

receiving file list ... done
deleting prod/www/phpAdsNew-rc42/cache/cache-325b0aa69079bd5fb2bbead537628e67.php
[ snip ]
file has vanished: "/gate/prod/www/phpAdsNew-rc42/cache/cache-45c4e1728897eaf542d0cbea598d6835.php"
file has vanished: "/gate/prod/www/phpAdsNew-rc42/cache/cache-7e0cefc9e2ddcb62e4f4fd8e22f84926.php"
[ snip ]

wrote 109283 bytes  read 17331144 bytes  505519.62 bytes/sec
total size is 3118698885  speedup is 178.82

rsync exited with exit code 0 after 35 seconds

(That last 'rsync exited' line is from my backup script, which
always reports the exit code and the elapsed time for the rsync.)

So as you can see, files vanished, no "rsync error:" message was
displayed, and the exit code was 0.

        John Van Essen  Univ of MN Alumnus  <vanes002 at umn.edu>

More information about the rsync mailing list