Google drive server side copy does not work when wrapped with cache

Server side copy does not work when google drive remote wrapped with cache.

v1.51.0 - Windows 10, 64 bit (and Ubuntu 18.04)

Config:

[src]
type = drive
scope = drive
service_account_file = {redacted}
team_drive = {redacted}

[cachesrc]
type = cache
remote = src:
chunk_size = 0
chunk_clean_interval = 24h
info_age = 24h

[dst]
type = drive
scope = drive
service_account_file = {redacted}
team_drive = {redacted}

[cachedst]
type = cache
remote = dst:
chunk_size = 0
chunk_clean_interval = 24h
info_age = 24h

Running the below command does not do server side copy, but normal copy.

rclone sync cachesrc: cachedst: --fast-list --tpslimit=6 --drive-stop-on-upload-limit --drive-server-side-across-configs -vv

Omiting the --fast-list flag breaks rclone opeartion.

rclone sync cachesrc: cachedst: --drive-stop-on-upload-limit --drive-server-side-across-configs -vv

Debug:

C:\Users\HARRY>rclone sync cachesrc: cachedst: --drive-stop-on-upload-limit --drive-server-side-across-configs -vv

2020/03/30 11:02:08 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "sync" "cachesrc:" "cachedst:" "--drive-stop-on-upload-limit" "--drive-server-side-across-configs" "-vv"]
2020/03/30 11:02:08 DEBUG : Using config file from "C:\\Users\\HARRY\\.config\\rclone\\rclone.conf"
2020/03/30 11:02:08 DEBUG : cachesrc: wrapped src: at root
2020/03/30 11:02:08 INFO  : cachesrc: Cache DB path: C:\Users\HARRY\AppData\Local\rclone\cache-backend\cachesrc.db
2020/03/30 11:02:08 INFO  : cachesrc: Cache chunk path: C:\Users\HARRY\AppData\Local\rclone\cache-backend\cachesrc
2020/03/30 11:02:08 INFO  : cachesrc: Chunk Memory: true
2020/03/30 11:02:08 INFO  : cachesrc: Chunk Size: 0
2020/03/30 11:02:08 INFO  : cachesrc: Chunk Total Size: 10G
2020/03/30 11:02:08 INFO  : cachesrc: Chunk Clean Interval: 1d
2020/03/30 11:02:08 INFO  : cachesrc: Workers: 4
2020/03/30 11:02:08 INFO  : cachesrc: File Age: 1d
2020/03/30 11:02:08 DEBUG : Adding path "cache/expire" to remote control registry
2020/03/30 11:02:08 DEBUG : Adding path "cache/stats" to remote control registry
2020/03/30 11:02:08 DEBUG : Adding path "cache/fetch" to remote control registry
2020/03/30 11:02:08 DEBUG : cachedst: wrapped dst: at root
2020/03/30 11:02:08 INFO  : cachedst: Cache DB path: C:\Users\HARRY\AppData\Local\rclone\cache-backend\cachedst.db
2020/03/30 11:02:08 INFO  : cachedst: Cache chunk path: C:\Users\HARRY\AppData\Local\rclone\cache-backend\cachedst
2020/03/30 11:02:08 INFO  : cachedst: Chunk Memory: true
2020/03/30 11:02:08 INFO  : cachedst: Chunk Size: 0
2020/03/30 11:02:08 INFO  : cachedst: Chunk Total Size: 10G
2020/03/30 11:02:08 INFO  : cachedst: Chunk Clean Interval: 1d
2020/03/30 11:02:08 INFO  : cachedst: Workers: 4
2020/03/30 11:02:08 INFO  : cachedst: File Age: 1d
2020/03/30 11:02:08 DEBUG : Adding path "cache/expire" to remote control registry
2020/03/30 11:02:08 DEBUG : Adding path "cache/stats" to remote control registry
2020/03/30 11:02:08 DEBUG : Adding path "cache/fetch" to remote control registry
2020/03/30 11:02:08 DEBUG : Cache remote cachedst:: list ''
2020/03/30 11:02:08 DEBUG : Cache remote cachesrc:: list ''
2020/03/30 11:02:08 DEBUG : : list: warm 1 from cache for: , expiring on: 2020-03-31 11:00:48.8395238 +0530 IST
2020/03/30 11:02:08 DEBUG : : list: cached entries: [generatepress_child.zip]
2020/03/30 11:02:08 DEBUG : : list: warm 8 from cache for: , expiring on: 2020-03-31 10:58:36.1859809 +0530 IST
2020/03/30 11:02:08 DEBUG : : list: cached entries: [21.Bridges.2019.1080p.10bit.BluRay.6CH.x265.HEVC-PSA.mkv Bombshell.20
19.1080p.10bit.BluRay.6CH.x265.HEVC-PSA.mkv WP_Rocket_v3.5.1_Final.zip generatepress_child.zip gp-premium-1.9.1.zip rclone
-beta-latest-linux-amd64.zip themeforest-BW1E6RdJ-masterstudy-education-center-wordpress-theme.zip themeforest-VaFPTZIE-ma
sterstudy-education-center-wordpress-theme.zip]
2020/03/30 11:02:08 DEBUG : generatepress_child.zip: Size and modification time the same (differ by 0s, within tolerance 1
ms)
2020/03/30 11:02:08 DEBUG : generatepress_child.zip: Unchanged skipping
2020/03/30 11:02:08 INFO  : Cache remote cachedst:: Waiting for checks to finish
2020/03/30 11:02:08 INFO  : Cache remote cachedst:: Waiting for transfers to finish
2020/03/30 11:02:10 DEBUG : WP_Rocket_v3.5.1_Final.zip: moving offset set from 0 to 0
panic: runtime error: integer divide by zero

