From owner-freebsd-current@FreeBSD.ORG Tue Mar 18 20:13:34 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E1C0106564A; Tue, 18 Mar 2008 20:13:34 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 976868FC1A; Tue, 18 Mar 2008 20:13:33 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C14231CCCC; Tue, 18 Mar 2008 21:13:32 +0100 (CET) Date: Tue, 18 Mar 2008 21:13:32 +0100 From: Ed Schouten To: pluknet Message-ID: <20080318201332.GO80576@hoeg.nl> References: <3bbf2fe10803181145m79e89955re785e1b5048cafd7@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UEgmpZn7Z/frN9Sq" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Attilio Rao , FreeBSD Current , Alex Goncharov Subject: Re: Seeing lock order reversal X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Mar 2008 20:13:34 -0000 --UEgmpZn7Z/frN9Sq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * pluknet wrote: > Fortunately I could reproduce it. >=20 > lock order reversal: > 1st 0xc07e9274 proctree (proctree) @ /usr/src/sys/kern/kern_exit.c:291 > 2nd 0xc3c18278 devfs (devfs) @ /usr/src/sys/kern/vfs_subr.c:2158 > KDB: stack backtrace: > db_trace_self_wrapper(c07682d0,d6078b24,c0573236,c076a615,c3c18278,...) > at db_trace_self_wrapper+0x26 > kdb_backtrace(c076a615,c3c18278,c075bcfb,c075bcfb,c0770a8c,...) at > kdb_backtrace+0x29 > witness_checkorder(c3c18278,9,c0770a8c,86e,c07edcd4,...) at > witness_checkorder+0x6d6 > _lockmgr_args(c3c18278,20002,c3c182a8,0,ffffffff,...) at _lockmgr_args+0x= 519 > vop_stdlock(d6078bc4,d6078bbc,c0572a1c,20002,c3c182a8,...) at vop_stdlock= +0x51 > VOP_LOCK1_APV(c07a07e0,d6078bc4,851,d6078be4,c3c182a8,...) at VOP_LOCK1_A= PV+0xa5 > _vn_lock(c3c18220,20002,c0770a8c,86e,4,...) at _vn_lock+0xf2 > vrele(c3c18220,0,c07619a2,14e,ffffffff,...) at vrele+0x142 > exit1(c2fdd690,0,d6078d2c,c0729ed3,c2fdd690,...) at exit1+0x8a1 > sys_exit(c2fdd690,d6078cfc,4,c07625a5,c07a3d38,...) at sys_exit+0x1d > syscall(d6078d38) at syscall+0x2b3 > Xint0x80_syscall() at Xint0x80_syscall+0x20 > --- syscall (1, FreeBSD ELF32, sys_exit), eip =3D 0x2811964f, esp =3D > 0xbfbfeacc, ebp =3D 0xbfbfead8 --- >=20 > Something else? I also saw this LOR inside my mpsafetty branch in Perforce - it can easily be fixed by just calling vrele() after the proctree_lock has been unlocked. I don't have a patch at hand, because I've entirely rewritten that code. --=20 Ed Schouten WWW: http://g-rave.nl/ --UEgmpZn7Z/frN9Sq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkfgImwACgkQ52SDGA2eCwWwzQCaA1enEBTrX3wNhz1bwZYf37CB RPYAn2lfclD84nyoSQG+4SHCpehOzyrn =mEg/ -----END PGP SIGNATURE----- --UEgmpZn7Z/frN9Sq--