[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6970: gnu cp problem

From: Eric Blake
Subject: bug#6970: gnu cp problem
Date: Wed, 01 Sep 2010 19:36:41 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2

[adding bug-coreutils]

On 09/01/2010 06:14 PM, Glenn Fowler wrote:

this is not related to posix / austin group
feel free to forward this to the appropriate list

Hello Glenn, and thanks for the report.

while trying to restore my daughters ipod after a
catastrophic loss of the pc that held itunes I
ran across a gnu cp problem

/bin/cp --version
cp (GNU coreutils) 6.10
Copyright (C) 2008 Free Software Foundation, Inc.

Would you mind trying again with coreutils 8.5? A lot has changed in two years.

3 / ~3K files on the ipod had bad files
ast pax those bad files reported EIO
strace on ast pax on an EIO file showed something like

        read bufsize =>  bufsize
        read bufsize =>  bufsize
        read bufsize =>  some-number-less-than-bufsize
        read bufsize =>  -1 EIO

ast cp has a similar trace leading to non-zero exit
but strace gnu cp on the same EIO file showed

        read bufsize =>  bufsize
        read bufsize =>  bufsize
        read bufsize =>  some-number-less-than-bufsize
        exit 0

without looking at the gnu code my guess is that on
the first read that returns>0 but less than the requested
size it assumes it reached normal end of file -- had it done
one more read it would have discovered the reason for the
short read =>  EIO

I believe this particular bug was fixed in 2009, with this commit:

which, although it was written with /proc in mind, looks like it has the nice side effect of also dealing with your EIO problem.

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]