Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Oct 2011 12:52:39 +0300
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Matt Mullins <mokomull@gmail.com>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: ng_ubt fatal trap 12 on RELENG_9 and CURRENT
Message-ID:  <20111031095239.GF36064@FreeBSD.org>
In-Reply-To: <CAPyT1SE0n4y6du9Janobyi31dBJOn3tz4r-YPqT=2Uy09ZAOwg@mail.gmail.com>
References:  <CAPyT1SE0n4y6du9Janobyi31dBJOn3tz4r-YPqT=2Uy09ZAOwg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111031095239.GF36064>