Date: Sun, 21 Jul 2013 11:31:34 +0200 From: =?ISO-8859-1?Q?Gustau_P=E9rez_i_Querol?= <gperez@entel.upc.edu> To: FreeBSD current <freebsd-current@freebsd.org> Cc: Konstantin Belousov <kostikbel@gmail.com> Subject: Re: Panic when starting X with Intel KMS Message-ID: <51EBAA76.8020100@entel.upc.edu> In-Reply-To: <20130721071842.GZ5991@kib.kiev.ua> References: <51E6EB0A.2060407@entel.upc.edu> <51EA5166.4020508@entel.upc.edu> <CAPjTQNG7CBYNMQ4yitXv3Wy81YMk-osqcSH=BB1=HjsOqweszw@mail.gmail.com> <20130721071842.GZ5991@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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) > { > > PMAP_LOCK_ASSERT(pmap, MA_OWNED); > + KASSERT(pmap->pm_stats.resident_count >= count, > + ("pmap %p resident count underflow %ld %d", pmap, > + pmap->pm_stats.resident_count, count)); > pmap->pm_stats.resident_count -= count; > } > Hi, the assert doesn't happen (that's resident_count is not bigger than count). You can find the complete core at: https://dl.dropboxusercontent.com/u/2094962/core.txt.5 I'm no expert on that, but would this mean that the process, while freeying mem, causes the kernel to free more maps than the process has? Any other info during the panic, let me know (I have a second machine and I can connect to it via serial port). OTOH, in puzzled because the stack gets corrupted an thus I can't check which is the offending process (I don't know if that would be of any use in this situation). It is my understanding that isn't the process who should be fixed but the kernel side. In this case the stack corruption isn't that very important (at least this is what I think), but sometimes it is very handy. -- Salut i força, Gustau --------------------------------------------------------------------------- Prou top-posting : http://ca.wikipedia.org/wiki/Top-posting Stop top-posting : http://en.wikipedia.org/wiki/Posting_style O O O Gustau Pérez i Querol O O O Unitat de Gestió dels departaments O O O Matemàtica Aplicada IV i Enginyeria Telemàtica Universitat Politècnica de Catalunya Edifici C3 - Despatx S101-B UPC Campus Nord UPC C/ Jordi Girona, 1-3 08034 - Barcelona
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51EBAA76.8020100>