From owner-freebsd-stable@FreeBSD.ORG Sun Sep 6 16:02:57 2009 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76E3E1065670; Sun, 6 Sep 2009 16:02:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id CAF3B8FC15; Sun, 6 Sep 2009 16:02:56 +0000 (UTC) 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 n86G2mww088478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 6 Sep 2009 19:02:48 +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 n86G2lwT011004; Sun, 6 Sep 2009 19:02:47 +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 n86G2lmo011003; Sun, 6 Sep 2009 19:02:47 +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: Sun, 6 Sep 2009 19:02:47 +0300 From: Kostik Belousov To: "A.J. Fonz van Werven" Message-ID: <20090906160247.GI47688@deviant.kiev.zoral.com.ua> References: <20090906110238.GH47688@deviant.kiev.zoral.com.ua> <200909061537.n86FbqhP001617@satellite.xs4all.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JIpyCmsTxyPLrmrM" Content-Disposition: inline In-Reply-To: <200909061537.n86FbqhP001617@satellite.xs4all.nl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 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 Cc: Thierry Herbelot , stable@freebsd.org, jhb@freebsd.org Subject: Re: Panic in recent 7.2-Stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2009 16:02:57 -0000 --JIpyCmsTxyPLrmrM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 06, 2009 at 05:37:52PM +0200, A.J. Fonz van Werven wrote: > Kostik Belousov wrote: >=20 > > I expect that the following patch, that is the partial merge of r194459, > > would fix it. It patches sys/vm/vm_phys.c. > >=20 > > Index: vm_phys.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 > > --- vm_phys.c (revision 194458) > > +++ vm_phys.c (revision 194459) > > @@ -382,8 +382,7 @@ > > if (pa >=3D seg->start && pa < seg->end) > > return (&seg->first_page[atop(pa - seg->start)]); > > } > > - panic("vm_phys_paddr_to_vm_page: paddr %#jx is not in any segment", > > - (uintmax_t)pa); > > + return (NULL); > > } > > =20 > > /* >=20 > Hi, >=20 > A quick grep on the file in question revealed that there are two > functions that may panic() with "page not in any segment": the > vm_phys_paddr_to_vm_page() being patched and also the next function > vm_phys_paddr_to_segind(). I'm not exactly current with the memory > management code so this may be a very stupid question, but I'll ask it > anyway: don't both functions need to be patched? vm_phys_paddr_to_segind is used during vm bootstrap, the call sequence is vm_page_startup->vm_phys_add_page->vm_phys_paddr_to_segind. vm_page_startup calls vm_phys_add_page only for pages that should not cause the mentioned panic in vm_phys_paddr_to_segind, since it iterates over the pages of the segments created by vm_phys_create_seg() in vm_phys_init(). --JIpyCmsTxyPLrmrM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkqj3ScACgkQC3+MBN1Mb4hIGwCgjkEX3RwkuNVhXEND/x0X13AL CSsAnRVAkUd1fePCxcyMFvbs+X+baH2b =WwRo -----END PGP SIGNATURE----- --JIpyCmsTxyPLrmrM--