Bug 14732

Summary: rsync out-of-memory error when copying large trees
Product: Branch 4.0 Reporter: Konstantin Uvarin (lodin) <khedin>
Component: rsync-serverAssignee: Dmitry V. Levin <ldv>
Status: CLOSED NOTABUG QA Contact: Q.A. 4.0 <qa-4.0>
Severity: normal    
Priority: P2    
Version: 4.0   
Hardware: all   
OS: Linux   

Description Konstantin Uvarin (lodin) 2008-03-01 19:09:54 MSK
Каталог /etc создается и является, вроде бы, точной копией оригинала (правда 
симлинки абсолютные побились, но про это есть в мане).

А вот с хоумом нехорошо. 

[root@khedin rbackup]# rsync -rul --delete /etc khedin::backup
[root@khedin rbackup]# rsync -rul --delete /home khedin::backup
ERROR: out of memory in receive_file_entry [receiver]
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at 
io.c(605) [sender=2.6.9]
[root@khedin rbackup]# rsync -rul --delete /home/lodin khedin::backup
ERROR: out of memory in receive_file_entry [receiver]
rsync: writefd_unbuffered failed to write 2166 bytes [sender]: Connection reset 
by peer (104)
rsync error: error allocating core memory buffers (code 22) at 
util.c(115) [receiver=2.6.9]
rsync: connection unexpectedly closed (4 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at 
io.c(454) [sender=2.6.9]

[root@khedin rbackup]# cat /etc/rsyncd.conf | grep -v ^\# | grep [a-z]
[backup]
comment = backup test
path = /yard/rbackup
use chroot = no
read only = no
write only = no
uid = root

Да, судя вот по этому, проблема не в нехватке памяти -- весь хоум можно 
запихать в память+своп и ещё останется: 

[root@khedin rbackup]# free
             total       used       free     shared    buffers     cached
Mem:       2075496    1603852     471644          0     115676     812868
-/+ buffers/cache:     675308    1400188
Swap:      5116660      16340    5100320

[root@khedin rbackup]# df /home/ /yard/
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb6             5.7G  4.8G  580M  90% /home
/dev/sda10             29G   16G   13G  57% /yard

Что значит это сообщение об ошибке? Куда копать?
Comment 1 Dmitry V. Levin 2008-03-01 21:12:20 MSK
> [root@khedin rbackup]# rsync -rul --delete /home/lodin khedin::backup
> ERROR: out of memory in receive_file_entry [receiver]
> rsync: writefd_unbuffered failed to write 2166 bytes [sender]: Connection reset 
> by peer (104)
> rsync error: error allocating core memory buffers (code 22) at 
> util.c(115) [receiver=2.6.9]
> rsync: connection unexpectedly closed (4 bytes received so far) [sender]
> rsync error: error in rsync protocol data stream (code 12) at 
> io.c(454) [sender=2.6.9]

На сервере khedin следует увеличить лимит памяти в файле /etc/xinetd.d/rsync
Comment 2 Konstantin Uvarin (lodin) 2008-03-01 22:33:40 MSK
А-а, вот оно что. Понял, спасибо.