NetBSD Problem Report #40757

From www@NetBSD.org  Wed Feb 25 19:08:11 2009
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 E4F8363BD40
	for <gnats-bugs@gnats.netbsd.org>; Wed, 25 Feb 2009 19:08:11 +0000 (UTC)
Message-Id: <20090225190811.B115663BD3B@www.NetBSD.org>
Date: Wed, 25 Feb 2009 19:08:11 +0000 (UTC)
From: joerg@NetBSD.org
Reply-To: joerg@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: Kernel spinning in tmpfs
X-Send-Pr-Version: www-1.0

>Number:         40757
>Category:       kern
>Synopsis:       Kernel spinning in tmpfs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    rmind
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 25 19:10:00 +0000 2009
>Closed-Date:    Sun May 29 22:46:37 +0000 2011
>Last-Modified:  Sun May 29 22:46:37 +0000 2011
>Originator:     Joerg Sonnenberger
>Release:        NetBSD 5.0rc2
>Organization:
TNF
>Environment:
>Description:
A processing is consuming 100% time on the affected CPU. The accounting on that CPU is broken as well, e.g. top shows 0% for all stats.

Backtrace on the cpu:
mutex_vector_enter() at netbsd:mutex_vector_enter+0x104
tmpfs_alloc_vp() at netbsd:tmpfs_alloc_vp+0x29
tmpfs_lookup() at netbsd:tmpfs_lookup+0x325
VOP_LOOKUP() at netbsd:VOP_LOOKUP+0x80
getcwd_common() at netbsd:getcwd_common+0x304
vn_isunder() at netbsd:vn_isunder+0x1e
lookup() at netbsd:lookup+0x249
namei() at netbsd:namei+0x1a4
vn_open() at netbsd:vn_open+0x95
sys_open() at netbsd:sys_open+0xeb
syscall() at netbsd:syscall+0xb6

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/40757: Kernel spinning in tmpfs
Date: Fri, 3 Apr 2009 16:32:20 +0200

 This can be triggered somewhat reliable either running two bulk build
 nodes in the same chroot or killing bulk builds with pkill (g)make.
 Common in both cases is that the tmpfs is still accessed for node
 creation while a rm -rf is going on.

 Joerg

From: "Mindaugas Rasiukevicius" <rmind@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40757 CVS commit: src/sys/fs/tmpfs
Date: Sun, 29 May 2011 22:29:08 +0000

 Module Name:	src
 Committed By:	rmind
 Date:		Sun May 29 22:29:07 UTC 2011

 Modified Files:
 	src/sys/fs/tmpfs: tmpfs.h tmpfs_subr.c tmpfs_vfsops.c tmpfs_vnops.c

 Log Message:
 - Rework and document inode reference counting.  Also document inode life
   cycle (destruction part).  Perform link counting in tmpfs_dir_attach()
   and tmpfs_dir_detach(), instead of alloc/free and arbitrary places.
   Fixes PR/44285, PR/44288, PR/44657 and likely PR/42484.

 - Fix the race between the lookup and inode destruction.  Fixes PR/43167
   and its duplicates PR/40088, PR/40757.

 - Improve tmpfs_rename() locking a little, fix kqueue event notifications
   and also fix PR/43617.  Add simplistic tmpfs_parentcheck_p(); to be
   expanded and used for further rename() locking fixes.

 - Cache directory entry "hint" in the tmpfs node, add tmpfs_dir_cached(),
   and thus avoid unnecessary lookup in tmpfs_remove() and tmpfs_rmdir().

 - Set correct _PC_FILESIZEBITS value in tmpfs_pathconf().  Fixes PR/43576.

 - Few minor fixes.


 To generate a diff of this commit:
 cvs rdiff -u -r1.43 -r1.44 src/sys/fs/tmpfs/tmpfs.h
 cvs rdiff -u -r1.70 -r1.71 src/sys/fs/tmpfs/tmpfs_subr.c
 cvs rdiff -u -r1.50 -r1.51 src/sys/fs/tmpfs/tmpfs_vfsops.c
 cvs rdiff -u -r1.84 -r1.85 src/sys/fs/tmpfs/tmpfs_vnops.c

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

Responsible-Changed-From-To: kern-bug-people->rmind
Responsible-Changed-By: rmind@NetBSD.org
Responsible-Changed-When: Sun, 29 May 2011 22:46:37 +0000
Responsible-Changed-Why:


State-Changed-From-To: open->closed
State-Changed-By: rmind@NetBSD.org
State-Changed-When: Sun, 29 May 2011 22:46:37 +0000
State-Changed-Why:
Fixed, thanks.


>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.