rsync out of memory in flist_expand

Christophe Lyon christophe.lyon at gmail.com
Mon Jun 20 16:17:43 MDT 2011


On Mon, Jun 20, 2011 at 8:40 AM, Wayne Davison <wayned at samba.org> wrote:
> On Fri, Jun 17, 2011 at 2:22 AM, Christophe Lyon <christophe.lyon at gmail.com>
> wrote:
>>
>> When using rsync-3.0.8 from Ubuntu, it seemed to be looping with
>> make_file("usr/bin/head", ...).
>
> Do you have a bind mount in that hierarchy that points to a higher directory
> in the same hierarchy, and thus would induce an infinite loop?  If so, you
> should exclude it from the transfer.
No, I have no such thing

> If you specify 3 -v options, the "[sender] make_file(...)" output will show
> you what rsync is scanning from the filesystem.

With 1 or 2 '-v' rsync seems to hang, consuming more and more memory
until there is none left.

With 3 -v, it quits pretty quickly, but not always at the same point
(I run rsync -vvv [...] | grep make_file |tail, and the ouput is
always different)
It ends with:
rsync: connection unexpectedly closed (711528 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at
io.c(224) [sender=3.1.0dev]
[sender] _exit_cleanup(code=12, file=io.c, line=224): about to call exit(12)

These 3 lines are preceded by many recv_file_name (not always the
same), and from time to time, there is also:
rsync: [receiver] write error: Broken pipe (32)
rsync error: error in rsync protocol data stream (code 12) at
io.c(224) [receiver=3.1.0dev]
[receiver] _exit_cleanup(code=12, file=io.c, line=224): about to call exit(12)

Less often, I also observed the verbose output to stall (but I don't
know if was completely blocked: I pressed ^C and the output was
flushed).

FWIW, I am running in '/' as root:
rsync -vv -navx --delete --delete-excluded --exclude /var/cache/apt
--exclude /tmp --exclude /var/tmp   . /media/<NFS DIR>

I am ready to try gdb or any other tool, but any clue about where to
start looking would help.

Thanks for your time.

Christophe.


More information about the rsync mailing list