From owner-freebsd-virtualization@FreeBSD.ORG Mon May 25 13:48:11 2009 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F34B6106566C for ; Mon, 25 May 2009 13:48:10 +0000 (UTC) (envelope-from zec@icir.org) Received: from labs4.cc.fer.hr (labs4.cc.fer.hr [161.53.72.24]) by mx1.freebsd.org (Postfix) with ESMTP id 98DA38FC0A for ; Mon, 25 May 2009 13:48:10 +0000 (UTC) (envelope-from zec@icir.org) Received: from sluga.fer.hr (sluga.cc.fer.hr [161.53.72.14]) by labs4.cc.fer.hr (8.14.2/8.14.2) with ESMTP id n4PDmMVk023895 for ; Mon, 25 May 2009 15:48:22 +0200 (CEST) Received: from [192.168.200.110] ([161.53.19.79]) by sluga.fer.hr over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 25 May 2009 15:48:04 +0200 From: Marko Zec To: freebsd-virtualization@freebsd.org Date: Mon, 25 May 2009 15:47:59 +0200 User-Agent: KMail/1.9.10 References: <200905251506.27771.freebsd-virtualization@dino.sk> In-Reply-To: <200905251506.27771.freebsd-virtualization@dino.sk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200905251547.59432.zec@icir.org> X-OriginalArrivalTime: 25 May 2009 13:48:05.0049 (UTC) FILETIME=[6DBC1290:01C9DD3F] X-Scanned-By: MIMEDefang 2.64 on 161.53.72.24 Cc: Subject: Re: Panic in netgraph with VIMAGE X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2009 13:48:11 -0000 On Monday 25 May 2009 15:06:27 Milan Obuch wrote: > Hi, > there is some bug in (most probably) netgraph code. I did fresh csup and > rebuild today. Whenever I try to turn bluetooth on (equivalent to plugging > in the dongle), panic occurs: > > ubt0: 2.00/31.64, addr 2> on usbus3 > panic: > in /usr/src/sys/modules/netgraph/netgraph/../../../netgraph/ng_base.c:634 > ng_make_node_common() > vnet=3D0 curvnet=3D0 > cpuid =3D 0 > > This does not occur with kernel from sources three days old. This is a known problem related to curvnet context not being set by the USB= =20 device attach code - I have to lurk / shop around for some cheap USB ethern= et=20 or bt devices to be able to reproduce & fix this locally, the alternative=20 would be wild guessing and planting context setting macros at random places= =20 in the USB code, i.e. without testing, which I'm reluctant to do. Marko > Part from core.txt file: > > #0 doadump () at pcpu.h:246 > 246<--->pcpu.h: No such file or directory. > <------>in pcpu.h > (kgdb) #0 doadump () at pcpu.h:246 > #1 0xc0554e0e in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c= :420 > #2 0xc05550e2 in panic (fmt=3DVariable "fmt" is not available. > ) at /usr/src/sys/kern/kern_shutdown.c:576 > #3 0xc0b947c1 in ng_make_node_common (type=3D0xc0b8f9a0, nodepp=3D0xc416= b3a8) > at > /usr/src/sys/modules/netgraph/netgraph/../../../netgraph/ng_base.c:634 #4= =20 > 0xc0b8bcc4 in ubt_attach (dev=3D0xc4294280) > > at > /usr/src/sys/modules/netgraph/bluetooth/ubt/../../../../dev/usb/bluetooth= /n >g_ubt.c:443 #5 0xc057dcbf in device_attach (dev=3D0xc4294280) at > device_if.h:178 #6 0xc057e88e in device_probe_and_attach (dev=3D0xc42942= 80) > at /usr/src/sys/kern/subr_bus.c:2473 > #7 0xc0b38240 in usb2_probe_and_attach_sub (udev=3D0xc41fd800, > uaa=3D0xe4116c1c) at > /usr/src/sys/modules/usb/usb/../../../dev/usb/usb_device.c:1131 #8=20 > 0xc0b3871a in usb2_probe_and_attach (udev=3D0xc41fd800, iface_index=3D255= '=FF') > at /usr/src/sys/modules/usb/usb/../../../dev/usb/usb_device.c:1288 #9=20 > 0xc0b40ff0 in uhub_explore (udev=3D0xc3f07000) > at /usr/src/sys/modules/usb/usb/../../../dev/usb/usb_hub.c:218 > #10 0xc0b31f29 in usb2_bus_explore (pm=3D0xc3ed0dd4) > > at > /usr/src/sys/modules/usb/usb/../../../dev/usb/controller/usb_controller.c= :2 >15 #11 0xc0b4343a in usb2_process (arg=3D0xc3ed0d74) > at /usr/src/sys/modules/usb/usb/../../../dev/usb/usb_process.c:139 > #12 0xc0530008 in fork_exit (callout=3D0xc0b43360 ,. > arg=3D0xc3ed0d74, frame=3D0xe4116d38) at /usr/src/sys/kern/kern_fork.= c:830 > #13 0xc070b550 in fork_trampoline () at > /usr/src/sys/i386/i386/exception.s:270 > > At line 634 in ng_base.c, there is > > INIT_VNET_NETGRAPH(curvnet); > > I have options VIMAGE in my kernel config (actually this is first one > succesfully compiled with mentioned option, but I did not try it too ofte= n, > it just failed to compile before). > > Now I recompiled kernel again, this time without options VIMAGE in config, > and panic does not occur. > > So the original problem is INIT_VNET_NETGRAPH implementation in presence = of > options VIMAGE in kernel config. If anyone has anything to test, please l= et > me know. > > Regards, > Milan > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to > "freebsd-virtualization-unsubscribe@freebsd.org"