DO NOT REPLY [Bug 5020] New: hang using RSYNC_CONNECT_PROG

samba-bugs at samba-bugs at
Sun Oct 14 12:37:33 GMT 2007

           Summary: hang using RSYNC_CONNECT_PROG
           Product: rsync
           Version: 3.0.0
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: core
        AssignedTo: wayned at
        ReportedBy: Matt_Domsch at
         QAContact: rsync-qa at

Seen on i386 version 2.6.9 and x86_64 version 3.0.0pre2, similar behavior.

Using an SSH tunnel through a firewall works fine.
Using RSYNC_CONNECT_PROG sometimes works fine, but most often  hangs while
downloading files.

export RSYNC_CONNECT_PROG='ssh -q middle netcat 873'

> gdb /usr/local/bin/rsync
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-suse-linux"...Using host libthread_db
library "/lib64/".

(gdb) set args -vaPH --numeric-ids --delete --delete-excluded --safe-links
--exclude-from=excludes.txt --delay-updates localhost::debian/ debian
(gdb) run
Starting program: /usr/local/bin/rsync -vaPH --numeric-ids --delete
--delete-excluded --safe-links --exclude-from=excludes.txt --delay-updates
localhost::debian/ debian

receiving file list ... 
159300 files to consider
deleting .~tmp~/ls-lR.gz
deleting .~tmp~/README.non-US
deleting .~tmp~/README.mirrors.txt
deleting .~tmp~/README.mirrors.html
deleting .~tmp~/
       98089 100%  948.42kB/s    0:00:00 (xfer#1, to-check=159295/159300)
       61619 100%  321.79kB/s    0:00:00 (xfer#2, to-check=159294/159300)
       14740 100%   76.57kB/s    0:00:00 (xfer#3, to-check=159293/159300)
           0   0%    0.00kB/s    0:00:00

(here the program is now hung)

Program received signal SIGINT, Interrupt.
0x00002b84da6d9283 in __select_nocancel () from /lib64/
(gdb) rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at
rsync.c(502) [receiver=3.0.0pre2]
#0  0x00002b84da6d9283 in __select_nocancel () from /lib64/
#1  0x0000000000421d72 in writefd_unbuffered (fd=8, buf=0x56eba0 "", len=4092)
at io.c:1442
#2  0x000000000042252a in io_flush (flush_it_all=0) at io.c:1519
#3  0x000000000042269d in writefd (fd=4, buf=0x7fffd059bea4 "�\177", len=0)
at io.c:1551
#4  0x0000000000422b9b in write_int (f=9, x=-514) at io.c:1567
#5  0x0000000000422d0f in write_sum_head (f=9, sum=0x569480) at io.c:1343
#6  0x000000000040dd08 in recv_generator (fname=0x7fffd059e230
    file=0x2b84da9f8ec0, ndx=28095, itemizing=1, code=FLOG, f_out=8) at
#7  0x000000000040e9bb in generate_files (f_out=8, local_name=<value optimized
out>) at generator.c:2033
#8  0x0000000000417be4 in do_recv (f_in=8, f_out=8, local_name=0x0) at
#9  0x0000000000417e5a in client_run (f_in=8, f_out=<value optimized out>,
pid=-1, argc=<value optimized out>, 
    argv=0x56d998) at main.c:1084
#10 0x00000000004195fc in main (argc=2, argv=0x56d990) at main.c:1256
(gdb) up
#1  0x0000000000421d72 in writefd_unbuffered (fd=8, buf=0x56eba0 "", len=4092)
at io.c:1442
1442                    count = select(maxfd + 1, using_r_fds ? &r_fds : NULL,
(gdb) print maxfd
$1 = <value optimized out>
(gdb) print using_r_fds
$2 = 1
(gdb) print r_fds
$3 = {fds_bits = {64, 0 <repeats 15 times>}}

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list