Bug 8315 - hang in rsync (match.c)
hang in rsync (match.c)
Status: RESOLVED INVALID
Product: rsync
Classification: Unclassified
Component: core
3.0.9
All All
: P5 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-22 15:03 UTC by Jeremy Sanders
Modified: 2011-07-22 20:08 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Sanders 2011-07-22 15:03:59 UTC
I think I'm hitting a hang in rsync. I'm using rev c0d07c098724ee8c382a498cab991f7d8467d778 in the b3.0.x branch.

The command is:
rsync -raHx --stats --inplace --no-whole-file --delete /xback2_back1/home_rcr36/20110707-000502/ /mnt/btrfs/home_rcr36/current/

Where both file systems are local. Running strace on the process shows no activity. The hanging process is the rsync with the lowest PID.

I attached gdb to the hanging rsync. Here is the back trace:

0x000000000041e5c4 in hash_search (f=4, s=0xcc1ec0, buf=0xcc1ef0, len=2000967340) at match.c:211
211                             if (updating_basis_file && s->sums[i].offset < offset

(gdb) back
#0  0x000000000041e5c4 in hash_search (f=4, s=0xcc1ec0, buf=0xcc1ef0, len=2000967340) at match.c:211
#1  match_sums (f=4, s=0xcc1ec0, buf=0xcc1ef0, len=2000967340) at match.c:369
#2  0x0000000000414491 in send_files (f_in=5, f_out=4) at sender.c:337
#3  0x000000000041cd96 in client_run (f_in=5, f_out=4, pid=15684, argc=1, argv=0xcac240) at main.c:1039
#4  0x000000000041d455 in start_client (argc=2, argv=0xcac240) at main.c:1287
#5  main (argc=2, argv=0xcac240) at main.c:1514

The system is Fedora Linux 14 x86-64. I continued the program and reattached the debugger. It was stuck in the same place.
Comment 1 Wayne Davison 2011-07-22 18:26:02 UTC
Is it hung?  Or just making very slow progress?  Is the variable "offset" changing?  If not, check if there is a loop in the s->sums[i].chain data.  Each value in "chain" gives you a new "i", which should eventually lead to a chain < 0.
Comment 2 Jeremy Sanders 2011-07-22 20:08:47 UTC
I'm sorry - it wasn't a complete hang. It finished 30 mins later when I finally let it finish the file. It was just rather slow processing a 2GB file mostly filled with zeros.

I'll close the bug.