[Bug 1681138] Re: silent file corruption with cp -ar file transfers to USB
Nathan
dundir at gmail.com
Sun Apr 9 03:48:33 UTC 2017
>What's the nature of the corruption
Its unclear, file attributes, names, size all appear the same from ls output.
I initially discovered it while setting up a local repo, dpkg didn't recognize the deb file output.
Diff throws IO errors.
Copying with cp appears to work (failing silently)
dd & rsync both throw an input output error when attempting to copy affected files.
lsof of the affected files directly after a copy throws an unable to stat (I'm not too versed with lsof so that may be a common problem unrelated).
>How do you mean "flush of the write buffer"?
I used hdparm -f on the device node after unmounting it, I then used
eject before physically removing it.
>3 Seconds sounds way too short -
My thoughts exactly, the copy was over a usb 2.0 root hub so I would expect no more than 30MB/sec.
The issue only appears for this specific USB Drive I've tested 5 other
usb thumbdrive models with no issue.
I've linked the exact model below.
https://www.amazon.com/SanDisk-Ultra-Transfer-Speeds-s-SDCZ48-032G-UAM46/dp/B00KYK2AKO
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/1681138
Title:
silent file corruption with cp -ar file transfers to USB
Status in coreutils package in Ubuntu:
New
Bug description:
The OS is 16.10 Yakkety LiveCD.
I'm seeing silent file corruption when using the cp -ar switches for
file transfers to a Sandisk Ultra USB 3.0 32GB thumb drive across a
USB 2.0 bus.
The first indication of a problem is when attempting to read the data
at some point in time after the initial copy.
The copy command completes successfully with no visible errors.
At first I thought this may have been related to an async write,
however; the issue persists after a flush of the write buffer prior to
ejection of the device, and there are no issues with DD.
As a test, a 2.5G file was generated with random data and then copied
with cp -ar to and from the device. The copy completes with no visible
errors within 3 seconds.
I've included the strace log of the transfer in action as an
attachment.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/1681138/+subscriptions
More information about the foundations-bugs
mailing list