using rsync 3.0.0 CVS version

Paul Slootman paul at debian.org
Mon Jan 22 19:03:55 GMT 2007


On Sun 21 Jan 2007, Wayne Davison wrote:

> Another thing you can do in the debugger when attached to the generator
> is to output a summary of the file-list info:
> 
> p *first_flist
> p *first_flist->next
> p *first_flist->next->next

I just noticed that rsync-HEAD-20070120-2211GMT will hang when
transferring an empty directory:

# ls -la images-41
total 3
drwxr-xr-x  2 root root   48 Oct 11 05:22 .
drwxr-xr-x 83 root root 2640 Jan 20 23:50 ..

# /home/paul/rsync-3.0 -av --stats images-41 satazilla::backup/
sending incremental file list
images-41/
(hang...)

# gdb -p 14684
...
(gdb) bt
#0  0x00002b9da7334a45 in select () from /lib/libc.so.6
#1  0x000000000041fe22 in read_timeout (fd=3, buf=0x7fff03a50f00 "\004", len=4) at io.c:597
#2  0x00000000004201f0 in read_loop (fd=3, buf=0x7fff03a50f00 "\004", len=4) at io.c:845
#3  0x00000000004202c0 in readfd_unbuffered (fd=3, buf=0x7fff03a52370 "", len=1) at io.c:882
#4  0x0000000000420673 in readfd (fd=3, buffer=0x7fff03a52370 "", N=1) at io.c:971
#5  0x00000000004208f0 in read_ndx (f=3) at io.c:1569
#6  0x0000000000408f00 in read_ndx_and_attrs (f_in=3, f_out=3, iflag_ptr=0x7fff03a54538, type_ptr=0x7fff03a5453f "\200\003", buf=0x7fff03a52440 "", len_ptr=0x7fff03a54534) at rsync.c:108
#7  0x000000000040f407 in send_files (f_in=3, f_out=3) at sender.c:188
#8  0x0000000000415d29 in client_run (f_in=3, f_out=3, pid=-1, argc=1, argv=0x55f320) at main.c:976
#9  0x0000000000416f23 in main (argc=2, argv=0x55f320) at main.c:1132

(gdb) p *first_flist
$2 = {next = 0x0, prev = 0x563370, files = 0x0, file_pool = 0x5633c0, count = 0, malloced = 0, low = 0, high = -1, ndx_start = 1, parent_ndx = 0, in_progress = 0, to_redo = 0}
(gdb) p *first_flist->next
Cannot access memory at address 0x0

I didn't try first_flist->next->next :-)


The receiving (remote) side, 1st PID:

(gdb) bt
#0  0x00002b5f62c44765 in select () from /lib/libc.so.6
#1  0x000000000041fe22 in read_timeout (fd=5, buf=0x567b80 "", len=8184) at io.c:597
#2  0x0000000000420471 in readfd_unbuffered (fd=5, buf=0x7fff4813e490 "nameserver 10.41.0.253\n", len=4) at io.c:868
#3  0x0000000000420673 in readfd (fd=5, buffer=0x7fff4813e490 "nameserver 10.41.0.253\n", N=4) at io.c:971
#4  0x000000000041e60f in read_msg_fd () at io.c:283
#5  0x000000000040cf72 in generate_files (f_out=3, local_name=0x0) at generator.c:1866
#6  0x000000000041591a in do_recv (f_in=3, f_out=3, local_name=0x0) at main.c:773
#7  0x00000000004160d9 in start_server (f_in=3, f_out=3, argc=1, argv=0x566928) at main.c:883
#8  0x0000000000429b95 in start_daemon (f_in=3, f_out=3) at clientserver.c:709
#9  0x00000000004242b4 in start_accept_loop (port=873, fn=0x428ce0 <start_daemon>) at socket.c:540
#10 0x000000000042a238 in daemon_main () at clientserver.c:874
#11 0x0000000000416685 in main (argc=0, argv=0x0) at main.c:1392

second (forked) PID:

(gdb) bt
#0  0x00002b5f62c44765 in select () from /lib/libc.so.6
#1  0x000000000041fe22 in read_timeout (fd=3, buf=0x7fff4813a6c0 "\001", len=4) at io.c:597
#2  0x00000000004201f0 in read_loop (fd=3, buf=0x7fff4813a6c0 "\001", len=4) at io.c:845
#3  0x00000000004202c0 in readfd_unbuffered (fd=3, buf=0x7fff4813bb30 "", len=1) at io.c:882
#4  0x0000000000420673 in readfd (fd=3, buffer=0x7fff4813bb30 "", N=1) at io.c:971
#5  0x00000000004208f0 in read_ndx (f=3) at io.c:1569
#6  0x0000000000408f00 in read_ndx_and_attrs (f_in=3, f_out=-1, iflag_ptr=0x7fff4813fcf8, type_ptr=0x7fff4813fcff "\200", buf=0x7fff4813dc00 "", len_ptr=0x7fff4813fcf4) at rsync.c:108
#7  0x000000000040e11b in recv_files (f_in=3, local_name=0x0) at receiver.c:366
#8  0x0000000000415869 in do_recv (f_in=3, f_out=3, local_name=0x0) at main.c:726
#9  0x00000000004160d9 in start_server (f_in=3, f_out=3, argc=1, argv=0x566928) at main.c:883
#10 0x0000000000429b95 in start_daemon (f_in=3, f_out=3) at clientserver.c:709
#11 0x00000000004242b4 in start_accept_loop (port=873, fn=0x428ce0 <start_daemon>) at socket.c:540
#12 0x000000000042a238 in daemon_main () at clientserver.c:874
#13 0x0000000000416685 in main (argc=0, argv=0x0) at main.c:1392



Paul Slootman


More information about the rsync mailing list