Ming Zhang
2007-Dec-14 16:43 UTC
rsync dead loop (almost) forever in read_timeout() if remote host down
Hi All This can be reproduced easily. run rsync under gdb and set a break point at read_timeout(). then after rsync talk with remote rsync daemon and stop at this function, turn off remote machine directly. then let rsync run and it will run forever in this function. if we just kill remote rsync daemon, it is fine and quickly detected, because OS do clean up work. But if power off the box directly. a half open socket is left at rsync client side. i know rsync set KEEPALIVE, but on my RHEL4 box, rsync still loop in the function after 3 hours.... maybe KEEPALIVE in OS is broken. but can rsync have an application level heatbeat to detect such failure? -- Ming Zhang @#$%^ purging memory... (*!% http://blackmagic02881.wordpress.com/ http://www.linkedin.com/in/blackmagic02881 --------------------------------------------