Cam
2004-Jul-22 18:09 UTC
Strange behaviour rsync pull from sun to ppc linux, Integer overflow - attempted 64 bit offset
Hi, I am running rsync on an embedded linux (ppc) like this: rsync -avvv sun::file-system/ /rsyncexperiment Where sun is a solaris machine that has rsync: rsync version 2.5.7 protocol version 26 Copyright (C) 1996-2002 by Andrew Tridgell and others <http://rsync.samba.org/> Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles, no IPv6, 64-bit system inums, 64-bit internal inums The ppc machine has rsync, the same version but there is a warning: rsync version 2.5.7 protocol version 26 Copyright (C) 1996-2002 by Andrew Tridgell and others <http://rsync.samba.org/> Capabilities: 64-bit files, no socketpairs, hard links, symlinks, batchfiles, IPv6, 64-bit system inums, 64-bit internal inums WARNING: no 64-bit integers on this platform! I have read the comment in rsync.h about suns and non 64 bit machines (maybe I haven't fully absorbed the meaning of it). I have files on the sun including devices but I'm not concerned about truncation when they are transferred to the embedded linux. The 'strange behaviour' is that the transfer completes and the sender seems to send a -1 (as seen in main.c) if (remote_version >= 24) { /* send a final goodbye message */ write_int(f_out, -1); } The reader reads this and gives an error: [...] recv_generator(var/spool/cron/crontabs,1866) recv_generator(var/spool/repackage,1867) recv_generator(var/state,1868) recv_generator(var/tmp,1869) recv_generator(var/ucd-snmp,1870) recv_files finished Integer overflow - attempted 64 bit offset rsync error: requested action not supported (code 4) at ../io.c(381) _exit_cleanup(code=4, file=../io.c, line=381): about to call exit(4) rsync: connection unexpectedly closed (35060 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at ../io.c(165) _exit_cleanup(code=12, file=../io.c, line=165): about to call exit(12) If I initiate the transfer from the sun, it completes successfully. So, is this a bug or expected behaviour? -Cam PS, in case it makes a difference, on the sun rsync is configured to run from inetd, and on the embedded machine it is run in daemon mode by hand. -- camilo@mesias.co.uk <--
Wayne Davison
2004-Jul-22 19:39 UTC
Strange behaviour rsync pull from sun to ppc linux, Integer overflow - attempted 64 bit offset
On Thu, Jul 22, 2004 at 07:09:03PM +0100, Cam wrote:> The 'strange behaviour' is that the transfer completes and the sender > seems to send a -1 (as seen in main.c)Not quite. The cause must come from someone calling either read_longint() or write_longint(), which can happen at the end of the transfer in the report() function (if you're doing a pull rather than a push). That is undoubtedly where the error you saw was coming from.> Capabilities: 64-bit files, no socketpairs, hard links, symlinks, batchfiles, > IPv6, 64-bit system inums, 64-bit internal inums > WARNING: no 64-bit integers on this platform!That's a weird contradiction there. I note that if the code in rsync.h can't find a 64-bit type, it falls back to using off_t. However, if off_t is actually 64-bits (as it was here), the code doesn't notice that. I've just checked in some changes into CVS that should take care of this case. ..wayne..