Hi, proper head scratcher for me so hoping for some help -
What is the problem you are having with rclone?
I've noticed that I am getting a lot of 'unexpected EOF' errors in large sync jobs between crypted Gdrive remotes for many months now of seemingly random files - and the list of those are getting longer by the week.
The 'unexpected EOF' files are also always the same files and I'm never able to copy them at all, however I can copy their encrypted versions but I can never get it working properly even with a local crypt with the same keys.
To be clear - regardless of how many times I re-attempt, I always get 'unexpected EOF' for a growing number of files.
What is your rclone version (output from rclone version
)
rclone v1.51.0
- os/arch: linux/amd64
- go version: go1.13.7
Although this has been happening at a smaller scale for 6 months+ so doubt it is a recent issue.
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Linux 64
Which cloud storage system are you using? (eg Google Drive)
Google Drive & local crypt shown below
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
As mentioned above, this has been happening on Google Drive for me but I've managed to also reproduce it locally by copying the obfuscated filename and using the same crypt keys as the Gdrive remote - so here is my config:
[localtest]
type = local
[localtest-data]
type = crypt
remote = localtest:
filename_encryption = standard
password = A_LONG_STRING
password2 = ANOTHER_LONG_STRING
Copying from Gdrive the encrypted version
This is just to get a file with a known 'unexpected EOF' to my local filesystem...
$ rclone cryptdecode --reverse gdrive-encrypted: testfile2.mkv
testfile2.mkv 16gsfvl4v2c5tr4tzun21tngt3
$ rclone copy gdrive:stuff/16gsfvl4v2c5tr4tzun21tngt3 .
$ echo $?
0
$ ls -al 16gsfvl4v2c5tr4tzun21tngt3
-rw-r--r-- 1 linhead linhead 208553728 Apr 1 23:02 16gsfvl4v2c5tr4tzun21tngt3
To prove that my localtest and localtest-data equates to the GoogleDrive one above, I can decrypt the filenames with the same keys OK
$ rclone cryptdecode --reverse localtest-data: testfile2.mkv
testfile2.mkv 16gsfvl4v2c5tr4tzun21tngt3
$ rclone ls localtest:
208553728 16gsfvl4v2c5tr4tzun21tngt3
$ rclone ls localtest-data:
208502784 testfile2.mkv
I can still copy the encrypted file fine on my local filesystem
$ rclone copy localtest:16gsfvl4v2c5tr4tzun21tngt3 /tmp
$ echo $?
0
But I cannot copy the crypt-remote version of the file at all
$ rclone copy localtest-data:testfile2.mkv /tmp
2020/04/01 23:06:25 NOTICE: testfile2.mkv: Removing partially written file on error: unexpected EOF
2020/04/01 23:06:26 NOTICE: testfile2.mkv: Removing partially written file on error: unexpected EOF
2020/04/01 23:06:27 NOTICE: testfile2.mkv: Removing partially written file on error: unexpected EOF
2020/04/01 23:06:28 NOTICE: testfile2.mkv: Removing partially written file on error: unexpected EOF
2020/04/01 23:06:28 NOTICE: testfile2.mkv: Removing partially written file on error: unexpected EOF
2020/04/01 23:06:29 NOTICE: testfile2.mkv: Removing partially written file on error: unexpected EOF
^C
With more verbosity
$ rclone copy -vvv localtest-data:testfile2.mkv /tmp
2020/04/01 23:09:15 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "copy" "-vvv" "localtest-data:testfile2.mkv" "/tmp"]
2020/04/01 23:09:15 DEBUG : Using config file from "/home/linhead/.rclone.conf"
2020/04/01 23:09:15 DEBUG : testfile2.mkv: Need to transfer - File not found at Destination
2020/04/01 23:09:16 DEBUG : testfile2.mkv: Reopening on read failure after 208470016 bytes: retry 1/10: unexpected EOF
2020/04/01 23:09:16 DEBUG : testfile2.mkv: Reopen failed after 208470016 bytes read: unexpected EOF
2020/04/01 23:09:16 NOTICE: testfile2.mkv: Removing partially written file on error: unexpected EOF
2020/04/01 23:09:16 DEBUG : testfile2.mkv: Received error: unexpected EOF - low level retry 1/10
2020/04/01 23:09:16 DEBUG : testfile2.mkv: Reopening on read failure after 208470016 bytes: retry 1/10: unexpected EOF
2020/04/01 23:09:16 DEBUG : testfile2.mkv: Reopen failed after 208470016 bytes read: unexpected EOF
2020/04/01 23:09:16 NOTICE: testfile2.mkv: Removing partially written file on error: unexpected EOF
2020/04/01 23:09:16 DEBUG : testfile2.mkv: Received error: unexpected EOF - low level retry 2/10
^C
FWIW
In this particular file it always appears to be after byte 208470016 which = 0xC6D0000, so:
$ hexdump 16gsfvl4v2c5tr4tzun21tngt3 | grep -A8 ^c6cffd0
c6cffd0 6c10 0d6d da50 756e 9b32 8fae 9f3c c61d
c6cffe0 9296 1f48 f411 0434 05b9 e207 ff49 29ef
c6cfff0 a7ae d26b 84c2 d81c 6ead 35a5 0690 13cd
c6d0000 f03c 49f6 caf8 8249 4c86 6287 16fb 491a
c6d0010 97bc d203 d759 7388 38a9 cd9b 9503 4a91
c6d0020 23d7 062f 7883 8707 da5e 7f29 78be 98e0
c6d0030 60a9 cbfd 7fa9 9934 9426 fe59 ab86 be60
c6d0040 b650 4574 61a5 07cf 9741 d065 8503 6777
c6d0050 3e98 0cb3 eb3c 09b2 3ae1 d453 452c 122e
Other
I think I eliminated the usual suspects:
- Renaming the file does not change the 'unexpected EOF' behaviour
- Moving the paths of the 'dodgy' files also does not change the 'unexpected EOF' behaviour
- It is not a local I/O issue, I can replicate it between Gdrives and local instances as well
- I cannot do a cryptcheck as the original files are long gone
- It always seems to be at the 99% point of the transfer of the file when the 'unexpected EOF' occurs if I watch the file increase in size locally as it copies
- I notice that the obfuscated version of the file is ~50k larger than the decrypted, I assume it is expected but just mentioning if not
Thanks!
LH