Hi, I discovered that rsync-2.6.0-r5 keeps a remaining process after you kill rsync on remote end. E.g.: 1. Start rsync --daemon on server (with timeout set) 2. Start rsync on client (with timeout set) 3. While exchanging a file you get three instances of rsync on the server like root 5047 0.0 0.2 1856 672 ? Ss 10:26 0:00 rsync --daemon root 5262 5.8 0.3 1860 980 ? S 10:31 0:09 \_ rsync --daemon root 5272 0.0 0.4 1996 1076 ? S 10:31 0:00 \_ rsync --daemon 4. Kill rsync on client while exchanging a file with kill or Ctrl-C 5. Child of rsync remains on server which will not be killed by timeout, so forever root 5047 0.0 0.2 1856 672 ? Ss 10:26 0:00 rsync --daemon root 5262 5.6 0.3 1860 980 ? S 10:31 0:09 \_ rsync --daemon The problem is that after doing this sometime you will anytime reach your max connections and not be able to sync anymore until you kill this processes by hand. Reproducible: Always Steps to Reproduce: 1. see Details 2. 3. Actual Results: remaining child process Expected Results: only one instance of rsync rsync-2.6.0-r5 on both ends
I've been poking around in the rsync source, so I thought I'd try to fix this bug, but I can't seem to reproduce it. I get only two processes during the file transfer (not 3), and the server process dies with the client. I am using the standard config provided with Gentoo (copied below); perhaps your config is different. --- 8< -------- # This line is required by the /etc/init.d/rsyncd script pid file = /var/run/rsyncd.pid use chroot = yes read only = yes timeout = 20 # Simple example for enabling your own local rsync server [gentoo-portage] path = /usr/portage comment = Gentoo Linux Portage tree
(In reply to comment #1) > I've been poking around in the rsync source, so I thought I'd try to fix this > bug, but I can't seem to reproduce it. Never mind. I see that the client has to be uploading. I guess I can reproduce it after all.
I have discovered a workaround. Add "#define SHUTDOWN_ALL_SOCKETS" to config.h. For more information, refer to the upstream bugzilla: https://bugzilla.samba.org/show_bug.cgi?id=3271
thanks for filing that