NetBSD Problem Report #43503
From www@NetBSD.org Thu Jun 24 19:30:15 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 0C97463BA59
for <gnats-bugs@gnats.NetBSD.org>; Thu, 24 Jun 2010 19:30:15 +0000 (UTC)
Message-Id: <20100624193014.C6EF963BA54@www.NetBSD.org>
Date: Thu, 24 Jun 2010 19:30:14 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: Can't create device nodes on LFS
X-Send-Pr-Version: www-1.0
>Number: 43503
>Category: kern
>Synopsis: Can't create device nodes on LFS
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 24 19:35:00 +0000 2010
>Closed-Date: Fri Jun 25 10:19:55 +0000 2010
>Last-Modified: Mon Jun 28 09:50:02 +0000 2010
>Originator: Martin Husemann
>Release: current as of today (5.99.31)
>Organization:
The NetBSD Foundation, Inc.
>Environment:
NetBSD 5.99.31 NetBSD 5.99.31 (GENERIC) #0: Thu Jun 24 17:02:20 CEST 2010 martin@night-porter.duskware.de:/usr/obj/sparc64/sys/arch/sparc64/compile/GENERIC sparc64
>Description:
While trying to test sysinst installing with LFS as / I noticed that MAKEDEV blocks.
Later tests showed any mknod will deadlock.
>How-To-Repeat:
cd /tmp # assuming /tmp is on a LFS
mknod console c 0 0
>Fix:
n/a
>Release-Note:
>Audit-Trail:
From: Antti Kantee <pooka@cs.hut.fi>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/43503
Date: Thu, 24 Jun 2010 23:24:16 +0300
* "-current as of today" is 5.99.32, not 5.99.31
* this does not trigger on "-current as of yesterday"
* i wrote a test, but need to fix my atf fix to correctly handle
timeout + xfail before committing it
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/43503 Can't create device nodes on LFS
Date: Fri, 25 Jun 2010 10:15:24 +0200
For the nitpicks, the kernel I used was from a cvs update done yesterday
and it (obviously) was .31 - anyway, I re-tested with a lockdebug kernel
from today (now at .32) and it still happens:
...
sparc_interrupt(0, 176c400, 18ba7a8, 12276880, 0, 6881ba0) at netbsd:sparc_inter
rupt+0x22c
-- here is where it hangs --
VOP_STRATEGY(688a000, 636e5a0, 18ba7a8, 12276880, 18ba7a8, 0) at netbsd:VOP_STRA
TEGY+0x64
lfs_segunlock(688a21c, 123b3f10, 18ba7a8, 12276880, 105a8000, 1) at netbsd:lfs_s
egunlock+0x650
lfs_segwrite(0, 4, 176d000, 12276880, 18ba7f0, 0) at netbsd:lfs_segwrite+0x6c0
lfs_flush_fs(688a000, 4, 176d1d0, 0, 18ba7a8, 0) at netbsd:lfs_flush_fs+0x8c
lfs_update(123b6030, 0, 0, 1, 105a8000, 0) at netbsd:lfs_update+0x1f4
lfs_fsync(0, 2, 2, 17b2280, 105a8000, 51eb851f) at netbsd:lfs_fsync+0x204
VOP_FSYNC(123b6030, ffffffffffffffff, 1, 0, 0, ffffffffffffff70) at netbsd:VOP_F
SYNC+0x44
lfs_mknod(12345ad8, 0, fffffffffffffff8, 0, 18b7400, 12276880) at netbsd:lfs_mkn
od+0x1b0
VOP_MKNOD(123b6810, 12345ca0, 12345cc8, 12345bc8, 12345c78, 11e88400) at netbsd:
VOP_MKNOD+0x40
do_sys_mknod(12345bc8, 1, 21a4, 0, 12345e00, 0) at netbsd:do_sys_mknod+0x1d8
syscall_plain(12345ed0, 12345f58, 40542e10, 0, 40542e10, 800) at netbsd:syscall_
plain+0x14c
I can aquire more info from ddb, anything special you would be interested in?
Martin
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/43503 Can't create device nodes on LFS
Date: Fri, 25 Jun 2010 10:37:48 +0200
Not sure if this makes sense, but here is some additional data:
The lockup is in line 1197 (I guess it realy means the KERNEL_LOCK in the
line before that) of VOP_STRATEGY:
1185 int
1186 VOP_STRATEGY(struct vnode *vp,
1187 struct buf *bp)
1188 {
1189 int error;
1190 bool mpsafe;
1191 struct vop_strategy_args a;
1192 a.a_desc = VDESC(vop_strategy);
1193 a.a_vp = vp;
1194 a.a_bp = bp;
1195 mpsafe = (vp->v_vflag & VV_MPSAFE);
1196 if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
1197 error = (VCALL(vp, VOFFSET(vop_strategy), &a));
1198 if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
1199 return error;
1200 }
but the vnode * doesn't seem to make sense:
db{1}> show vnode 0x688a000
OBJECT 0x688a000: locked=0, pgops=0x1deb18300100000, npages=4943, refs=29673137
VNODE flags 0x77ac<ISTTY,MAPPED,LOCKSWORK,TEXT,EXECMAP,WRMAP,XLOCK,ONWORKLST>
mp 0xa00000004 numoutput 1 size 0x40000000008 writesize 0x333000002aa
data 0x0 writecount 45 holdcnt 0
tag VT_NON(0) type VNON(0) mount 0xa00000004 typedata 0x0
v_lock 0x688a108
Martin
From: Juergen Hannken-Illjes <hannken@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43503 CVS commit: src/sys/ufs/lfs
Date: Fri, 25 Jun 2010 10:03:52 +0000
Module Name: src
Committed By: hannken
Date: Fri Jun 25 10:03:52 UTC 2010
Modified Files:
src/sys/ufs/lfs: lfs_subr.c
Log Message:
Undo last commit and don't try to lock vnodes in lfs_unmark_dirop()
as we may deadlock trying to write the superblock.
Should fix PR #43503 Can't create device nodes on LFS.
To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/ufs/lfs/lfs_subr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Fri, 25 Jun 2010 10:19:55 +0000
State-Changed-Why:
yes, that fixes it
From: Antti Kantee <pooka@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43503 CVS commit: src/tests/fs
Date: Mon, 28 Jun 2010 09:45:06 +0000
Module Name: src
Committed By: pooka
Date: Mon Jun 28 09:45:06 UTC 2010
Modified Files:
src/tests/fs: Makefile
Added Files:
src/tests/fs/lfs: Atffile Makefile t_pr.c
Log Message:
add test for PR kern/43503
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/fs/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/fs/lfs/Atffile src/tests/fs/lfs/Makefile \
src/tests/fs/lfs/t_pr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(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.