Bug 4633 - rsync mirror fails when using -a/-o/-g options
rsync mirror fails when using -a/-o/-g options
Status: RESOLVED INVALID
Product: rsync
Classification: Unclassified
Component: core
2.6.3
x86 Linux
: P3 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-17 13:18 UTC by klaus.steden
Modified: 2007-05-17 13:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description klaus.steden 2007-05-17 13:18:05 UTC
Attempting to rsync between two RHEL4 systems across WAN.

When using the following command-line, everything works fine:

rsync -rlptD  --verbose --progress rsync://jeeves.trno/redhat/RHEL4/ /usr/tmp

Things fail when using the following command-line:

rsync -rlptDo  --verbose --progress rsync://jeeves.trno/redhat/RHEL4/ /usr/tmp

(will also fail if using '-g' instead of '-o', or using '-a' option instead of '-rlptogD').

Failure message on the client side is:

receiving file list ...
rsync: connection unexpectedly closed (4 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)

Running the 'rsync-debug' wrapper (found on the rsync site) to generate strace logs displays a whole pile of strange-looking errors on the server side:

-- cut --

stat64("/etc/localtime", 0xbff52660)    = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
write(3, "2007/05/17 14:09:13 [30331] rsyn"..., 101) = 101
fcntl64(0, F_GETFL)                     = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl64(0, F_GETFL)                     = 0x802 (flags O_RDWR|O_NONBLOCK)
time(NULL)                              = 1179425353
select(1, NULL, [0], NULL, {60, 0})     = 1 (out [0], left {60, 0})
write(0, "I\232LF", 4)                  = 4
select(1, [0], [], NULL, {60, 0})       = 1 (in [0], left {59, 992000})
read(0, "\0\0\0\0", 4)                  = 4
lstat64("/RHEL4/.", {st_mode=S_IFDIR|0775, st_size=107, ...}) = 0
chdir("/RHEL4")                         = 0
lstat64(".", {st_mode=S_IFDIR|0775, st_size=107, ...}) = 0
mmap2(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fa7000
mmap2(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f86000
open("/etc/passwd", O_RDONLY)           = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/sse2/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686/sse2", 0xbff4da9c) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686", 0xbff4da9c)     = -1 ENOENT (No such file or directory)
open("/lib/tls/sse2/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/sse2", 0xbff4da9c)     = -1 ENOENT (No such file or directory)
open("/lib/tls/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls", 0xbff4da9c)          = -1 ENOENT (No such file or directory)
open("/lib/i686/sse2/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/i686/sse2", 0xbff4da9c)    = -1 ENOENT (No such file or directory)
open("/lib/i686/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/i686", 0xbff4da9c)         = -1 ENOENT (No such file or directory)
open("/lib/sse2/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/sse2", 0xbff4da9c)         = -1 ENOENT (No such file or directory)
open("/lib/libnss_nis.so.2", O_RDONLY)  = -1 ENOENT (No such file or directory)
stat64("/lib", 0xbff4da9c)              = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/sse2/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/i686/sse2", 0xbff4da9c) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/i686", 0xbff4da9c) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/sse2/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/sse2", 0xbff4da9c) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls", 0xbff4da9c)      = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/sse2/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/i686/sse2", 0xbff4da9c) = -1 ENOENT (No such file or directory)
open("/usr/lib/i686/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/i686", 0xbff4da9c)     = -1 ENOENT (No such file or directory)
open("/usr/lib/sse2/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/sse2", 0xbff4da9c)     = -1 ENOENT (No such file or directory)
open("/usr/lib/libnss_nis.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib", 0xbff4da9c)          = -1 ENOENT (No such file or directory)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

-- cut --

However, on the server side, /etc/localtime exists, as do /etc/ld.so.cache, /etc/passwd, and /lib/libnss_nis.so.2. So I'm scratching my head on this one ... anyone ever seen this sort of failure from rsync before?
Comment 1 klaus.steden 2007-05-17 13:49:18 UTC
Did some more digging around in Google, and found this:

http://lists.centos.org/pipermail/centos/2005-March/003386.html 

and this:

http://lists.centos.org/pipermail/centos/2005-March/003389.html

I ran the sample code on the rsync server in the aforementioned bug, and was able to reproduce the behaviour I'm seeing with rsync (according to 'strace', the same flailing search for 'libnss_nis.so' takes place, followed by a segfault).

Now the question is ... is rsync chroot'ing by default? Should it? (Can I make it not do that? :-)
Comment 2 klaus.steden 2007-05-17 13:53:10 UTC
This is a problem with libc, not with rsync, so I'm closing it. Sorry for the avalanche of messages, inserting 'use chroot = no' into /etc/rsyncd.conf eliminates the segfault problem.