DragonFly BSD
DragonFly bugs List (threaded) for 2005-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: page fault on 1.2.0-RELEASE


From: Chuck Tuffli <chuck_tuffli@xxxxxxxxxxx>
Date: Mon, 13 Jun 2005 17:42:23 -0700

On Mon, Jun 13, 2005 at 03:10:52PM -0700, Matthew Dillon wrote:
. ..
>     A little broken... vm_paddr_t is a 64 bit quantity, you have to use
>     %lld or %qd in your printfs .  That's why page_range and npages
>     are broken.

I had the vm_paddr_t's as %#llx but changed them to %lld. when I tried
to change npages to %lld, gcc complained. npages is a vm_size_t which
I think is a unsigned int for x86. In any case, here is the printf

printf("vm_page_startup:"
	"\n\tfirst_page %#lx\n\tpage_range %lld\n\tnpages %d"
	"\n\tend %lld\n\tnew_end %lld"
	"\n\tvm_page_array %p\n\tmapped %#x\n",
	first_page, page_range, npages, end, new_end, vm_page_array, mapped);

and the output

vm_page_startup:
	first_page 0x1
	page_range 11
	npages -2046298669
	end -27020983583899648
	new_end -27020983583903744
	vm_page_array 0xc081a000
	mapped 0xc081b000

vm_page_startup 2:
	phys_avail[i] 4096
	phys_avail[i+1] 651264
	last_pa 651264

After the first call to vm_add_new_page, I see the panic below which I
annotated

vm_add_new_page:
	m 0xc081a000
	m->queue 52410
	vpq 0xc052ff88
	flipflop 189185
	vpq->pl 0xc052ff88


Fatal trap 12: page fault while in kernel mode
mp_lock = 00000000; cpuid = 0; lapic.id = 00000000
fault virtual address	= 0x2b633
fault code		= supervisor write, page not present
instruction pointer	= 0x8:0xc02f2753
stack pointer	        = 0x10:0xc0599ce8
frame pointer	        = 0x10:0xc0599d0c
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, def32 1, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 0 (thread0)
current thread          = pri 44 (CRIT)
interrupt mask		= net tty bio cam  <- SMP: XXX
kernel: type 12 trap, code=2

CPU0 stopping CPUs: 0x00000000
 stopped
Stopped at      0xc02f2753:     movl    %edi,0(%eax)
db> trace
(null)(1000,0,c042ee00,c03f929c,5a4000) at 0xc02f2753             vm_add_new_page
(null)(5a4000,3fbf8000,c081a000,c0599d98,c01e3f18) at 0xc02f2b77  vm_page_startup
(null)(0,596c00,5a4000,0,c01398cc) at 0xc02ea62f                  vm_mem_init
(null)(596000,0,0,0,0) at 0xc01e3f18                              mi_startup
(null)() at 0xc01398cc                                            begin

-- 
Chuck Tuffli
Agilent Technologies



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]