GNU bug report logs - #8294
Minor nit with dd

Previous Next

Package: coreutils;

Reported by: John Morris <jmorris <at> beau.org>

Date: Sat, 19 Mar 2011 18:27:01 UTC

Severity: normal

Tags: moreinfo

Done: era eriksson <era <at> iki.fi>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8294 in the body.
You can then email your comments to 8294 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#8294; Package coreutils. (Sat, 19 Mar 2011 18:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to John Morris <jmorris <at> beau.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 19 Mar 2011 18:27:01 GMT) Full text and rfc822 format available.

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

From: John Morris <jmorris <at> beau.org>
To: bug-coreutils <at> gnu.org
Subject: Minor nit with dd
Date: Sat, 19 Mar 2011 13:26:04 -0500
[Message part 1 (text/plain, inline)]
Found an odd power of two size limit in dd. :)

On a 64bit platform shouldn't the following command have done the
expected thing instead of quietly clipping to 2^31?

[jmorris <at> mjolnir ~]$ dd if=/dev/zero of=/dev/null bs=3221225472 count=1
0+1 records in
0+1 records out
2147479552 bytes (2.1 GB) copied, 1.94223 s, 1.1 GB/s
[jmorris <at> mjolnir ~]$ rpm -qf `which dd`
coreutils-7.6-11.fc12.x86_64

[signature.asc (application/pgp-signature, inline)]

Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#8294; Package coreutils. (Sun, 20 Mar 2011 02:04:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: John Morris <jmorris <at> beau.org>
Cc: 8294 <at> debbugs.gnu.org
Subject: Re: bug#8294: Minor nit with dd
Date: Sat, 19 Mar 2011 19:03:48 -0700
On 03/19/2011 11:26 AM, John Morris wrote:
> On a 64bit platform shouldn't the following command have done the
> expected thing instead of quietly clipping to 231?

It depends on what your platform's 64-bit 'read'
system call does.  My guess is that your platform's
'read' syscall refuses to read more than
2**31 - 2**12 bytes at a time from /dev/zero,
so the problem (if any :-) is with 'read', not
with 'dd'.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#8294; Package coreutils. (Sun, 17 Apr 2011 07:06:02 GMT) Full text and rfc822 format available.

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

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: John Morris <jmorris <at> beau.org>, 8294 <at> debbugs.gnu.org
Subject: Re: bug#8294: Minor nit with dd
Date: Sun, 17 Apr 2011 09:05:52 +0200
tags 8294 moreinfo
close 8294
thanks

Paul Eggert wrote:
> On 03/19/2011 11:26 AM, John Morris wrote:
>> On a 64bit platform shouldn't the following command have done the
>> expected thing instead of quietly clipping to 231?
>
> It depends on what your platform's 64-bit 'read'
> system call does.  My guess is that your platform's
> 'read' syscall refuses to read more than
> 2**31 - 2**12 bytes at a time from /dev/zero,
> so the problem (if any :-) is with 'read', not
> with 'dd'.

Thanks for replying, Paul.

John,
If the read system call were failing and dd were ignoring that failure,
that would be a bug.  However, dd is careful to check for that sort of
thing.  Here, read is returning after readling less than a full block,
and that's fine.  It's a so-called short read.  If you want dd to
accumulate full blocks, use GNU dd's iflag=fullblock option.




Added tag(s) moreinfo. Request was from era eriksson <era <at> iki.fi> to control <at> debbugs.gnu.org. (Thu, 30 Aug 2012 08:27:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 8294 <at> debbugs.gnu.org and John Morris <jmorris <at> beau.org> Request was from era eriksson <era <at> iki.fi> to control <at> debbugs.gnu.org. (Thu, 30 Aug 2012 08:27:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 27 Sep 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 265 days ago.

Previous Next


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