Bug #1004
closedUP kernel crashes
Added by sepherosa over 16 years ago. Updated over 16 years ago.
0%
Description
Hi,
Following line is printed immediately after copyrights prints:
panic: assertion: (newpte & VPTE_MANAGED) == 0 || m->flags & PG_MAPPED
in pmap_enter
Back trace shows no function name.
SMP kernel works without problem.
Best Regards,
sephe
Updated by dillon over 16 years ago
:Hi,
:
:Following line is printed immediately after copyrights prints:
:panic: assertion: (newpte & VPTE_MANAGED) == 0 || m->flags & PG_MAPPED
:in pmap_enter
:
:Back trace shows no function name.
:
:SMP kernel works without problem.
:
:Best Regards,
:sephe
:
:--
:Live Free or Die
Ok, I'll track it down a little later today. I added a bunch of
assertions on the page management state so something isn't acting
the way it should be. It's going to be something simple.
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by dillon over 16 years ago
:Hi,
:
:Following line is printed immediately after copyrights prints:
:panic: assertion: (newpte & VPTE_MANAGED) == 0 || m->flags & PG_MAPPED
:in pmap_enter
:
:Back trace shows no function name.
:
:SMP kernel works without problem.
:
:Best Regards,
:sephe
I haven't been able to reproduce this. My UP vkernel boots ok.
Could you try gdb'ing your vkernel after it drops into DDB and see
if gdb can produce a backtrace ?
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by sepherosa over 16 years ago
On Sun, May 11, 2008 at 1:26 AM, Matthew Dillon
<dillon@apollo.backplane.com> wrote:
:Hi,
:
:Following line is printed immediately after copyrights prints:
:panic: assertion: (newpte & VPTE_MANAGED) == 0 || m->flags & PG_MAPPED
:in pmap_enter
:
:Back trace shows no function name.
:
:SMP kernel works without problem.
:
:Best Regards,
:sepheI haven't been able to reproduce this. My UP vkernel boots ok.
Could you try gdb'ing your vkernel after it drops into DDB and see
if gdb can produce a backtrace ?
Grr, my working kernel is relatively old and panics upon vnconfig
vkernel root image.
But I built a GENERIC kernel and managed to map the backtrace address
to the function name:
begin (0xc0141beb)
mi_startup (0xc029ad61)
vm_mem_init (0xc041bfcc)
pmap_init (0xc04a1286)
kmem_alloc3 (0xc041c500)
vm_map_wire (0xc041fb10)
vm_fault_wire (0xc041b766)
vm_fault (0xc041b602)
pmap_enter (0xc04a37b3)
panic (0xc02bbd53)
Hope this will be helpful
I am uploading kernel image to leaf
Best Regards,
sephe
Updated by swildner over 16 years ago
Just for the record, I see this panic here too on my laptop.
Sascha
Updated by mneumann over 16 years ago
Sascha Wildner wrote:
> Sepherosa Ziehau wrote:
>> Hi,
>>
>> Following line is printed immediately after copyrights prints:
>> panic: assertion: (newpte & VPTE_MANAGED) 0 || m->flags & PG_MAPPED
>> in pmap_enter
>>
>> Back trace shows no function name.
>>
>> SMP kernel works without problem.
>
> Just for the record, I see this panic here too on my laptop.
Me too in a Qemu instance.
The following patch should fix it (works fine here).
Regards,
Michael
Index: pmap.c
=================================================================
RCS file: /home/dcvs/src/sys/platform/pc32/i386/pmap.c,v
retrieving revision 1.84
diff u -r1.84 pmap.c pmap.c 9 May 2008 07:24:46
--0000 1.84 KKASSERT 0 || m->flags & PG_MAPPED);
++ pmap.c 11 May 2008 13:49:19 -0000@ -2102,7 +2102,7
@
if (newpte & PG_RW)
vm_page_flag_set(m, PG_WRITEABLE);
}
KKASSERT((newpte & PG_MANAGED) 0 || (m->flags & PG_MAPPED));
pmap_inval_flush(&info);
}
Updated by dillon over 16 years ago
:Me too in a Qemu instance.
:
:The following patch should fix it (works fine here).
:
:Regards,
:
: Michael
:
:Index: pmap.c
:===================================================================
:RCS file: /home/dcvs/src/sys/platform/pc32/i386/pmap.c,v
:retrieving revision 1.84
:diff u -r1.84 pmap.c pmap.c 9 May 2008 07:24:46
:--0000 1.84 KKASSERT 0 || m->flags & PG_MAPPED);
:+++ pmap.c 11 May 2008 13:49:19 -0000
:@ -2102,7 +2102,7
@
: if (newpte & PG_RW)
: vm_page_flag_set(m, PG_WRITEABLE);
: }
:
:+ KKASSERT((newpte & PG_MANAGED) 0 || (m->flags & PG_MAPPED));
: pmap_inval_flush(&info);
: }
Nice catch! Silly me, I was using a vkernel define in the real
kernel's pmap module :-)
I've committed the fix.
-Matt
Matthew Dillon
<dillon@backplane.com>