Joe Pruett
2005-Mar-09 16:00 UTC
[Centos] anyone else seeing problems with rsync daemon under centos
i just converted a server over to centos 4 and the rsync daemon is dying with a segv. i''ve checked the redhat bugzilla and googled around some and don''t see anything obvious. the client connects and authenticates, and the server starts sending some data but then dies after about 8k. strace''ing hasn''t shown anything obvious other than the segv. is anyone else succesfully using centos 4 as an rsync server?
Troy Engel
2005-Mar-09 17:21 UTC
[Centos] anyone else seeing problems with rsync daemon under
Hi Joe, I had a spare cycle for it, so I threw up a test for you real quick on my CentOS4 box -- it works like a champ for me, no segfaults. The core result: sent 123307724 bytes received 119616 bytes 3124742.78 bytes/sec total size is 122944318 speedup is 1.00 This was run via the RedHat stock xinetd.d/rsync method, not as a standalone daemon. /etc/rsyncd.conf: == snip =pid file = /var/run/rsynd.pid log file = /var/log/rsyncd.log secrets file = /etc/rsyncd.secrets [test] path = /opt/test comment = Test auth users = test list = false uid = root gid = wheel read only = false hosts allow = XXX.XXX.XXX.XXX (my ip) == snip = /etc/rsyncd.secrets: == snip =test:test == snip = Command run from client: rsync -av /usr/local/doc/ test@<myserver>.com::test hope this helps... -te Joe Pruett wrote:> i just converted a server over to centos 4 and the rsync daemon is dying > with a segv. i''ve checked the redhat bugzilla and googled around some and > don''t see anything obvious. > > the client connects and authenticates, and the server starts sending some > data but then dies after about 8k. strace''ing hasn''t shown anything > obvious other than the segv. > > is anyone else succesfully using centos 4 as an rsync server? > > _______________________________________________ > CentOS mailing list > CentOS@caosity.org > http://lists.caosity.org/mailman/listinfo/centos-- Troy Engel | Systems Engineer Fluid, Inc | http://www.fluid.com
Joe Pruett
2005-Mar-11 03:28 UTC
[Centos] Re: anyone else seeing problems with rsync daemon under
> i just converted a server over to centos 4 and the rsync daemon is dying > with a segv. i''ve checked the redhat bugzilla and googled around some and > don''t see anything obvious. > > the client connects and authenticates, and the server starts sending some > data but then dies after about 8k. strace''ing hasn''t shown anything > obvious other than the segv.another user was able to confirm similar problems and i finally started digging around with gdb and friends. what i have determined is that this is probably a bug in libc, with some help from rsync. the problem seems to be that rsync is chroot''ing and trying to map uids to names for the -o option (to preserve ownership). this only occurs if files are owned by someone other than root and the remote user has requested -o. in my particular case, i normally use nis and rsync is reading that from nsswitch.conf before chrooting. when it tries to map uids, it tries valiantly to find libnss_nis.so in the chroot area and fails and that seems to cause a segfault. if rsync chroot''ed earlier, this might not happen, or if i wasn''t using nis it might not happen. i haven''t been able to test the latter. what i was able to do was chown everything to root since then rsync short circuits the getpwuid and doesn''t crash. this is fine for now. i''ll be contacting the rsync maintainer to see if he has any input.
Joe Pruett
2005-Mar-11 05:05 UTC
[Centos] Re: anyone else seeing problems with rsync daemon under
and i just determined it is a libc bug. the code below will segfault (must be run as root for chroot to work). i''ll try to submit to redhat... #include <sys/types.h> #include <pwd.h> main() { struct passwd *p; chroot("/tmp"); chdir("/"); p = getpwuid(666); if (p) { printf("%s\n", p->pw_name); } exit(0); }