From owner-freebsd-current@FreeBSD.ORG Sat May 5 22:47:28 2007 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6596A16A403 for ; Sat, 5 May 2007 22:47:28 +0000 (UTC) (envelope-from eric@anholt.net) Received: from vonnegut.anholt.net (69-30-77-85.dq1sn.easystreet.com [69.30.77.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1C37A13C45B for ; Sat, 5 May 2007 22:47:28 +0000 (UTC) (envelope-from eric@anholt.net) Received: from vonnegut.anholt.net (localhost [127.0.0.1]) by vonnegut.anholt.net (8.13.8/8.13.8) with ESMTP id l45Mh6Bi060432; Sat, 5 May 2007 15:43:27 -0700 (PDT) (envelope-from eric@anholt.net) Received: (from anholt@localhost) by vonnegut.anholt.net (8.13.8/8.13.8/Submit) id l45MfrZj060431; Sat, 5 May 2007 15:41:53 -0700 (PDT) (envelope-from eric@anholt.net) X-Authentication-Warning: vonnegut.anholt.net: anholt set sender to eric@anholt.net using -f From: Eric Anholt To: David G Lawrence In-Reply-To: <20070505033659.GB2462@tnn.dglawrence.com> References: <1178329243.54075.34.camel@vonnegut> <20070505033659.GB2462@tnn.dglawrence.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-0cVuOOcAQY04yeA/Qu57" Date: Sat, 05 May 2007 15:40:52 -0700 Message-Id: <1178404852.54075.47.camel@vonnegut> Mime-Version: 1.0 X-Mailer: Evolution 2.10.0 FreeBSD GNOME Team Port Cc: current@FreeBSD.org Subject: Re: swap_pager_swap_init panic 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: Sat, 05 May 2007 22:47:28 -0000 --=-0cVuOOcAQY04yeA/Qu57 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2007-05-04 at 20:36 -0700, David G Lawrence wrote: > > I've got an SMP netbooting test machine, which panics on startup almost > > 100% of the time with the issue that has been reported since 2006-12-02 > > at least: > > db> where > > Tracing pid 40 tid 100040 td 0xffffff003b9e24c0 > > kdb_enter() at kdb_enter+0x2f > > panic() at panic+0x291 > > swap_pager_swap_init() at swap_pager_swap_init+0x20c >=20 > I had the same problem with one of my SMP machines. It's a curious pro= blem > since I can take the same hard drive over to a slightly different SMP mac= hine > and not see the panic. It appears to be a race of some kind in the VM sys= tem > initialization, right after the second CPU is started. > Try this patch out and let me know if it fixes it for you... >=20 >=20 > Index: uma_core.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/src/sys/vm/uma_core.c,v > retrieving revision 1.119.2.19 > diff -c -r1.119.2.19 uma_core.c > *** uma_core.c 11 Feb 2007 03:31:19 -0000 1.119.2.19 > --- uma_core.c 1 Mar 2007 06:52:26 -0000 > *************** > *** 1615,1621 **** > #endif > args.name =3D "UMA Zones"; > args.size =3D sizeof(struct uma_zone) + > ! (sizeof(struct uma_cache) * (mp_maxid + 1)); > args.ctor =3D zone_ctor; > args.dtor =3D zone_dtor; > args.uminit =3D zero_init; > --- 1615,1621 ---- > #endif > args.name =3D "UMA Zones"; > args.size =3D sizeof(struct uma_zone) + > ! (sizeof(struct uma_cache) * (mp_maxid + 33)); > args.ctor =3D zone_ctor; > args.dtor =3D zone_dtor; > args.uminit =3D zero_init; >=20 > Note that I don't claim this is a proper fix - it is just a work-aroun= d > that works for me. I've got the machine busy doing something else right now. What's this patch supposed to do? The panic clearly looks like a race to me -- the swapper's got the keg's recurse flag bumped (that printf in the backtrace I think was the one just after taking the recurse flag back down), and pagedaemon is checking for recursion on using the keg, and failing. --=20 Eric Anholt anholt@FreeBSD.org eric@anholt.net eric.anholt@intel.com --=-0cVuOOcAQY04yeA/Qu57 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBGPQf0HUdvYGzw6vcRAnNdAJ9lhfuF0i69uUs+GaMNiIluVSdiLACgjAdo 4qnG/b93p3QCU2kBFTvWeng= =yodg -----END PGP SIGNATURE----- --=-0cVuOOcAQY04yeA/Qu57--