rsync on cygwin is hanging
jw schultz
jw at pegasys.ws
Tue Jul 22 09:24:40 EST 2003
On Sat, Jul 19, 2003 at 04:06:54PM -0400, Jeff Hedlund wrote:
>
> I am trying to backup a Windows machine to a Linux machine using rsync
> (over ssh).
>
> I have been able to successfully sync a few files at a time, but when I
> try to backup an entire tree the process hangs on both machines.
>
> I believe this is a different problem than one posted on here before,
> but I did try this patch with no success:
> http://www.mail-archive.com/rsync@lists.samba.org/msg07525.html
>
> When I try to rsync a tree, it will usually create a partial directory
> structure and download a few files and then hang.
>
> Linux: RH 7.3, rsync 2.5.6, OpenSSH_3.1p1
> Cygwin: 5.0, rsync 2.5.6, OpenSSH_3.6.1p1
>
> Let me know if more information is needed (and I apologize if too much
> is sent) :).
>
> I am running the following on the linux machine:
> rsync -vvrltDH --numeric-ids -pgo --stats --exclude-from=exclude.list
> --rsh="ssh" user at host:c:/WINNT/ tree
It looks like the rsync server on cygwin is failing to
return from a write to stdout.
I know (from prior offline discussion) you are using ssh key
based command restriction via a wrapper script on the linux
rsync servers. Are you using a ssh key based command
restriction here as well? You don't mention that anywhere
in this email.
If you are running rsync via a wrapper script does the
script exec the rsync command or run it as a child process?
I trimmed the traces a bit to better reflect suitable
inlining. You have a bad problem with linewrap messing up
the traces.
See my comments below and the cygwin annotations. This is
the first time i've seen a cygwin strace. Interesting.
>
> Here is the tail end of the output from that command where it hangs:
>
> --- rsync.out ---
> system32/wbem/mof/
> system32/wbem/mof/bad/
> system32/wbem/mof/good/
> system32/wins/
> twain_32/
> twain_32/fjscan/
> twain_32/fjscan/fcpa/
> twain_32/logiscan/
> twain_32/miitwain/
> wudnld20.tmp/
> --- eof: rsync.out ---
>
> Here is the strace on the linux machine where it hangs:
>
> --- strace.out (on linux machine) ---
[snip]
> lstat64("winrep.exe", 0xbffffa20) = -1 ENOENT (No such file or
> directory)
> lstat64("wudnld20.tmp", 0xbffffa20) = -1 ENOENT (No such file or
> directory)
> mkdir("wudnld20.tmp", 040700) = 0
> lstat64("wudnld20.tmp", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
> time(NULL) = 1058644307
> utime("wudnld20.tmp", [2003/07/19-15:51:47, 2002/01/25-01:17:08]) = 0
> lchown32(0x8074940, 0x220, 0x201) = 0
> write(1, "wudnld20.tmp/\n", 14) = 14
> select(8, [7], [4], NULL, {60, 0}) = 1 (out [4], left {60, 0})
> write(4, "\274\2\0\0\0\0\0\0\202\36\0\0\0\0\0\0\274\2\0\0\0\0\0\0"...,
> 3916)
> = 3916
> select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout)
> select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout)
> select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout)
> select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout)
> select(8, [3 7], NULL, NULL, {60, 0}) = 0 (Timeout)
> select(8, [3 7], NULL, NULL, {60, 0}
> --- eof: strace.out (on linux machine) ---
Waiting for another process to send something.
> Here is the output of the child rsync process on the linux box:
>
> --- strace.out.3341 (child rsync on linux machine) ---
[snip]
> select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0})
> read(5, "TNAME\3\0\0\0\20\1\0\22nameSpaceSeparator\3"..., 4092) = 4092
> select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0})
> read(5, "\374\17\0\7", 4) = 4
> select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0})
> read(5, "\0\0\0\0\0\20\3A\0y\0\2\0\4\0\0\0\4\0\1\3\'\0\1\0\0\0h"...,
> 4092) = 4092
> select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0})
> read(5, "\374\17\0\7", 4) = 4
> select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0})
> read(5, "|\22\260\266\0\202*\20>\266\0\264\266\0\202\23\2\f\266"...,
> 4092) = 2662
> select(6, [5], NULL, NULL, {60, 0}) = 0 (Timeout)
> select(6, [5], NULL, NULL, {60, 0}) = 0 (Timeout)
> select(6, [5], NULL, NULL, {60, 0}) = 0 (Timeout)
> select(6, [5], NULL, NULL, {60, 0}) = 0 (Timeout)
> select(6, [5], NULL, NULL, {60, 0}) = 0 (Timeout)
> select(6, [5], NULL, NULL, {60, 0}) = 0 (Timeout)
> select(6, [5], NULL, NULL, {60, 0}
>
> --- eof: strace.out.3341 (child rsync on linux machine ---
Waiting for another process to send something.
> And finally, here is the tail end of the strace on the cygwin box:
>
> --- strace.out (on cygwin) ---
[snip and cleaned up to fix line-wrap errors]
start of write()
> 342 29382720 [main] rsync 2036 writev: writev (1, 0x226AC0, 1)
> 184 29382904 [main] rsync 2036 fhandler_base::write: binary write
> 222 29383126 [main] rsync 2036 fhandler_base::write: 4096 = write (0x226B30, 4 096)
> 193 29383319 [main] rsync 2036 writev: 4096 = write (1, 0x226AC0, 1), errno 0
completion of write()
good to know what that looks like
> 217 29383536 [main] rsync 2036 cygwin_select: 2, 0x0, 0x226B00, 0x0, 0x226AF0
> 351 29383887 [main] rsync 2036 dtable::select_write: /dev/pipew fd 1
> 181 29384068 [main] rsync 2036 cygwin_select: to->tv_sec 60, to->tv_usec 0, ms 60000
> 183 29384251 [main] rsync 2036 cygwin_select: sel.always_ready 1
> 181 29384432 [main] rsync 2036 select_stuff::cleanup: calling cleanup routines
> 184 29384616 [main] rsync 2036 set_bits: me 0xA0E5FD0, testing fd 1 (/dev/pipew)
> 183 29384799 [main] rsync 2036 set_bits: ready 1
> 179 29384978 [main] rsync 2036 select_stuff::poll: returning 1
> 181 29385159 [main] rsync 2036 select_stuff::cleanup: calling cleanup routines
> 181 29385340 [main] rsync 2036 select_stuff::~select_stuff: deleting select records
start of write()
> 338 29385678 [main] rsync 2036 writev: writev (1, 0x226AC0, 1)
> 184 29385862 [main] rsync 2036 fhandler_base::write: binary write
>
> --- eof: strace.out (on cygwin machine) ---
Ahh, write didn't complete. We have an i/o error outside of rsync.
>
>
> This particular run created a partial directory structure and one file:
> ./$NtServicePackUninstall$/2jl3vz7j.zip
>
> Any ideas?
>
> Thanks,
> Jeff
--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw at pegasys.ws
Remember Cernan and Schmitt
More information about the rsync
mailing list