NetBSD Problem Report #43626

From www@NetBSD.org  Fri Jul 16 11:43:33 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 3C71763BAE8
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 16 Jul 2010 11:43:33 +0000 (UTC)
Message-Id: <20100716114332.F175463BAE7@www.NetBSD.org>
Date: Fri, 16 Jul 2010 11:43:32 +0000 (UTC)
From: pooka@iki.fi
Reply-To: pooka@iki.fi
To: gnats-bugs@NetBSD.org
Subject: directory renaming more than a little racy
X-Send-Pr-Version: www-1.0

>Number:         43626
>Category:       kern
>Synopsis:       directory renaming more than a little racy
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    dholland
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 16 11:45:00 +0000 2010
>Last-Modified:  Sun Jul 17 22:10:08 +0000 2011
>Originator:     Antti Kantee
>Release:        
>Organization:
>Environment:
>Description:
golem> ./t_renamerace ffs_renamerace_dirs 
panic: rename: lost dir entry
Abort (core dumped)

golem> ./t_renamerace ext2fs_renamerace_dirs
panic: rename: linked directory
Abort (core dumped)

golem> ./t_renamerace ext2fs_renamerace_dirs
panic: ext2fs_rename: lost dir entry
Abort (core dumped)

golem> ./t_renamerace lfs_renamerace_dirs
WARNING: the log-structured file system is experimental
WARNING: it may cause system crashes and/or corrupt data
panic: rename: lost dir entry 
Abort (core dumped) 

golem> ./t_renamerace msdosfs_renamerace_dirs
panic: rename: lost dir entry
Abort (core dumped) 

At least LFS is honest.

Additionally, the ffs test can fail with "mkdir: ENOENT/EEXIST"
and the msdos test occasionally just hangs.

I didn't even get around to cross-directory renames or wapbl.
>How-To-Repeat:
run src/tests/fs/vfs/t_renamerace

Note, the results depend at least on the speed of the backend,
i.e. triggering when the image is on tmpfs is a lot more likely
(obviously, since the test can do thousands of times the number
of iterations and spends most of the time in the racy parts
instead of waiting for the disk).
>Fix:
i hope there's a pony

>Release-Note:

>Audit-Trail:
From: Antti Kantee <pooka@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43626 CVS commit: src/tests/fs/vfs
Date: Fri, 16 Jul 2010 11:46:31 +0000

 Module Name:	src
 Committed By:	pooka
 Date:		Fri Jul 16 11:46:31 UTC 2010

 Modified Files:
 	src/tests/fs/vfs: t_renamerace.c

 Log Message:
 Fill in PR kern/43626 now that it exists.


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 src/tests/fs/vfs/t_renamerace.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/43626: directory renaming more than a little racy
Date: Sun, 18 Jul 2010 00:05:45 +0000

 On Fri, Jul 16, 2010 at 11:45:01AM +0000, pooka@iki.fi wrote:
  > >Synopsis:       directory renaming more than a little racy

 Is there something about this that's different from the existing
 rename PRs? (e.g. 24887, 36681, 41417, ...)

 -- 
 David A. Holland
 dholland@netbsd.org

From: Antti Kantee <pooka@iki.fi>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/43626: directory renaming more than a little racy
Date: Sun, 18 Jul 2010 12:59:38 +0300

 On Sun Jul 18 2010 at 00:10:06 +0000, David Holland wrote:
 >  On Fri, Jul 16, 2010 at 11:45:01AM +0000, pooka@iki.fi wrote:
 >   > >Synopsis:       directory renaming more than a little racy
 >  
 >  Is there something about this that's different from the existing
 >  rename PRs? (e.g. 24887, 36681, 41417, ...)

 Yes (at least different from the ones you cited).  Isn't that obvious
 from reading the PR?

 My synopsis sucks a little, I'll give you that.

Responsible-Changed-From-To: kern-bug-people->dholland
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Wed, 09 Feb 2011 06:03:36 +0000
Responsible-Changed-Why:
mine (along with all the other related PRs)


From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43626 CVS commit: src/sys/ufs/ufs
Date: Sun, 17 Jul 2011 22:07:59 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Sun Jul 17 22:07:59 UTC 2011

 Modified Files:
 	src/sys/ufs/ufs: ufs_extern.h ufs_lookup.c ufs_wapbl.c

 Log Message:
 Provide correct locking for ufs_wapbl_rename. Note that this does not
 fix the non-wapbl rename; that will be coming soon. This patch also
 leaves a lot of the older locking-related code around in #if 0 blocks,
 and there's a lot of leftover redundant logic. All that will be going
 away later.

 Relates to at least these PRs:

   PR kern/24887
   PR kern/41417
   PR kern/42093
   PR kern/43626

 and possibly others.


 To generate a diff of this commit:
 cvs rdiff -u -r1.65 -r1.66 src/sys/ufs/ufs/ufs_extern.h
 cvs rdiff -u -r1.110 -r1.111 src/sys/ufs/ufs/ufs_lookup.c
 cvs rdiff -u -r1.16 -r1.17 src/sys/ufs/ufs/ufs_wapbl.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.