GNU bug report logs - #6970
gnu cp problem

Previous Next

Package: coreutils;

Reported by: Eric Blake <eblake <at> redhat.com>

Date: Thu, 2 Sep 2010 01:36:02 UTC

Severity: normal

Tags: moreinfo

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Glenn Fowler <gsf <at> research.att.com>, bug-coreutils <bug-coreutils <at> gnu.org>
Subject: Re: gnu cp problem
Date: Wed, 01 Sep 2010 19:36:41 -0600
[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:
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=c74fbae

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   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




This bug report was last modified 6 years and 269 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.