From mboxrd@z Thu Jan 1 00:00:00 1970
From: =?UTF-8?Q?P=C3=A1draig?= Brady
Subject: bug#21460: Race condition in tests/tail-2/assert.sh
Date: Sat, 12 Sep 2015 03:22:12 +0100
Message-ID: <55F38C54.8070306@draigBrady.com>
References: <87wpvw2ad8.fsf@gnu.org> <55F30CEC.7060102@cs.ucla.edu>
<87a8ssad7e.fsf@gnu.org> <55F35A96.2090906@draigBrady.com>
<55F37B4E.6060600@cs.ucla.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Return-path:
Sender: "Debbugs-submit"
Resent-Message-ID:
In-Reply-To: <55F37B4E.6060600@cs.ucla.edu>
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: bug-coreutils-bounces+gcgcb-bug-coreutils-616=gmane.org@gnu.org
Sender: bug-coreutils-bounces+gcgcb-bug-coreutils-616=gmane.org@gnu.org
To: Paul Eggert , Ludovic =?UTF-8?Q?Court=C3=A8s?=
Cc: 21460@debbugs.gnu.org, bug-guix@gnu.org
List-Id: bug-guix.gnu.org
On 12/09/15 02:09, Paul Eggert wrote:
> Pádraig Brady wrote:
>> + else if (new_stats.st_nlink == 0) /* XXX: what about multi-linked files. */
>
> That comment was my thought exactly. It appears to be a kernel bug that really
> needs to get fixed in the kernel; there just doesn't seem to be a reliable
> workaround in user space.
I double checked with kernel guys, and Al Viro
essentially said the inode and directory operations are independent.
https://lkml.org/lkml/2015/9/11/790
So we probably need to handle the IN_DELETE event
on the directory to cater for this race, as done in:
https://lists.gnu.org/archive/html/coreutils/2015-07/msg00015.html
cheers,
Pádraig.