From owner-freebsd-current@FreeBSD.ORG Fri Jul 29 19:39:16 2005 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C05316A41F; Fri, 29 Jul 2005 19:39:16 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from fileserver.fields.utoronto.ca (fileserver.fields.utoronto.ca [128.100.216.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D10C43D48; Fri, 29 Jul 2005 19:39:15 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from fields.fields.utoronto.ca (fields.localdomain [192.168.216.11]) by fileserver.fields.utoronto.ca (8.12.8/8.12.8/Fields 6.0) with ESMTP id j6TJdENV000547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 29 Jul 2005 15:39:15 -0400 Received: from obsecurity.dyndns.org (fields.fields.utoronto.ca [128.100.216.11]) by fields.fields.utoronto.ca (8.12.8/8.12.8/Fields WS 6.0) with ESMTP id j6TJdE6P001243; Fri, 29 Jul 2005 15:39:14 -0400 Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id F20F5511F0; Fri, 29 Jul 2005 15:39:07 -0400 (EDT) Date: Fri, 29 Jul 2005 15:39:07 -0400 From: Kris Kennaway To: Kris Kennaway Message-ID: <20050729193907.GA17862@xor.obsecurity.org> References: <20050725161548.GA50175@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline In-Reply-To: <20050725161548.GA50175@xor.obsecurity.org> User-Agent: Mutt/1.4.2.1i Cc: current@FreeBSD.org, phk@FreeBSD.org, dd@FreeBSD.org Subject: Re: Panic during devfs ruleset operations on 6.0 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: Fri, 29 Jul 2005 19:39:16 -0000 --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 25, 2005 at 12:15:49PM -0400, Kris Kennaway wrote: > I'm getting the following on multiple 6.0 machines (UP and SMP): >=20 > panic: ruleset 10 already running > db> wh 3747 > Tracing pid 3747 tid 100279 td 0xc5d80300 > kdb_enter(c08fffa1,1,c08f93ee,ea2cfb58,c5d80300) at kdb_enter+0x30 > panic(c08f93ee,a,3,8002440b,c5b666c0) at panic+0x13d > devfs_ruleset_applydm(cc0d3820,cb22fa00,0,c5d80300,cb22fa00) at devfs_rul= eset_applydm+0x29 > devfs_rules_ioctl(c5c2c400,8002440b,c5b666c0,c5d80300,c095cd80) at devfs_= rules_ioctl+0x45a > devfs_rioctl(ea2cfbf0,c0927fa3,c08161eb,c8b91660,0) at devfs_rioctl+0x90 > VOP_IOCTL_APV(c095cd80,ea2cfbf0,ea2cfc47,ea2cfc48,c09ad320) at VOP_IOCTL_= APV+0xc4 > vn_ioctl(cb933990,8002440b,c5b666c0,cc047680,c5d80300) at vn_ioctl+0x18f > ioctl(c5d80300,ea2cfd04,c,28102000,3) at ioctl+0x45d > syscall(3b,3b,3b,bfbfdf58,bfbfe0f1) at syscall+0x2a2 > Xint0x80_syscall() at Xint0x80_syscall+0x1f > --- syscall (54, FreeBSD ELF32, ioctl), eip =3D 0x280c007f, esp =3D 0xbfb= fdeac, ebp =3D 0xbfbfdec8 --- >=20 > It comes from running the following operations: >=20 > mount -t devfs foo ${chroot}/dev > devfs -m ${chroot}/dev ruleset 10 > devfs -m ${chroot}/dev rule add path 'md*' hide > devfs -m ${chroot}/dev rule applyset >=20 > These devfs operations are needed to work around another devfs panic, > which occurs when device nodes are removed from inside a devfs mount > at the same time the devfs is unmounted. >=20 > This panic is going to be very disruptive for the 6.0 package builds > until it can be fixed. Making devfs !MPSAFE seems to be an appropriate workaround for this problem (which is a race between two devfs(8) processes), i.e. remove the following: devfs_vfsops.c: mp->mnt_kern_flag |=3D MNTK_MPSAFE; Kris --+HP7ph2BbKc20aGI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFC6oXbWry0BWjoQKURAnR5AJwMSVIeIIqvBj6rt6ArxnA3ugm7MACcDNrf JZQJDEg1yighsYcGh/OVZhw= =A5lx -----END PGP SIGNATURE----- --+HP7ph2BbKc20aGI--