goroutine 74 [running]:
github.com/rclone/rclone/backend/cache.(*Handle).Seek(0xc000122600, 0x0, 0x0, 0x0, 0x0, 0x0)
        d:/a/rclone/src/github.com/rclone/rclone/backend/cache/handle.go:328 +0x631
github.com/rclone/rclone/backend/cache.(*Object).Open(0xc000144500, 0x1a74e40, 0xc0000bc2c0, 0xc0001b91e0, 0x1, 0x2, 0xc00
0386000, 0x180d58, 0x0, 0xa471bc)
        d:/a/rclone/src/github.com/rclone/rclone/backend/cache/object.go:235 +0x177
github.com/rclone/rclone/fs/operations.(*reOpen).open(0xc000122200, 0xc000122200, 0xc000144500)
        d:/a/rclone/src/github.com/rclone/rclone/fs/operations/reopen.go:83 +0x287
github.com/rclone/rclone/fs/operations.newReOpen(0x1a74e40, 0xc0000bc2c0, 0x1a8a1a0, 0xc000144500, 0xc0003002b0, 0x0, 0xa,
 0x0, 0x0, 0x0, ...)
        d:/a/rclone/src/github.com/rclone/rclone/fs/operations/reopen.go:49 +0x113
github.com/rclone/rclone/fs/operations.Copy(0x1a74e40, 0xc0000bc2c0, 0x1a8a120, 0xc00000aa80, 0x0, 0x0, 0xc0003bc0e0, 0x1a
, 0x1a8a1a0, 0xc000144500, ...)
        d:/a/rclone/src/github.com/rclone/rclone/fs/operations/operations.go:399 +0xf3c
github.com/rclone/rclone/fs/sync.(*syncCopyMove).pairCopyOrMove(0xc00000a000, 0x1a74e40, 0xc0000bc2c0, 0xc0000c60f0, 0x1a8
a120, 0xc00000aa80, 0xc00000a0d8)
        d:/a/rclone/src/github.com/rclone/rclone/fs/sync/sync.go:331 +0x223
created by github.com/rclone/rclone/fs/sync.(*syncCopyMove).startTransfers
        d:/a/rclone/src/github.com/rclone/rclone/fs/sync/sync.go:356 +0xb8

Already opened a github issue but wants to make sure I am not the only one.

I'll reply on the issue.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.