Subject: More info on my xend restard panic
To: None <port-xen@NetBSD.org>
From: Jed Davis <jdev@panix.com>
List: port-xen
Date: 07/18/2005 21:07:37
Given a panic:

  panic: kernel diagnostic assertion "pmap->pm_obj.uo_npages == 0" failed: file "../../../../arch/xen/i386/pmap.c", line 2091
  Stopped in pid 3382.1 (python) at       netbsd:cpu_Debugger+0x4:        leave
  cpu_Debugger(cbbc2004,cbbc000c,0,ca9e9688,0) at netbsd:cpu_Debugger+0x4
  panic(c03f2440,c03a1030,c03ae703,c03dd9e0,82b) at netbsd:panic+0x121
  __main(c03a1030,c03dd9e0,82b,c03ae703,c04b6000) at netbsd:__main
  pmap_destroy(ca9e9688,0,cbbb1dc8,c02be416,1) at netbsd:pmap_destroy+0x8b
  pmap_load(c0316086,cbbb1e04,bfbfe70c,70,cbbb1ef4) at netbsd:pmap_load+0x2d9
  copyout(cbbb1ef4,cbbc0134,cbbb1ecc,cbdfb9f0,cbdfdec0) at netbsd:copyout+0xe
  kpsendsig(cbbc2004,cbbb1ef4,cbbc0134,cbbb1f20,c04303c0) at netbsd:kpsendsig+0xbe
  postsig(14,cbbb1f64,cbbb1f5c,0,c0400720) at netbsd:postsig+0x22d
  syscall_plain() at netbsd:syscall_plain+0xec

I note the contents of the pmap's uvm_object:

  db> show object/f ca9e9688
  OBJECT 0xca9e9688: locked=-559038737, pgops=0x0, npages=1, refs=0
    PAGES <pg,offset>:
    <0xc0613800,0x2f6000>
  db> show page/f c0613800
  PAGE 0xc0613800:
    flags=44<TABLED,FAKE>, pqflags=0, wire_count=2, pa=0x4301000
    uobject=0xca9e9688, uanon=0x0, offset=0x2f6000 loan_count=0
    [page ownership tracking disabled]
    checking object list
    page found on object list

I also note what I think are the pm_pdir and pm_pdirpa fields:

  db> ex/lx ca9e9688,a
  0xca9e9688:     deadbeef    0           c0613800    c0613810    1           0
  0xca9e96a0:     ca9e9558    c041b504    cbbd1000    523b000

And, thence, the contents of what I believe to be the page directory
for that pmap, with runs of zeroes elided for clarity:

  db> ex/lx cbbd1000,400
  0xcbbd1000:     0           0           0           0           0           0
  [..]
  0xcbbd1bb8:     0           0           0           0           0           0
  0xcbbd1bd0:     0           0           5201027     0           0           0
  0xcbbd1be8:     0           0           0           0           0           613b021
  0xcbbd1c00:     13b1023     13b2023     13b3023     13b4003     8fd9003     8fd6003
  0xcbbd1c18:     8fd7003     8fd4003     8fd5003     8fd2003     8fd3003     8fd0003
  0xcbbd1c30:     8fd1003     8fce003     8fcf003     8fcc003     8fcd003     8fca003
  0xcbbd1c48:     8fcb003     8fc8003     8fc9003     8fc6003     8fc7003     8fc4003
  0xcbbd1c60:     8fc5003     8fc2003     8fc3003     8fc0003     8fc1003     8fbe003
  0xcbbd1c78:     8fbf003     8fbc003     8fbd023     8fba003     8fbb003     8fb8003
  0xcbbd1c90:     8fb9023     8f41023     8eff023     8efc003     8efd003     8efa003
  0xcbbd1ca8:     8efb063     8dee063     8d94023     8d95023     88d6023     619d023
  0xcbbd1cc0:     0           0           0           0           0           0
  [...]
  0xcbbd1fa8:     0           0           0           0           0           0
  0xcbbd1fc0:     9c001e1     1e3         4001e3      8001e3      9c001e3     90001e3
  0xcbbd1fd8:     94001e3     98001e3     0           0           0           613b063
  0xcbbd1ff0:     0           bf3063      187063      bfe063



-- 
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l))))))  (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k)))))))    '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))