Hello,
So, due to my “rclone mount // md5sum -c” taking inordinate amounts of time in my ~8M files / ~3.5TB directory (see here for more details), I tried using rclone cryptcheck
to check it against my local copy; unfortunately, it abended in less than 2 hours with an out-of-memory condition, while still “Building file list” for the whole tree:
fatal error: runtime: out of memory
runtime stack:
runtime.throw(0xe4d97c, 0x16)
/opt/go/go1.8/src/runtime/panic.go:596 +0x95
runtime.sysMap(0xc65cc90000, 0x100000, 0xc4202bbd00, 0x1389458)
/opt/go/go1.8/src/runtime/mem_linux.go:216 +0x1d0
runtime.(*mheap).sysAlloc(0x1370320, 0x100000, 0x7f4c2b3eea30)
/opt/go/go1.8/src/runtime/malloc.go:440 +0x374
runtime.(*mheap).grow(0x1370320, 0x1, 0x0)
/opt/go/go1.8/src/runtime/mheap.go:774 +0x62
runtime.(*mheap).allocSpanLocked(0x1370320, 0x1, 0xc4202bbe20)
/opt/go/go1.8/src/runtime/mheap.go:678 +0x44f
runtime.(*mheap).alloc_m(0x1370320, 0x1, 0x3, 0x7f4c2b3eea78)
/opt/go/go1.8/src/runtime/mheap.go:562 +0xe2
runtime.(*mheap).alloc.func1()
/opt/go/go1.8/src/runtime/mheap.go:627 +0x4b
runtime.systemstack(0xc4202bbe90)
/opt/go/go1.8/src/runtime/asm_amd64.s:343 +0xab
runtime.(*mheap).alloc(0x1370320, 0x1, 0x10000000003, 0x7f4c2b3eea30)
/opt/go/go1.8/src/runtime/mheap.go:628 +0xa0
runtime.(*mcentral).grow(0x13717a0, 0x0)
/opt/go/go1.8/src/runtime/mcentral.go:212 +0x8e
runtime.(*mcentral).cacheSpan(0x13717a0, 0xc42001b228)
/opt/go/go1.8/src/runtime/mcentral.go:93 +0x12a
runtime.(*mcache).refill(0x7f4c3ec8e000, 0xc600000003, 0xc65cc8edf4)
/opt/go/go1.8/src/runtime/mcache.go:122 +0xa0
runtime.(*mcache).nextFree.func1()
/opt/go/go1.8/src/runtime/malloc.go:538 +0x32
runtime.systemstack(0xc42001a000)
/opt/go/go1.8/src/runtime/asm_amd64.s:327 +0x79
runtime.mstart()
/opt/go/go1.8/src/runtime/proc.go:1132
This is followed by ~13K lines of “goroutine” stack dumps.
Seems like that entire dirtree metadata will not fit in memory :-/
I remember having a similar issue a few months back with rclone sync
, and that @ncw nixed it by modifying the sync code to do its thing one directory at a time, therefore enormously reducing its memory use for large dirtrees.
Nick, is there any chance of you doing that same modification for rclone cryptcheck
? Should I open a github issue for it?
Thanks,
– Durval,