On Mon, Oct 31, 2011 at 01:22:40AM -0700, Matt Mullins wrote:
M> I ran into a somewhat interesting snag while trying out FreeBSD 9 on
M> my laptop.  I built a kernel from the RELENG_9 branch, and get a
M> "fatal trap 12" during the initialization sequence.  For testing, I
M> rebuilt the same kernel from the CURRENT branch, with the same problem
M> -- this is the one that I'm debugging now.
M> 
M> The kernel was built with the following options in addition to the
M> generic config:
M> options         VIMAGE
M> device          epair
M> nooptions       GEOM_PART_EBR_COMPAT
...
M> (kgdb) list *0xffffffff8164475d
M> 0xffffffff8164475d is in ng_make_node_common
M> (/usr/src/sys/modules/netgraph/netgraph/../../../netgraph/ng_base.c:655).
M> 650             /* Initialize hook list for new node */
M> 651             LIST_INIT(&node->nd_hooks);
M> 652
M> 653             /* Link us into the name hash. */
M> 654             mtx_lock(&ng_namehash_mtx);
M> 655             LIST_INSERT_HEAD(&V_ng_name_hash[0], node, nd_nodes);
M> 656             mtx_unlock(&ng_namehash_mtx);
M> 657
M> 658             /* get an ID and put us in the hash chain */
M> 659             mtx_lock(&ng_idhash_mtx);
M> 
M> This is my first time looking at FreeBSD kernel code, so to verify
M> that I'm reading these #defines correctly and not looking at nonsense
M> objects:
M> (kgdb) print ((struct pcpu*) __pcpu)->pc_curthread->td_proc->p_comm
M> $16 = "usb\000el", '\0' <repeats 13 times>
M> 
M> Time to get dirty and figure out what address V_ng_name_hash points
M> to.  First, find the value of curvnet in net/vnet.h:
M> (kgdb) print ((struct pcpu*) __pcpu)->pc_curthread->td_vnet
M> $17 = (struct vnet *) 0x0
M> 
M> That looks like a null pointer... not good.
M> 
M> It's late, so I'm going to come back to this later.  Any ideas on
M> where I should go from here?

IMHO, this is definitely related to VIMAGE.

-- 
Totus tuus, Glebius.
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to