rsync hangs/stalls on long filenames

Johan Ekenberg johan at
Wed Oct 16 13:58:00 EST 2002


I'm using (the excellent) rsync utility to do backup on several large www-servers. The backup machine runs in daemon mode. However, once in a while the backup hangs/stalls eternally. Using lsof I've been able to determine that this happens only when rsync has reached some file with an unusually long path.

### General ###
- Both machines involved run linux, kernel 2.4.19
- Filesystem is reiserfs
- rsync  version 2.5.5  protocol version 26
  Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles,
                IPv6, 64-bit system inums, 64-bit internal inums
- Lots of memory on both machines.

### backup server ###
- Running:
   rsync --daemon
- stracing the stalled rsyncd process:
   bak1:~# strace -p 23681
   select(4, NULL, [3], NULL, {16, 10000}
   select(4, NULL, [3], NULL, {60, 0} <unfinished ...>

### client ###
- running:
   rsync -a --delete --relative --one-file-system --numeric-ids \
    --exclude-from=/path/to/file --password-file=/path/to/rsync.password \
    /home/m <username>@bak1::backup/www9 
- stracing the stalled process:
   www9:~# strace -p 22903
   select(4, NULL, [3], NULL, {6, 380000}) = 0 (Timeout)
   select(4, NULL, [3], NULL, {60, 0} <unfinished ...>
- lsof:
   www9:~# lsof -n | grep 22903 
   <irrelevant info excluded>
   rsync     22903     root    4r   REG       48,0      2739    428393 /home/m/macxtrem/www.fs_holduser/cgi-bin/IB3/cgi-bin

Please note the long path (328 chars) of the file that rsync was processing. I've seen this behaviour several times with different long paths on different clients.

Is this a known problem and limitation of rsync? If not, could this be fixed?

Thanks for your help and the otherwise excellent rsync utility!

Best regards,
/Johan Ekenberg - Sweden

More information about the rsync mailing list