From owner-freebsd-virtualization@FreeBSD.ORG Sun Jul 7 09:30:52 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CE8A71A9; Sun, 7 Jul 2013 09:30:52 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com [IPv6:2a00:1450:4010:c04::231]) by mx1.freebsd.org (Postfix) with ESMTP id D2B931C5F; Sun, 7 Jul 2013 09:30:51 +0000 (UTC) Received: by mail-lb0-f177.google.com with SMTP id 10so2934876lbf.22 for ; Sun, 07 Jul 2013 02:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=KxplIB7SZLA37MM3TQbBoXpe7bxypJwSFJJGzPTXxk4=; b=Ho8m8rq6gh0z1873LKWDcS//fABFuLaqo/34AvnUjjgRnSDGm2GlPgNTHF8UGvvuXx DGF5p2PGdR2jyolvVq766v1qtvQrIgye7wLuKYMyebYXK/k7plpAbJAkK0BbAOZeZQai wOUBbhYp7UPlgUA/gtq8WB1SHecaUH60PxCL+FgGT/hSxfHHz4gWVWyj+iNEP8o0CSmk wM99RncksYv/QaQ+DS4rAPkcv0RFd90GNGWfnKX7pOpgHKGC4uyn8w5kCNUJ2LVZxlK1 Yb5QC2Zog+Fj+8cXkT5fDKABezDkWf3JbhGao8JTXB3yTph0HAFAgaRtCtF3Ueh36JVr gEZg== MIME-Version: 1.0 X-Received: by 10.152.19.194 with SMTP id h2mr8338613lae.26.1373189450695; Sun, 07 Jul 2013 02:30:50 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.149.38 with HTTP; Sun, 7 Jul 2013 02:30:50 -0700 (PDT) Date: Sun, 7 Jul 2013 02:30:50 -0700 X-Google-Sender-Auth: B_OBSk0I-H9wXnonXum9yq1EP_g Message-ID: Subject: VIMAGE crashes on 9.x with bluetooth devices From: Craig Rodrigues To: "freebsd-virtualization@freebsd.org" Content-Type: multipart/mixed; boundary=089e013d0f126b0a7e04e0e895cc X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Adrian Chadd , Maksim Yevmenkin , Marko Zec X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 07 Jul 2013 09:30:52 -0000 --089e013d0f126b0a7e04e0e895cc Content-Type: text/plain; charset=ISO-8859-1 Hi, I tried running PC-BSD 9.1 on an HP Elitebook 8460p laptop ( http://h10010.www1.hp.com/wwpc/pscmi...oks/8460p.html ). See the screenshot I posted here: http://forums.pcbsd.org/showthread.php?t=20001 In PC-BSD, the default kernel comes with VIMAGE enabled in the kernel config. The problem I encountered seems to be caused by problems with the FreeBSD kernel with VIMAGE + bluetooth. I've seen similar threads being posted here: "VIMAGE crashes on 9.x with hotplug net80211 devices" http://lists.freebsd.org/pipermail/freebsd-hackers/2012-October/040784.html "Panic in netgraph with VIMAGE" http://lists.freebsd.org/pipermail/freebsd-virtualization/2009-May/000325.html Doing some kernel debugging, I got this stack trace: #0 doadump (textdump=) at pcpu.h:234 #1 0xffffffff80923e86 in kern_reboot (howto=260) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_shutdown.c:449 #2 0xffffffff80924387 in panic (fmt=0x1
) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_shutdown.c:637 #3 0xffffffff80ce97f0 in trap_fatal (frame=0xc, eva=) at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/trap.c:879 #4 0xffffffff80ce9b51 in trap_pfault (frame=0xffffff811e2b7700, usermode=0) at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/trap.c:795 #5 0xffffffff80cea104 in trap (frame=0xffffff811e2b7700) at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/trap.c:463 #6 0xffffffff80cd3433 in calltrap () at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/exception.S:228 #7 0xffffffff81cc0bbd in ng_make_node_common (type=0xffffffff81cb6000, nodepp=0xfffffe0124d9c310) at /usr/home/rodrigc/freebsd/9/sys/modules/netgraph/netgraph/../../../netgraph/ng_base.c:669 #8 0xffffffff81cb320e in ubt_attach (dev=0xfffffe01041f1d00) at /usr/home/rodrigc/freebsd/9/sys/modules/netgraph/bluetooth/ubt/../../../../netgraph/bluetooth/drivers/ubt/ng_ubt.c:461 #9 0xffffffff80956c9c in device_attach (dev=0xfffffe01041f1d00) at device_if.h:180 #10 0xffffffff8078a61e in usb_probe_and_attach (udev=0xfffffe0124580000, iface_index=) at /usr/home/rodrigc/freebsd/9/sys/dev/usb/usb_device.c:1183 #11 0xffffffff80792c4e in uhub_explore (udev=0xfffffe000900c000) at /usr/home/rodrigc/freebsd/9/sys/dev/usb/usb_hub.c:272 #12 0xffffffff80792c74 in uhub_explore (udev=0xfffffe0007ee2000) at /usr/home/rodrigc/freebsd/9/sys/dev/usb/usb_hub.c:286 #13 0xffffffff8077ce46 in usb_bus_explore (pm=) at /usr/home/rodrigc/freebsd/9/sys/dev/usb/controller/usb_controller.c:359 #14 0xffffffff80796da3 in usb_process (arg=) at /usr/home/rodrigc/freebsd/9/sys/dev/usb/usb_process.c:169 #15 0xffffffff808f1cef in fork_exit (callout=0xffffffff80796cd0 , arg=0xffffff8001c3cdb0, frame=0xffffff811e2b7b00) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_fork.c:988 #16 0xffffffff80cd395e in fork_trampoline () at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/exception.S:602 #17 0x0000000000000000 in ?? () and the error occurred on line 669 in ng_base.c: #7 0xffffffff81cc0bbd in ng_make_node_common (type=0xffffffff81cb6000, nodepp=0xfffffe0124d9c310) at /usr/home/rodrigc/freebsd/9/sys/modules/netgraph/netgraph/../../../netgraph/ng_base.c:669 669 node->nd_ID = V_nextID++; /* 137/sec for 1 year before wrap */ (kgdb) l 664 665 /* Get an ID and put us in the hash chain. */ 666 IDHASH_WLOCK(); 667 for (; { /* wrap protection, even if silly */ 668 node_p node2 = NULL; 669 node->nd_ID = V_nextID++; /* 137/sec for 1 year before wrap */ 670 671 /* Is there a problem with the new number? */ 672 NG_IDHASH_FIND(node->nd_ID, node2); /* already taken? */ 673 if ((node->nd_ID != 0) && (node2 == NULL)) { It turns out that when VIMAGE is defined in the kernel, V_nextID is not an int any more, it is a macro. line 669 expands to something that looks like: node->nd_ID = (*(__typeof(vnet_entry_nextID)*) (((((__curthread())->td_vnet))->vnet_data_base) + (uintptr_t)&vnet_entry_nextID))++; On my system, td_vnet was not initialized, so that was causing the kernel panic. Is the attached patch OK to commit to -CURRENT, and then after some time MFC to stable/9? With this patch, my system can boot with VIMAGE enabled in the kernel and it does not crash. -- Craig --089e013d0f126b0a7e04e0e895cc Content-Type: text/plain; charset=US-ASCII; name="ng_ubt.c.fix.txt" Content-Disposition: attachment; filename="ng_ubt.c.fix.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hiu189tv0 SW5kZXg6IGJsdWV0b290aC9kcml2ZXJzL3VidC9uZ191YnQuYwo9PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBibHVl dG9vdGgvZHJpdmVycy91YnQvbmdfdWJ0LmMJKHJldmlzaW9uIDI1MjIxOCkKKysrIGJsdWV0b290 aC9kcml2ZXJzL3VidC9uZ191YnQuYwkod29ya2luZyBjb3B5KQpAQCAtMTA5LDcgKzEwOSw5IEBA CiAjaW5jbHVkZSA8c3lzL3VuaXN0ZC5oPgogI2luY2x1ZGUgPHN5cy9jYWxsb3V0Lmg+CiAjaW5j bHVkZSA8c3lzL21hbGxvYy5oPgorI2luY2x1ZGUgPHN5cy9qYWlsLmg+CiAjaW5jbHVkZSA8c3lz L3ByaXYuaD4KKyNpbmNsdWRlIDxzeXMvcHJvYy5oPgogCiAjaW5jbHVkZSAidXNiZGV2cy5oIgog I2luY2x1ZGUgPGRldi91c2IvdXNiLmg+CkBAIC0xMjMsNiArMTI1LDcgQEAKICNpbmNsdWRlIDxz eXMvbWJ1Zi5oPgogI2luY2x1ZGUgPHN5cy90YXNrcXVldWUuaD4KIAorI2luY2x1ZGUgPG5ldC92 bmV0Lmg+CiAjaW5jbHVkZSA8bmV0Z3JhcGgvbmdfbWVzc2FnZS5oPgogI2luY2x1ZGUgPG5ldGdy YXBoL25ldGdyYXBoLmg+CiAjaW5jbHVkZSA8bmV0Z3JhcGgvbmdfcGFyc2UuaD4KQEAgLTQ1Mywx MyArNDU2LDE0IEBACiAKIAlzYy0+c2NfZGV2ID0gZGV2OwogCXNjLT5zY19kZWJ1ZyA9IE5HX1VC VF9XQVJOX0xFVkVMOwotCisJQ1VSVk5FVF9TRVQoVERfVE9fVk5FVChjdXJ0aHJlYWQpKTsKIAkv KiAKIAkgKiBDcmVhdGUgTmV0Z3JhcGggbm9kZQogCSAqLwogCiAJaWYgKG5nX21ha2Vfbm9kZV9j b21tb24oJnR5cGVzdHJ1Y3QsICZzYy0+c2Nfbm9kZSkgIT0gMCkgewogCQlVQlRfQUxFUlQoc2Ms ICJjb3VsZCBub3QgY3JlYXRlIE5ldGdyYXBoIG5vZGVcbiIpOworCQlDVVJWTkVUX1JFU1RPUkUo KTsKIAkJcmV0dXJuIChFTlhJTyk7CiAJfQogCkBAIC00NjcsMTAgKzQ3MSwxMiBAQAogCWlmIChu Z19uYW1lX25vZGUoc2MtPnNjX25vZGUsIGRldmljZV9nZXRfbmFtZXVuaXQoZGV2KSkgIT0gMCkg ewogCQlVQlRfQUxFUlQoc2MsICJjb3VsZCBub3QgbmFtZSBOZXRncmFwaCBub2RlXG4iKTsKIAkJ TkdfTk9ERV9VTlJFRihzYy0+c2Nfbm9kZSk7CisJCUNVUlZORVRfUkVTVE9SRSgpOwogCQlyZXR1 cm4gKEVOWElPKTsKIAl9CiAJTkdfTk9ERV9TRVRfUFJJVkFURShzYy0+c2Nfbm9kZSwgc2MpOwog CU5HX05PREVfRk9SQ0VfV1JJVEVSKHNjLT5zY19ub2RlKTsKKwlDVVJWTkVUX1JFU1RPUkUoKTsK IAogCS8qCiAJICogSW5pdGlhbGl6ZSBkZXZpY2Ugc29mdGMgc3RydWN0dXJlCg== --089e013d0f126b0a7e04e0e895cc-- From owner-freebsd-virtualization@FreeBSD.ORG Sun Jul 7 11:49:42 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3FF33746; Sun, 7 Jul 2013 11:49:42 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-x230.google.com (mail-qe0-x230.google.com [IPv6:2607:f8b0:400d:c02::230]) by mx1.freebsd.org (Postfix) with ESMTP id E86AC1145; Sun, 7 Jul 2013 11:49:41 +0000 (UTC) Received: by mail-qe0-f48.google.com with SMTP id 2so1830958qea.21 for ; Sun, 07 Jul 2013 04:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Xql6Ckunle1D7AkT6TYmZGsKBsAP/SeTG4/3RUMcY2Y=; b=iALtzEvpT+tMwwoYfigkRQVwtg8CrwrabSR6FXplubePq3IS//4dUb8mIeqX+a08kc Z3UkENX6LdfZopptc5mZiMHUj+27M5qMA7dBo5KTD+QhqmX3X9V8KJJo2bqb1vsG70Ba AbVSaNkQncVRhzNLbMBNBFk1bTEb5Vd+hWgjPI6BU+quE1OG5RCnCgR4fL2lniNlJAB1 5RGO75oXPBKt7IU7/BTkYfND5UG2H6bEMzhG//QJBEhhHCyqzJjX8aNo/nIFquVnb4vh VhedkOD776oVFGx2Ss+dLNAUJi8+p79Ds+cBxIiZZh8bN2j1ly24g/TOwJvSdN6xogFy ksSA== MIME-Version: 1.0 X-Received: by 10.224.189.70 with SMTP id dd6mr14568641qab.24.1373197781419; Sun, 07 Jul 2013 04:49:41 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.195.72 with HTTP; Sun, 7 Jul 2013 04:49:41 -0700 (PDT) In-Reply-To: References: Date: Sun, 7 Jul 2013 04:49:41 -0700 X-Google-Sender-Auth: 4nTuDVgx6Vxu9v0YmvJjZD1Ep9Q Message-ID: Subject: Re: VIMAGE crashes on 9.x with bluetooth devices From: Adrian Chadd To: Craig Rodrigues Content-Type: text/plain; charset=ISO-8859-1 Cc: Maksim Yevmenkin , Marko Zec , "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 07 Jul 2013 11:49:42 -0000 Hi! It looks fine to me. Thanks, -adrian On 7 July 2013 02:30, Craig Rodrigues wrote: > Hi, > > I tried running PC-BSD 9.1 on an HP Elitebook 8460p laptop ( > http://h10010.www1.hp.com/wwpc/pscmi...oks/8460p.html ). > See the screenshot I posted here: > > http://forums.pcbsd.org/showthread.php?t=20001 > > In PC-BSD, the default kernel comes with VIMAGE enabled in the kernel > config. > > The problem I encountered seems to be caused by problems > with the FreeBSD kernel with VIMAGE + bluetooth. > > I've seen similar threads being posted here: > > "VIMAGE crashes on 9.x with hotplug net80211 devices" > http://lists.freebsd.org/pipermail/freebsd-hackers/2012-October/040784.html > > "Panic in netgraph with VIMAGE" > http://lists.freebsd.org/pipermail/freebsd-virtualization/2009-May/000325.html > > > > Doing some kernel debugging, I got this stack trace: > > #0 doadump (textdump=) at pcpu.h:234 > #1 0xffffffff80923e86 in kern_reboot (howto=260) at > /usr/home/rodrigc/freebsd/9/sys/kern/kern_shutdown.c:449 > #2 0xffffffff80924387 in panic (fmt=0x1
) at > /usr/home/rodrigc/freebsd/9/sys/kern/kern_shutdown.c:637 > #3 0xffffffff80ce97f0 in trap_fatal (frame=0xc, eva=) > at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/trap.c:879 > #4 0xffffffff80ce9b51 in trap_pfault (frame=0xffffff811e2b7700, usermode=0) > at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/trap.c:795 > #5 0xffffffff80cea104 in trap (frame=0xffffff811e2b7700) at > /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/trap.c:463 > #6 0xffffffff80cd3433 in calltrap () at > /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/exception.S:228 > #7 0xffffffff81cc0bbd in ng_make_node_common (type=0xffffffff81cb6000, > nodepp=0xfffffe0124d9c310) > at > /usr/home/rodrigc/freebsd/9/sys/modules/netgraph/netgraph/../../../netgraph/ng_base.c:669 > #8 0xffffffff81cb320e in ubt_attach (dev=0xfffffe01041f1d00) > at > /usr/home/rodrigc/freebsd/9/sys/modules/netgraph/bluetooth/ubt/../../../../netgraph/bluetooth/drivers/ubt/ng_ubt.c:461 > #9 0xffffffff80956c9c in device_attach (dev=0xfffffe01041f1d00) at > device_if.h:180 > #10 0xffffffff8078a61e in usb_probe_and_attach (udev=0xfffffe0124580000, > iface_index=) > at /usr/home/rodrigc/freebsd/9/sys/dev/usb/usb_device.c:1183 > #11 0xffffffff80792c4e in uhub_explore (udev=0xfffffe000900c000) at > /usr/home/rodrigc/freebsd/9/sys/dev/usb/usb_hub.c:272 > #12 0xffffffff80792c74 in uhub_explore (udev=0xfffffe0007ee2000) at > /usr/home/rodrigc/freebsd/9/sys/dev/usb/usb_hub.c:286 > #13 0xffffffff8077ce46 in usb_bus_explore (pm=) at > /usr/home/rodrigc/freebsd/9/sys/dev/usb/controller/usb_controller.c:359 > #14 0xffffffff80796da3 in usb_process (arg=) at > /usr/home/rodrigc/freebsd/9/sys/dev/usb/usb_process.c:169 > #15 0xffffffff808f1cef in fork_exit (callout=0xffffffff80796cd0 > , arg=0xffffff8001c3cdb0, frame=0xffffff811e2b7b00) > at /usr/home/rodrigc/freebsd/9/sys/kern/kern_fork.c:988 > #16 0xffffffff80cd395e in fork_trampoline () at > /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/exception.S:602 > #17 0x0000000000000000 in ?? () > > > and the error occurred on line 669 in ng_base.c: > > #7 0xffffffff81cc0bbd in ng_make_node_common (type=0xffffffff81cb6000, > nodepp=0xfffffe0124d9c310) > at > /usr/home/rodrigc/freebsd/9/sys/modules/netgraph/netgraph/../../../netgraph/ng_base.c:669 > 669 node->nd_ID = V_nextID++; /* 137/sec for 1 year before wrap */ > (kgdb) l > 664 > 665 /* Get an ID and put us in the hash chain. */ > 666 IDHASH_WLOCK(); > 667 for (; { /* wrap protection, even if silly */ > 668 node_p node2 = NULL; > 669 node->nd_ID = V_nextID++; /* 137/sec for 1 year before wrap */ > 670 > 671 /* Is there a problem with the new number? */ > 672 NG_IDHASH_FIND(node->nd_ID, node2); /* already taken? */ > 673 if ((node->nd_ID != 0) && (node2 == NULL)) { > > > It turns out that when VIMAGE is defined in the kernel, V_nextID is not an > int any more, > it is a macro. line 669 expands to something that looks like: > > node->nd_ID = (*(__typeof(vnet_entry_nextID)*) > (((((__curthread())->td_vnet))->vnet_data_base) + > (uintptr_t)&vnet_entry_nextID))++; > > On my system, td_vnet was not initialized, so that was causing the kernel > panic. > > Is the attached patch OK to commit to -CURRENT, and then after some time MFC > to stable/9? > > With this patch, my system can boot with VIMAGE enabled in the kernel and it > does not crash. > > -- > Craig From owner-freebsd-virtualization@FreeBSD.ORG Mon Jul 8 11:41:02 2013 Return-Path: Delivered-To: freebsd-virtualization@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 274504CB for ; Mon, 8 Jul 2013 11:41:02 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 195B913C0 for ; Mon, 8 Jul 2013 11:41:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r68BeXe4053981 for ; Mon, 8 Jul 2013 11:41:01 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r68B6hgS046245 for freebsd-virtualization@FreeBSD.org; Mon, 8 Jul 2013 11:06:43 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 8 Jul 2013 11:06:43 GMT Message-Id: <201307081106.r68B6hgS046245@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-virtualization@FreeBSD.org Subject: Current problem reports assigned to freebsd-virtualization@FreeBSD.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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, 08 Jul 2013 11:41:02 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/170096 virtualization[vimage] Dynamically-attached network interface will c o kern/169991 virtualization[run] [vimage] panic after device plugged in o kern/165252 virtualization[vimage] [pf] [panic] kernel panics with VIMAGE and PF o kern/161094 virtualization[vimage] [pf] [panic] kernel panic with pf + VIMAGE wh o kern/160541 virtualization[vimage][pf][patch] panic: userret: Returning on td 0x o kern/160496 virtualization[vimage] [pf] [patch] kernel panic with pf + VIMAGE o kern/148155 virtualization[vimage] [pf] Kernel panic with PF + VIMAGE kernel opt a kern/147950 virtualization[vimage] [carp] VIMAGE + CARP = kernel crash s kern/143808 virtualization[pf] pf does not work inside jail a kern/141696 virtualization[rum] [vimage] [panic] rum(4)+ vimage = kernel panic 10 problems total. From owner-freebsd-virtualization@FreeBSD.ORG Tue Jul 9 02:41:11 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 68BA8DF3 for ; Tue, 9 Jul 2013 02:41:11 +0000 (UTC) (envelope-from lidl@pix.net) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254::3c]) by mx1.freebsd.org (Postfix) with ESMTP id 033401F31 for ; Tue, 9 Jul 2013 02:41:10 +0000 (UTC) Received: from torb.pix.net (torb.pix.net [IPv6:2001:470:e254:10:12dd:b1ff:febf:eca9]) (authenticated bits=0) by hydra.pix.net (8.14.5/8.14.5) with ESMTP id r692f9fv097272 for ; Mon, 8 Jul 2013 22:41:09 -0400 (EDT) (envelope-from lidl@pix.net) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.97.8 at mail.pix.net Message-ID: <51DB7845.1050704@pix.net> Date: Mon, 08 Jul 2013 22:41:09 -0400 From: Kurt Lidl User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: calcru runtime went backwards Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 09 Jul 2013 02:41:11 -0000 Greetings - I have been using bhyve for a while to host a FreeBSD stable/9 client. It works pretty well, but I often get messages similar to this, after a kick off a full 'buildworld' on the virtual host: calcru: runtime went backwards from 8023812124499416 usec to 1365567459 usec for pid 34794 (make) calcru: runtime went backwards from 8023812124499416 usec to 1365055948 usec for pid 34794 (make) I have the following in my /boot/loader.conf on the virtual host: zfs_load="YES" vfs.root.mountfrom="zfs:zroot2" virtio_load="YES" virtio_pci_load="YES" virtio_blk_load="YES" if_vtnet_load="YES" autoboot_delay="3" kern.hz="100" vfs.zfs.prefetch_disable="0" dtraceall_load="YES" (I have a small UFS partition that I mount as /bootdir, and /boot is symlinked into that. So, the virtual machine loads the kernel off of UFS, but everything else is ZFS on the machine.) Any suggestions for eliminating this warning? -Kurt (dmesg of host machine follows) Copyright (c) 1992-2013 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 10.0-CURRENT #0: Mon Jun 24 15:19:10 EDT 2013 lidl@busybox:/usr/obj/usr/src/sys/GENERIC amd64 FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 WARNING: WITNESS option enabled, expect reduced performance. CPU: Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz (2300.13-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x206d7 Family = 0x6 Model = 0x2d Stepping = 7 Features=0xbfebfbff Features2=0x1fbee3ff AMD Features=0x2c100800 AMD Features2=0x1 TSC: P-state invariant, performance statistics real memory = 34359738368 (32768 MB) avail memory = 32025104384 (30541 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 12 CPUs FreeBSD/SMP: 1 package(s) x 6 core(s) x 2 SMT threads cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 cpu4 (AP): APIC ID: 4 cpu5 (AP): APIC ID: 5 cpu6 (AP): APIC ID: 6 cpu7 (AP): APIC ID: 7 cpu8 (AP): APIC ID: 8 cpu9 (AP): APIC ID: 9 cpu10 (AP): APIC ID: 10 cpu11 (AP): APIC ID: 11 ioapic1 irqs 24-47 on motherboard ioapic0 irqs 0-23 on motherboard lapic0: Forcing LINT1 to edge trigger kbd1 at kbdmux0 acpi0: on motherboard acpi0: Power Button (fixed) acpi0: reservation of f0000000, 18000000 (3) failed cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 cpu4: on acpi0 cpu5: on acpi0 cpu6: on acpi0 cpu7: on acpi0 cpu8: on acpi0 cpu9: on acpi0 cpu10: on acpi0 cpu11: on acpi0 atrtc0: port 0x70-0x71,0x74-0x77 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 attimer0: port 0x40-0x43,0x50-0x53 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 hpet0: iomem 0xfed00000-0xfed03fff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 950 Event timer "HPET" frequency 14318180 Hz quality 350 Event timer "HPET1" frequency 14318180 Hz quality 340 Event timer "HPET2" frequency 14318180 Hz quality 340 Event timer "HPET3" frequency 14318180 Hz quality 340 Event timer "HPET4" frequency 14318180 Hz quality 340 Event timer "HPET5" frequency 14318180 Hz quality 340 Event timer "HPET6" frequency 14318180 Hz quality 340 Event timer "HPET7" frequency 14318180 Hz quality 340 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pcib2: at device 1.1 on pci0 pci2: on pcib2 xhci0: mem 0xe0400000-0xe0401fff irq 16 at device 0.0 on pci2 usbus0: waiting for BIOS to give up control xhci0: 32 byte context size. usbus0 on xhci0 pcib3: at device 2.0 on pci0 pci3: on pcib3 vgapci0: port 0x3000-0x30ff mem 0xd0000000-0xdfffffff,0xe0300000-0xe031ffff irq 16 at device 0.0 on pci3 hdac0: mem 0xe0320000-0xe0323fff irq 17 at device 0.1 on pci3 pcib4: at device 3.0 on pci0 pci4: on pcib4 pci0: at device 5.0 (no driver attached) pci0: at device 5.2 (no driver attached) pcib5: at device 17.0 on pci0 pci5: on pcib5 pci0: at device 22.0 (no driver attached) em0: port 0x4040-0x405f mem 0xe0500000-0xe051ffff,0xe0525000-0xe0525fff irq 20 at device 25.0 on pci0 em0: Using an MSI interrupt em0: Ethernet address: 70:54:d2:90:89:c5 ehci0: mem 0xe0601000-0xe06013ff irq 16 at device 26.0 on pci0 usbus1: EHCI version 1.0 usbus1 on ehci0 hdac1: mem 0xe0520000-0xe0523fff irq 22 at device 27.0 on pci0 pcib6: at device 28.0 on pci0 pci6: on pcib6 pcib7: at device 28.2 on pci0 pci7: on pcib7 fwohci0: <1394 Open Host Controller Interface> port 0x2000-0x20ff mem 0xe0200000-0xe02007ff irq 18 at device 0.0 on pci7 fwohci0: OHCI version 1.10 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 e0:cb:4e:00:00:18:0b:0f fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwohci0: Initiate bus reset fwohci0: fwohci_intr_core: BUS reset fwohci0: fwohci_intr_core: node_id=0x00000000, SelfID Count=1, CYCLEMASTER mode pcib8: at device 28.3 on pci0 pci8: on pcib8 xhci1: mem 0xe0100000-0xe0101fff irq 19 at device 0.0 on pci8 usbus2: waiting for BIOS to give up control xhci1: 32 byte context size. usbus2 on xhci1 pcib9: at device 28.5 on pci0 pci9: on pcib9 em1: port 0x1000-0x101f mem 0xe0000000-0xe001ffff,0xe0020000-0xe0023fff irq 17 at device 0.0 on pci9 em1: Using MSIX interrupts with 3 vectors em1: Ethernet address: 70:54:d2:90:89:c6 ehci1: mem 0xe0602000-0xe06023ff irq 23 at device 29.0 on pci0 usbus3: EHCI version 1.0 usbus3 on ehci1 pcib10: at device 30.0 on pci0 pci10: on pcib10 isab0: at device 31.0 on pci0 isa0: on isab0 ahci0: port 0x4068-0x406f,0x4074-0x4077,0x4060-0x4067,0x4070-0x4073,0x4020-0x403f mem 0xe0527000-0xe05277ff irq 18 at device 31.2 on pci0 ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported ahcich0: at channel 0 on ahci0 ahcich1: at channel 1 on ahci0 ahcich2: at channel 2 on ahci0 ahcich3: at channel 3 on ahci0 ahcich4: at channel 4 on ahci0 ahcich5: at channel 5 on ahci0 ahciem0: on ahci0 ichsmb0: port 0x4000-0x401f mem 0xe0528000-0xe05280ff irq 18 at device 31.3 on pci0 smbus0: on ichsmb0 smb0: on smbus0 orm0: at iomem 0xc0000-0xcffff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] ppc0: cannot reserve I/O port range coretemp0: on cpu0 est0: on cpu0 p4tcc0: on cpu0 coretemp1: on cpu1 est1: on cpu1 p4tcc1: on cpu1 coretemp2: on cpu2 est2: on cpu2 p4tcc2: on cpu2 coretemp3: on cpu3 est3: on cpu3 p4tcc3: on cpu3 coretemp4: on cpu4 est4: on cpu4 p4tcc4: on cpu4 coretemp5: on cpu5 est5: on cpu5 p4tcc5: on cpu5 coretemp6: on cpu6 est6: on cpu6 p4tcc6: on cpu6 coretemp7: on cpu7 est7: on cpu7 p4tcc7: on cpu7 coretemp8: on cpu8 est8: on cpu8 p4tcc8: on cpu8 coretemp9: on cpu9 est9: on cpu9 p4tcc9: on cpu9 coretemp10: on cpu10 est10: on cpu10 p4tcc10: on cpu10 coretemp11: on cpu11 est11: on cpu11 p4tcc11: on cpu11 firewire0: 1 nodes, maxhop <= 0 cable IRM irm(0) (me) firewire0: bus manager 0 ZFS filesystem version: 5 ZFS storage pool version: features support (5000) Timecounters tick every 1.000 msec hdacc0: at cad 0 on hdac0 hdaa0: at nid 1 on hdacc0 pcm0: at nid 3 on hdaa0 hdacc1: at cad 0 on hdac1 hdaa1: at nid 1 on hdacc1 pcm1: at nid 20,22,21 and 24,26 on hdaa1 pcm2: at nid 27 and 25 on hdaa1 pcm3: at nid 17 on hdaa1 pcm4: at nid 30 on hdaa1 usbus0: 5.0Gbps Super Speed USB v3.0 usbus1: 480Mbps High Speed USB v2.0 usbus2: 5.0Gbps Super Speed USB v3.0 usbus3: 480Mbps High Speed USB v2.0 ugen1.1: at usbus1 uhub0: on usbus1 ugen0.1: <0x1033> at usbus0 uhub1: <0x1033 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0 ugen3.1: at usbus3 uhub2: on usbus3 ugen2.1: <0x1033> at usbus2 uhub3: <0x1033 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus2 ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: ATA-8 SATA 2.x device ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C) ada0: Previously was known as ad4 ada1 at ahcich1 bus 0 scbus1 target 0 lun 0 ada1: ATA-8 SATA 2.x device ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada1: Command Queueing enabled ada1: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C) ada1: Previously was known as ad6 ses0 at ahciem0 bus 0 scbus6 target 0 lun 0 ses0: SEMB S-E-S 2.00 device ses0: SEMB SES Device lapic1: Forcing LINT1 to edge trigger SMP: AP CPU #1 Launched! lapic10: Forcing LINT1 to edge trigger SMP: AP CPU #10 Launched! lapic4: Forcing LINT1 to edge trigger SMP: AP CPU #4 Launched! lapic2: Forcing LINT1 to edge trigger SMP: AP CPU #2 Launched! lapic9: Forcing LINT1 to edge trigger SMP: AP CPU #9 Launched! lapic3: Forcing LINT1 to edge trigger SMP: AP CPU #3 Launched! lapic8: Forcing LINT1 to edge trigger SMP: AP CPU #8 Launched! lapic7: Forcing LINT1 to edge trigger SMP: AP CPU #7 Launched! lapic11: Forcing LINT1 to edge trigger SMP: AP CPU #11 Launched! lapic5: Forcing LINT1 to edge trigger SMP: AP CPU #5 Launched! lapic6: Forcing LINT1 to edge trigger SMP: AP CPU #6 Launched! WARNING: WITNESS option enabled, expect reduced performance. uhub1: 4 ports with 4 removable, self powered GEOM_MIRROR: Device mirror/gswap launched (2/2). uhub3: 4 ports with 4 removable, self powered uhub0: 2 ports with 2 removable, self powered uhub2: 2 ports with 2 removable, self powered Root mount waiting for: usbus3 usbus1 ugen1.2: at usbus1 uhub4: on usbus1 ugen3.2: at usbus3 uhub5: on usbus3 Root mount waiting for: usbus3 usbus1 uhub4: 6 ports with 6 removable, self powered uhub5: 8 ports with 8 removable, self powered Root mount waiting for: usbus3 usbus1 ugen1.3: at usbus1 ukbd0: on usbus1 kbd2 at ukbd0 ugen3.3: at usbus3 Root mount waiting for: usbus3 ugen3.4: at usbus3 Trying to mount root from zfs:zroot []... bridge0: Ethernet address: 02:af:d1:e7:3e:00 tap0: Ethernet address: 00:bd:3a:28:00:00 tap1: Ethernet address: 00:bd:40:28:00:01 tap2: Ethernet address: 00:bd:46:28:00:02 tap3: Ethernet address: 00:bd:4c:28:00:03 run0: <1.0> on usbus3 ums0: on usbus1 run0: MAC/BBP RT3070 (rev 0x0201), RF RT3020 (MIMO 1T1R), address dc:85:de:4a:39:7b ubt0: on usbus3 WARNING: attempt to domain_add(bluetooth) after domainfinalize() WARNING: attempt to domain_add(netgraph) after domainfinalize() From owner-freebsd-virtualization@FreeBSD.ORG Tue Jul 9 03:54:51 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9F055F5B for ; Tue, 9 Jul 2013 03:54:51 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 65E1D15DC for ; Tue, 9 Jul 2013 03:54:51 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id 90D7A12017; Tue, 9 Jul 2013 13:54:49 +1000 (EST) Received: from Peter-Grehans-MacBook-Pro-2.local ([64.245.0.210]) by dommail.onthenet.com.au (MOS 4.2.4-GA) with ESMTP id BNF06536 (AUTH peterg@ptree32.com.au); Tue, 9 Jul 2013 13:54:48 +1000 Message-ID: <51DB8987.3010806@freebsd.org> Date: Mon, 08 Jul 2013 20:54:47 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Kurt Lidl Subject: Re: calcru runtime went backwards References: <51DB7845.1050704@pix.net> In-Reply-To: <51DB7845.1050704@pix.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 09 Jul 2013 03:54:51 -0000 Hi Kurt, > CPU: Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz (2300.13-MHz K8-class CPU) Looks like this Sandy Bridge has turbo-boost. First step is to disable that in the BIOS and see if that has any effect. How many vCPUs in the guest ? later, Peter. From owner-freebsd-virtualization@FreeBSD.ORG Sat Jul 13 05:52:33 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 943B1427; Sat, 13 Jul 2013 05:52:33 +0000 (UTC) (envelope-from lidl@pix.net) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254::3c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E8B01219; Sat, 13 Jul 2013 05:52:32 +0000 (UTC) Received: from torb.pix.net (torb.pix.net [IPv6:2001:470:e254:10:12dd:b1ff:febf:eca9]) (authenticated bits=0) by hydra.pix.net (8.14.5/8.14.5) with ESMTP id r6D5qW66084321; Sat, 13 Jul 2013 01:52:32 -0400 (EDT) (envelope-from lidl@pix.net) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.97.8 at mail.pix.net Message-ID: <51E0EB20.3070103@pix.net> Date: Sat, 13 Jul 2013 01:52:32 -0400 From: Kurt Lidl User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Peter Grehan Subject: Re: calcru runtime went backwards References: <51DB7845.1050704@pix.net> <51DB8987.3010806@freebsd.org> In-Reply-To: <51DB8987.3010806@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Sat, 13 Jul 2013 05:52:33 -0000 On 7/8/13 11:54 PM, Peter Grehan wrote: > Hi Kurt, > >> CPU: Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz (2300.13-MHz K8-class CPU) > > Looks like this Sandy Bridge has turbo-boost. First step is to disable > that in the BIOS and see if that has any effect. > > How many vCPUs in the guest ? I was finally able to do this. I turned off the Turbo-Boost in the BIOS, and restarted everything. My virtual machine is configured with 4 cpus and 10240 (10GB) of memory. I got the same error today when compiling python in the virtual machine: calcru: runtime went backwards from 48142872748812902 usec to 593237864 usec for pid 73714 (make) calcru: runtime went backwards from 48142872748812902 usec to 593157552 usec for pid 73714 (make) Looking at the console log, I also found the following on the console when it was booting: calcru: runtime went backwards from 8023812124181248 usec to 979712 usec for pid 13 (geom) So, disabling Turbo-Boost doesn't resolve the problem. -Kurt