From owner-freebsd-current@FreeBSD.ORG Tue Jun 9 16:30:13 2009 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 097D3106564A; Tue, 9 Jun 2009 16:30:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 9C1DB8FC15; Tue, 9 Jun 2009 16:30:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1ME4DB-0004Al-JY; Tue, 09 Jun 2009 19:30:09 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n59GU6x1094675 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Jun 2009 19:30:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n59GU6Mh062168; Tue, 9 Jun 2009 19:30:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n59GU6UV062167; Tue, 9 Jun 2009 19:30:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 9 Jun 2009 19:30:05 +0300 From: Kostik Belousov To: John Baldwin Message-ID: <20090609163005.GD75569@deviant.kiev.zoral.com.ua> References: <20090609110540.GA1290@darklight.homeunix.org> <200906090937.37562.jhb@freebsd.org> <20090609135145.GB1290@darklight.homeunix.org> <200906091059.15278.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pQhZXvAqiZgbeUkD" Content-Disposition: inline In-Reply-To: <200906091059.15278.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.1 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1ME4DB-0004Al-JY ff25eab940b3713db15e25a71542c93e X-Terabit: YES Cc: Yuri Pankov , freebsd-current@freebsd.org, Paul Saab Subject: Re: panic: knlist not locked, but should be 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, 09 Jun 2009 16:30:13 -0000 --pQhZXvAqiZgbeUkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 09, 2009 at 10:59:14AM -0400, John Baldwin wrote: > On Tuesday 09 June 2009 9:51:45 am Yuri Pankov wrote: > > On Tue, Jun 09, 2009 at 09:37:37AM -0400, John Baldwin wrote: > > > On Tuesday 09 June 2009 7:05:40 am Yuri Pankov wrote: > > > > Hi, > > > >=20 > > > > I'm getting the following panic when running Firefox+nspluginwrapper > > > > (which crashes a lot, but paniced the box only two times, if it's e= ven > > > > related). -CURRENT/amd64 20080607. > > > >=20 > > > > Unread portion of the kernel message buffer: > > > > panic: knlist not locked, but should be > > > > cpuid =3D 0 > > > > KDB: stack backtrace: > > > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2a > > > > panic() at panic+0x182 > > > > knote() at knote+0xea > > > > VOP_WRITE_APV() at VOP_WRITE_APV+0x152 > > > > vn_rdwr() at vn_rdwr+0x21d > > > > vn_rdwr_inchunks() at vn_rdwr_inchunks+0xc2 > > > > elf32_coredump() at elf32_coredump+0x109 > > > > sigexit() at sigexit+0x810 > > > > postsig() at postsig+0x32f > > > > ast() at ast+0x3ac > > > > doreti_ast() at doreti_ast+0x1f > > >=20 > > > Are you using ZFS? > > >=20 > > > --=20 > > > John Baldwin > >=20 > > Yes, sorry for not mentioning it. >=20 > This appears to be an interaction with the recent changes to use shared v= node=20 > locks for writes on ZFS. Hmm, I think it may be ok to use a shared vnode= =20 > lock for kevents on vnodes though. The vnode interlock should be suffici= ent=20 > locking for what little work the kevent filters do. As a quick hack for = now=20 > the MNT_SHARED_WRITES() stuff could avoid using shared locks 'if=20 > (!VN_KNLIST_EMPTY(vp))', but I think the longer term fix is to not use th= e=20 > vnode locks for vnode kevents, but use the interlock instead. filt_vfsread() needs at least shared lock on the vnode since it uses VOP_GETATTR. --pQhZXvAqiZgbeUkD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkoujg0ACgkQC3+MBN1Mb4igZQCfW4LuuyTrvH2V4r4rT8vI8qry k4QAn3iCa+IltJ0u/KMwRzhU5kEXMWee =Fq1D -----END PGP SIGNATURE----- --pQhZXvAqiZgbeUkD--