samba-bugs at samba.org
2011-Aug-30 04:01 UTC
[Bug 8423] New: Listing a non-existent remote directory hangs
bugzilla.samba.org/show_bug.cgi?id=8423 Summary: Listing a non-existent remote directory hangs Product: rsync Version: 3.1.0 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: core AssignedTo: wayned at samba.org ReportedBy: chris at onthe.net.au QAContact: rsync-qa at samba.org Listing a non-existent remote directory causes rsync to "hang" (it's not really hung, it's very busy doing nothing...). Current git (5561c14). Listing non-existent file fails as expected: local$ ./rsync-3.1.0dev-5561c14-x64 --rsync-path=/tmp/rsync-3.1.0dev-5561c14-x64 remote:/tmp/foo rsync: link_stat "/tmp/foo" failed: No such file or directory (2) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at ../rsync/main.c(1635) [Receiver=3.1.0dev-5561c14] rsync: [Receiver] write error: Broken pipe (32) local$ Listing non-existent directory doesn't return: local$ ./rsync-3.1.0dev-5561c14-x64 --rsync-path=/tmp/rsync-3.1.0dev-5561c14-x64 remote:/tmp/foo/ rsync: change_dir "/tmp/foo" failed: No such file or directory (2) Strace of local side: local$ strace -p ${pid} select(0, NULL, NULL, NULL, {0, 20000}) = 0 (Timeout) wait4(20466, 0x7fffe3bd3f7c, WNOHANG, NULL) = 0 select(0, NULL, NULL, NULL, {0, 20000}) = 0 (Timeout) wait4(20466, 0x7fffe3bd3f7c, WNOHANG, NULL) = 0 select(0, NULL, NULL, NULL, {0, 20000}) = 0 (Timeout) wait4(20466, 0x7fffe3bd3f7c, WNOHANG, NULL) = 0 select(0, NULL, NULL, NULL, {0, 20000}) = 0 (Timeout) wait4(20466, 0x7fffe3bd3f7c, WNOHANG, NULL) = 0 select(0, NULL, NULL, NULL, {0, 20000}) = 0 (Timeout) wait4(20466, 0x7fffe3bd3f7c, WNOHANG, NULL) = 0 select(0, NULL, NULL, NULL, {0, 20000}) = 0 (Timeout) wait4(20466, 0x7fffe3bd3f7c, WNOHANG, NULL) = 0 select(0, NULL, NULL, NULL, {0, 20000}) = 0 (Timeout) wait4(20466, 0x7fffe3bd3f7c, WNOHANG, NULL) = 0 select(0, NULL, NULL, NULL, {0, 20000}) = 0 (Timeout) wait4(20466, 0x7fffe3bd3f7c, WNOHANG, NULL) = 0 [...continues very quicky] Strace of remote side: remote$ strace -p ${pid} Process 8398 attached - interrupt to quit select(1, [0], [], [0], {11, 434460}) = 0 (Timeout) select(2, [0], [1], [0], {30, 0}) = 1 (out [1], left {29, 999997}) write(1, "\0\0\0\7", 4) = 4 select(1, [0], [], [0], {30, 0} (Timeout) select(2, [0], [1], [0], {30, 0}) = 1 (out [1], left {29, 999997}) write(1, "\0\0\0\7", 4) = 4 select(1, [0], [], [0], {30, 0} [...continues slowly] -- Configure bugmail: bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
samba-bugs at samba.org
2011-Sep-11 18:15 UTC
[Bug 8423] Listing a non-existent remote directory hangs
bugzilla.samba.org/show_bug.cgi?id=8423 Wayne Davison <wayned at samba.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Wayne Davison <wayned at samba.org> 2011-09-11 18:15:55 UTC --- In the case where the chdir failed, rsync was setting an I/O error prior to aborting (due to an empty file list), and that would trigger an attempt to stick around waiting for a clean exit, even though it hadn't output enough protocol data to tell the remote side everything was done. I have changed the code to force this premature exit to exit w/o delay. I should probably revisit this empty-flist abnormal exit sequence in order to make the protocol behave more cleanly, but this fix is good enough for now. Thanks for the report! -- Configure bugmail: bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.