Skip to content

Corrupted downloads when GD_DEBUG=0 #132

@arniotis

Description

@arniotis

Hello. I'm new to gdrivefs, and the initial tests with moderately-sized files went great. Now I need to sync a set of very large files (1GB to 10GB) from GDrive to a linux machine. The problem is that the files get corrupted on download. This happens on two machines I've tried, a Linode VM and a Raspberry PI, with the same results.

What I've been able to determine so far is:

(1) The file downloads OK into the cache. The corruption happens when passing the data from the cache to the program trying to read it (I've tried with "cp", "rsync" and "md5sum")

(2) The corruption is in the form of 64KB blocks of data from the original file that are duplicated in random locations in the corrupt data. In this example here, block a20000-a2FFFF from the source file has also been copied over block 9E0000-9EFFFF on the target file

io:[/mnt/tmp/Z] xxd GOOD | grep "92a5 8a45 59eb"
0a20000: 92a5 8a45 59eb 3c78 8aff 1d16 6e94 8177 ...EY.<x....n..w

io:[/mnt/tmp/Z] xxd BAD | grep "92a5 8a45 59eb"
09e0000: 92a5 8a45 59eb 3c78 8aff 1d16 6e94 8177 ...EY.<x....n..w
0a20000: 92a5 8a45 59eb 3c78 8aff 1d16 6e94 8177 ...EY.<x....n..w

(3) The corruption is different every time

io:[/mnt/tmp/Z] md5sum ~/GoogleDrive/MECA/2005-04.rar
11d68bf7067077aa54f81726a2a975b5 /home/michael/GoogleDrive/MECA/2005-04.rar

io:[/mnt/tmp/Z] md5sum ~/GoogleDrive/MECA/2005-04.rar
a5e810ac55ef44ce30b6e3b7dc2f0fb7 /home/michael/GoogleDrive/MECA/2005-04.rar

io:[/mnt/tmp/Z] md5sum ~/GoogleDrive/MECA/2005-04.rar
5c567e5e20a4b1d5c6483d998a6ddc33 /home/michael/GoogleDrive/MECA/2005-04.rar

io:[/mnt/tmp/Z] getfattr --only-values -n user.original.md5Checksum ~/GoogleDrive/MECA/2005-04.rar
getfattr: Removing leading '/' from absolute path names
0c45711387083359d39bc859e6cddcde

(4) If I enable GD_DEBUG=1, everything works fine! I know I should include a
log with this problem, but it does not happen when I'm logging... As a workaround, I now
have debug permanently enabled. So far I've successfully downloaded about 80GB worth of files this way.

(5) The failure rate is about one 64K block out of every 1200 blocks (average from a limited number of tests)

(6) Enabling or disabling big_writes makes no difference

(7) This happens in two different machines, thousands of miles apart:

RPi2 running Raspbian : Linux sigma 3.18.7-v7+ #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 armv7l GNU/Linux
Linode VM running Ubuntu 14.04: Linux io 3.15.2-x86_64-linode43 #1 SMP Mon Jun 30 10:08:39 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux

Please let me know if there is any other information I can provide

Thanks,

Michael

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions