From owner-freebsd-current@FreeBSD.ORG Mon Oct 31 09:52:41 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B56AD106566C for ; Mon, 31 Oct 2011 09:52:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC7C8FC12 for ; Mon, 31 Oct 2011 09:52:40 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p9V9qdsC029347; Mon, 31 Oct 2011 12:52:39 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p9V9qd7r029341; Mon, 31 Oct 2011 12:52:39 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 31 Oct 2011 12:52:39 +0300 From: Gleb Smirnoff To: Matt Mullins Message-ID: <20111031095239.GF36064@FreeBSD.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@FreeBSD.org Subject: Re: ng_ubt fatal trap 12 on RELENG_9 and CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2011 09:52:41 -0000 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' 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.