Date: Sun, 21 Jul 2013 10:18:42 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Oliver Pinter <oliver.pntr@gmail.com> Cc: Gustau P?rez i Querol <gperez@entel.upc.edu>, freebsd-current@freebsd.org Subject: Re: Panic when starting X with Intel KMS Message-ID: <20130721071842.GZ5991@kib.kiev.ua> In-Reply-To: <CAPjTQNG7CBYNMQ4yitXv3Wy81YMk-osqcSH=BB1=HjsOqweszw@mail.gmail.com> References: <51E6EB0A.2060407@entel.upc.edu> <51EA5166.4020508@entel.upc.edu> <CAPjTQNG7CBYNMQ4yitXv3Wy81YMk-osqcSH=BB1=HjsOqweszw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--V1B6tgkYnQOXc079 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 20, 2013 at 01:20:56PM +0200, Oliver Pinter wrote: > On 7/20/13, Gustau P?rez i Querol <gperez@entel.upc.edu> wrote: > > Reading the backtrace I see this: > > > > panic: pmap_release: pmap resident count -398580 !=3D 0 > > > > which comes from amd64/amd64/pmap.c:1936. I suspect that > > pmap->pm_stats.resident_count being negative is a bug. The issue happened somewhere before the process exit. Try the patch below, the idea is that your overflow count is really big, so the wrong-doer could cause underflow when acting. diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 19be4e0..fcdc6af 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -465,6 +465,9 @@ pmap_resident_count_dec(pmap_t pmap, int count) { =20 PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT(pmap->pm_stats.resident_count >=3D count, + ("pmap %p resident count underflow %ld %d", pmap, + pmap->pm_stats.resident_count, count)); pmap->pm_stats.resident_count -=3D count; } =20 --V1B6tgkYnQOXc079 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQIcBAEBAgAGBQJR64tRAAoJEJDCuSvBvK1BX8IQAJQyhTy9XCMNw1Gvio80YJ5c /B+Y1TGVSQ8n2rOuZFqdqYFYzFhxglimvZIWLn1gOu2n30rHciRYlffP6fqxUkG/ ZoNPtsFyvzBruuUEZgttRECJ0m7zi0y9PAIpFqYc3jSPHp/xfrjulj13YKSG3p0M oz1c1PRMg7cJLdVSBhdL2cVlTjLFhiwTU2Clo+XNeAuWyALIxpoT8q+6a/SM7U/u SLT804ROjQ+lbABaiPMpBR5X6VxcG5yuMb4kFvLcI8WrK97Pj1ZgOulbixSwKYZe 98EY0EDRAHxa3Gk716vEblsm0CLqXYrk5JxhYmDSacMiEJnzt/DIBuQAAUGDmqam LnYO/ygj9rkvX5HLvZUPTvv9E4qQFMvyflrgXv5beBa7dwrHhSs7f/k0F8LcxF5+ XlvSbHJ5ozWqCwV2v4/wj6JNJYPdA/w0k01kP+7BabiSr/14swkXGr5fH91OrgDq EQbHme23oWeSS3niqiinlgnRWkrI3oG97ra8+Nx6NZntABxO+xWdS1MklrTmXEKQ 0WR+Au2w3GluSg54gshDFFxHCZWnG1T0u7kQ6NplmTcBnLzhD9lI8Q351vSX/KeR 0vA+M4eBEvjLQFmKRE/EQkjwdBjJ+roMXImvwLMhiLyJz6zK7ehH12zRpMMOkR9y SY7+b2tkyd9KwwGXp8Wt =rlWz -----END PGP SIGNATURE----- --V1B6tgkYnQOXc079--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130721071842.GZ5991>