GNU bug report logs - #52049
Bug in shred -u

Previous Next

Package: coreutils;

Reported by: David McLaughlin <david.mclaughlin <at> theredx.com>

Date: Tue, 23 Nov 2021 00:48:03 UTC

Severity: normal

Tags: notabug

Merged with 52048

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

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 52049 in the body.
You can then email your comments to 52049 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 bug-coreutils <at> gnu.org:
bug#52049; Package coreutils. (Tue, 23 Nov 2021 00:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to David McLaughlin <david.mclaughlin <at> theredx.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 23 Nov 2021 00:48:03 GMT) Full text and rfc822 format available.

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

From: David McLaughlin <david.mclaughlin <at> theredx.com>
To: bug-coreutils <at> gnu.org
Subject: Re: Bug in shred -u
Date: Mon, 22 Nov 2021 16:21:37 -0700
[Message part 1 (text/plain, inline)]
Sorry. I thought I was on 20.04 Ubuntu, but reading my report of a bug, I
was not.
Please disregard this, as there is no failure on more current OSs.

On Mon, Nov 22, 2021 at 3:20 PM David McLaughlin <
david.mclaughlin <at> theredx.com> wrote:

> Hello,
>
> It seems that shred utilizes a pattern of renaming and then unlinking.
> However, I don't see the use of a lock for this pattern and so there is a
> race condition and the shred command can fail. This test case is timing
> sensitive, and therefore doesn't happen every time. But it happens
> frequently. I am trying to write robust code that depends on shred and I
> find this issue is problematic.
>
> Test case:
> $ touch a b c && for file in a b c; do shred -u -n 1 $file & done && wait
> [1] 28262
> [2] 28263
> [3] 28264
> shred: c: failed to remove: No such file or directory
> [1]   Done                    shred -u -n 1 "$file"
> [2]-  Done                    shred -u -n 1 "$file"
> [3]+  Exit 1                  shred -u -n 1 "$file"
>
>
> Other information:
> $ shred --version
> shred (GNU coreutils) 8.21
> Copyright (C) 2013 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>.
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> Written by Colin Plumb.
>
> $ cat /etc/os-release
> NAME="Ubuntu"
> VERSION="14.04.6 LTS, Trusty Tahr"
> ID=ubuntu
> ID_LIKE=debian
> PRETTY_NAME="Ubuntu 14.04.6 LTS"
> VERSION_ID="14.04"
> HOME_URL="http://www.ubuntu.com/"
> SUPPORT_URL="http://help.ubuntu.com/"
> BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
>
> $ bash --version
> GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
> Copyright (C) 2013 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>
>
> This is free software; you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#52049; Package coreutils. (Tue, 23 Nov 2021 01:23:02 GMT) Full text and rfc822 format available.

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

From: David McLaughlin <david.mclaughlin <at> theredx.com>
To: 52049 <at> debbugs.gnu.org
Subject: More Information
Date: Mon, 22 Nov 2021 18:21:24 -0700
[Message part 1 (text/plain, inline)]
Sorry. I thought I was on 20.04 Ubuntu, but reading my report of a bug, I
was not.
Please disregard this, as there is no failure with shred version 8.30.
[Message part 2 (text/html, inline)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Tue, 23 Nov 2021 02:14:01 GMT) Full text and rfc822 format available.

Notification sent to David McLaughlin <david.mclaughlin <at> theredx.com>:
bug acknowledged by developer. (Tue, 23 Nov 2021 02:14:02 GMT) Full text and rfc822 format available.

Message #13 received at 52049-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: David McLaughlin <david.mclaughlin <at> theredx.com>
Cc: 52049-done <at> debbugs.gnu.org
Subject: Re: bug#52049: More Information
Date: Mon, 22 Nov 2021 18:12:47 -0800
On 11/22/21 17:21, David McLaughlin wrote:
> Please disregard this, as there is no failure with shred version 8.30.

Thanks for letting us know; closing the bug report




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 21 Dec 2021 12:24:09 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Fri, 28 Jan 2022 01:52:02 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Fri, 28 Jan 2022 01:52:02 GMT) Full text and rfc822 format available.

Merged 52048 52049. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Fri, 28 Jan 2022 01:52:02 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. (Fri, 25 Feb 2022 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 22 days ago.

Previous Next


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