Strange Hang over ssh

Jason Giglio jgiglio at smythco.com
Wed Sep 11 20:14:00 EST 2002


rsync-2.4.6-1  RPM on receiving side on Red Hat 7.3
rsync-2.4.6-13 Red Hat 7.2 RPM on sending side

Trying to do a "pull" from sender over ssh, rsync hangs after transferring very little data, usually on the first or second file.

strace rsync -avzur --bwlimit=35 -e ssh user at remote:/directory /local/directory

(init stuff)

read(5, "\375\217\177=", 4)             = 4
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, "\365\1\0\0", 4)                = 4
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, ">", 1)                         = 1
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, "\r", 1)                        = 1

(about 100 lines similar to this)

read(5, "\6", 1)                        = 1
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, "sysadm", 6)                    = 6
brk(0x807d000)                          = 0x807d000
socket(PF_UNIX, SOCK_STREAM, 0)         = 3
connect(3, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1750, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40015000
read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1750
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40015000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=45585, ...}) = 0
old_mmap(NULL, 45585, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40021000
close(3)                                = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\35\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=45415, ...}) = 0
old_mmap(NULL, 37848, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40015000
mprotect(0x4001e000, 984, PROT_NONE)    = 0
old_mmap(0x4001e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x9000) = 0x4001e000
close(3)                                = 0
munmap(0x40021000, 45585)               = 0
open("/etc/passwd", O_RDONLY)           = 3
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1234, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001f000
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1234
close(3)                                = 0
munmap(0x4001f000, 4096)                = 0
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, "\0\0\0\0", 4)                  = 4
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, "\365\1\0\0", 4)                = 4
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, "\7", 1)                        = 1
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, "storage", 7)                   = 7
brk(0x807e000)                          = 0x807e000
socket(PF_UNIX, SOCK_STREAM, 0)         = 3
connect(3, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
open("/etc/group", O_RDONLY)            = 3
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=575, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001f000
read(3, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 575
close(3)                                = 0
munmap(0x4001f000, 4096)                = 0
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, "\364\1\0\0", 4)                = 4
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, "\6", 1)                        = 1
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, "sysadm", 6)                    = 6
open("/etc/group", O_RDONLY)            = 3
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=575, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001f000
read(3, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 575
close(3)                                = 0
munmap(0x4001f000, 4096)                = 0
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, "\0\0\0\0", 4)                  = 4
select(6, [5], NULL, NULL, {60, 0})     = 1 (in [5], left {60, 0})
read(5, "\0\0\0\0", 4)                  = 4
stat64("/storage2/stpaul", {st_mode=S_IFDIR|S_ISGID|0775, st_size=20, ...}) = 0
chdir("/storage2/stpaul")               = 0
socketpair(PF_UNIX, SOCK_STREAM, 0, [3, 6]) = 0
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
fcntl64(6, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
socketpair(PF_UNIX, SOCK_STREAM, 0, [7, 8]) = 0
fcntl64(7, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(7, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
fcntl64(8, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(8, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
fork()                                  = 2371
close(6)                                = 0
close(8)                                = 0
close(5)                                = 0
brk(0x8080000)                          = 0x8080000
lstat64("archive", {st_mode=S_IFDIR|0770, st_size=25, ...}) = 0
lstat64("archive", {st_mode=S_IFDIR|0770, st_size=25, ...}) = 0
time(NULL)                              = 1031768707
utime("archive", [2002/09/11-14:25:07, 2002/09/11-14:48:50]) = 0
write(1, "archive/\n", 9archive/
)               = 9
lstat64("archive/.HSancillary", {st_mode=S_IFREG|0666, st_size=14100, ...}) = 0
lstat64("archive/08060bcm.eps", 0xbfffd868) = -1 ENOENT (No such file or directory)
lstat64("archive/08060bcm.z", 0xbfffd868) = -1 ENOENT (No such file or directory)
lstat64("archive/08101bp1.eps", 0xbfffd868) = -1 ENOENT (No such file or directory)
lstat64("archive/08101bp1.z", 0xbfffd868) = -1 ENOENT (No such file or directory)
lstat64("archive/08101bp2.eps", 0xbfffd868) = -1 ENOENT (No such file or directory)
lstat64("archive/08101bp2.z", 0xbfffd868) = -1 ENOENT (No such file or directory)
lstat64("archive/08101bp3.eps", 0xbfffd868) = -1 ENOENT (No such file or directory)

(a lot more similar lines, maybe 100....)

select(8, [7], [4], NULL, {60, 0})      = 1 (out [4], left {60, 0})
write(4, "\2\0\0\0\0\0\0\0\274\2\0\0\0\0\0\0\3\0\0\0\0\0\0\0\274"..., 852) = 852select(0, NULL, NULL, NULL, {0, 24342}) = 0 (Timeout)
select(8, [3 7], NULL, NULL, {60, 0}archive/08060bcm.eps
)   = 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})   = 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} <unfinished ...>
(I hit CTRL-C)

Each of these final select lines takes a very long time to print.  This is where it is "hanging", but it's not really hanging, the lines will print out forever.


-- 
Jason Giglio
Information Technology Coordinator
Smyth Companies, Bedford VA
Phone: 540-586-2311x113
e-mail: jgiglio at smythco.com



More information about the rsync mailing list