rsync crashing under centos 4

Joe Pruett joey at clean.q7.com
Fri Mar 11 04:59:51 GMT 2005


the rsync in centos 4 (a recompile of rhel4) is version 2.6.3.  and under 
certain circumstances it will segfault when run in daemon mode.  i have 
tracked it down to the nss code in libc.  so this could be a general libc 
bug, but it is possible that rsync is doing things that don't help matters 
any.

the problem manifests when you have chroot mode on (which seems to be the 
default), have files on the server owned by someone other than root, and 
request an rsync with -o enabled.  this causes the server process to try 
to call getpwuid for the file uid and things segfault.  the underlying 
issue seems to be that after rsync forks the child process, it reads the 
system /etc/nsswitch.conf, then later on it chroots and when it tries to 
getpwuid, libc can't find the libnss files it needs and the code 
segfaults.

has this been seen before?  i haven't found anything while google'ing 
around and looking in the archives.  i have found a number of workarounds 
(disable chroot mode, chown everything to root, don't enable -o).  i am 
wondering if rsync could chroot earlier in the process and maybe avoid 
this problem?  i haven't done any experiments yet with libc to see if 
things could be helped by that.

anything else i can provide to be of help here?



More information about the rsync mailing list