GNU bug report logs - #51345
dd with conv=fsync sometimes returns when its writes are still cached

Previous Next

Package: coreutils;

Reported by: Sworddragon <sworddragon2 <at> gmail.com>

Date: Sat, 23 Oct 2021 09:20:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#51345: closed (dd with conv=fsync sometimes returns when its
 writes are still cached)
Date: Fri, 28 Jan 2022 08:07:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 28 Jan 2022 00:05:51 -0800
with message-id <15f47a2d-1cb2-fee6-a845-487f16806325 <at> cs.ucla.edu>
and subject line Re: bug#51345: dd with conv=fsync sometimes returns when its writes are still cached
has caused the debbugs.gnu.org bug report #51345,
regarding dd with conv=fsync sometimes returns when its writes are still cached
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
51345: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=51345
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Sworddragon <sworddragon2 <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: dd with conv=fsync sometimes returns when its writes are still cached
Date: Sat, 23 Oct 2021 08:18:49 +0000
[Message part 3 (text/plain, inline)]
On Knoppix 9.1 with the Linux Kernel 5.10.10-64 x86_64 and GNU Coreutils
8.32 I wanted to overwrite my USB Thumb Drive a few times with random data
via "dd if=/dev/random of=/dev/sdb bs=1M conv=fsync". While it usually
takes ~2+ minutes to perform this action dd returned once after less than
60 seconds which made me a bit curious. On a later attempt dd returned with
this command after ~1 minute again but the LED on my USB Thumb Drive was
still blinking and an immediated executed sync on the terminal blocked for
~1 minute and once it returned the LED on my USB Thumb Drive also stopped
blinking.

Knoppix 9.1 was booted as a live system from a DVD and the only another
persistent storage attached to it was an internal HDD which was already
overwritten the same way via a past booting session.


Unfortunately Linux is not my main operating system anymore so I randomly
encountered this issue on a nearly 1 year old distribution which might be
slightly outdated. But the issue is pretty severe as it can lead to
significant data loss so it is worth at least reporting it (and having the
"bad" behavior to always call sync after dd nonetheless will probably now
continue to stay for quite a while).
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Sworddragon <sworddragon2 <at> gmail.com>
Cc: 51345-done <at> debbugs.gnu.org
Subject: Re: bug#51345: dd with conv=fsync sometimes returns when its writes
 are still cached
Date: Fri, 28 Jan 2022 00:05:51 -0800
[Message part 6 (text/plain, inline)]
I found a bit of time to work on this and installed the attached patch, 
which should address the issue. Thanks for reporting it.
[0001-dd-synchronize-output-after-write-errors.patch (text/x-patch, attachment)]

This bug report was last modified 3 years and 119 days ago.

Previous Next


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