error allocating core memory buffers (code 22) at util2.c(106) [sender=3.1.2]

2017-04-10 Thread John A Hawkinson via rsync
Hi:

I'm in the middle of recoverying from a tactical error copying
around an Mac OS X 10.10.5 Time Machine backup (turns out Apple's
instructions aren't great...), and I had rsync running for the past 6
hours repairing permissions/acls on 1.5 TB of data (not copying the
data), and then it just died in the middle with:

.Log 2015-03-11-094807/platinum-bar2/usr/local/mysql ->
mysql-5.6.21-osx
10.8-x86_64
ERROR: out of memory in expand_item_list [sender]
rsync error: error allocating core memory buffers (code 22) at util2.c(106) 
[sender=3.1.2]
rsync: [sender] write error: Broken pipe (32)

It was invoked as 

rsync -iaHJAX platinum-barzoom/Backups.backupdb/pb3/ 
platinum-barratry/x/Backups.backupdb/pb3/

I suspect the situation will be different the next time around, and I'm
also not really inclined to try to wait another 7 hours for it to fail.

Process limits were:

bash-3.2# ulimit -a
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
file size   (blocks, -f) unlimited
max locked memory   (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files  (-n) 256
pipe size(512 bytes, -p) 1
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 709
virtual memory  (kbytes, -v) unlimited


Based on "df -i", there are about 200 million inodes in the scope of the
copy

bash-3.2# df -i 
Filesystem512-blocks   Used  Available Capacity   
iused ifree %iused  Mounted on
/dev/disk2s2  3906353072 3879969656   26383416   100% 
484996205   3297927   99%   /Volumes/platinum-barzoom
/dev/disk1s2  9766869344 3327435312 643943403235% 
207964705 402464627   34%   /Volumes/platinum-barratry

Because this is a Time Machine backup, and there were 66 snapshots of a
1 TB disk consuming about 1.5 TB, there were a *lot* of hard links. Many
of directories rather than individual files, so it's a little
challenging to estimate what the number of files to links is.

Are there any useful tips here?
Is it worth filing a bug report on this thin record?
I guess I can turn on core dumps and increase (unlimit completely) the 
stack size...

Although it doesn't seem to have segfaulted, so I'm not sure having
core dumps enabled would have helped?

This was rsync 3.1.2 as installed via Homebrew which appears to have
applied 3 local patches:
https://github.com/Homebrew/homebrew-core/blob/68fe052398ea0939315ad87b0a08313c9d9a95af/Formula/rsync.rb

apply "patches/fileflags.diff",
  "patches/crtimes.diff",
  "patches/hfs-compression.diff"
  
p.s.: If I had to start over, I would have spent less time just deleting
the data and recopying it, rather than trying to fixup the metadata and
dealing with magic Apple stuff like the inability to modify symlinks
inside a top-level Backups.backupdb directory of a Time Machine hfs
volume (But you can move the top-level directory into another directory
and then modify symlinks inside and then move it back). This has been
an "interesting" experience.

Thanks.

--jh...@mit.edu
  John Hawkinson

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: How to detect hanging rsync from bash-script ?

2017-04-10 Thread Karl O. Pinc via rsync
On Mon, 10 Apr 2017 06:50:24 + (UTC)
reiner otto via rsync  wrote:

> I am using rsync on an unreliable mobile WAN connection, which causes
> rsync receiver to hang for long time, when connection is broken
> during transfere. As the option "--timeout=" here does not hit for
> me, is there a recommended "best" method to detect such scenario ?

One good way would be to use rsync's --rsh option to
invoke ssh yourself with something like -o ServerAliveInterval.

It's not clear to me how you'd get the ssh error code back
out of rsync, in other words what error rsync returns in the
case of transport failure.  Maybe 10?  Perhaps someone else
can chime in here?


Karl 
Free Software:  "You don't pay back, you pay forward."
 -- Robert A. Heinlein

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: modification times questions

2017-04-10 Thread Guillaume Outters via rsync

Le 2017-04-07 21:08, Kevin a écrit :


On 04/07/2017 03:07 PM, McDowell, Blake wrote:

I run --times when I use rsync […] but the times do not transfer over 
[…]


I have never seen rsync do that.  What exactly are you doing?


I have seen such a behaviour when trying to rsync to a UDF volume 
mounted on a Mac.


It was due to rsync's receiver doing the file renamings from their 
temporary (transfer) name to the real one after having done all other 
operations, including having modified the timestamps; turned out that 
UDF implementation in Darwin sees name changes as file changes, and as 
such, renaming the file modified the mtime.


Perhaps doing --inplace can prevent this behaviour (if, Blake, you have 
the same).


I opted for patching rsync:
http://tmp.outters.eu/rsync.modtime_after_rename.patch
On the very first renamed file, the patched rsync rereads the file's 
mtime, and if it finds it doesn't match the one set, it switches to the 
mtime-after-rename behaviour (for the rest of the transfer).


--
Guillaume

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Best method to detect hanging rsync in bash-script ?

2017-04-10 Thread reiner otto via rsync
I am using rsync on an unreliable mobile WAN connection, which causes rsync 
receiver to hang for long time, when connection is broken during transfere. As 
the option "--timeout=" here does not hit for me, is there a recommended "best" 
method to detect such scenario ? -- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

How to detect hanging rsync from bash-script ?

2017-04-10 Thread reiner otto via rsync
I am using rsync on an unreliable mobile WAN connection, which causes rsync
receiver to hang for long time, when connection is broken during transfere.
As the option "--timeout=" here does not hit for me, is there a recommended
"best" method to detect such scenario ?-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html