From owner-freebsd-stable@freebsd.org Fri Jan 20 15:58:06 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDB02CB86F9; Fri, 20 Jan 2017 15:58:06 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.fagskolen.gjovik.no", Issuer "Fagskolen i Gj??vik" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 969541123; Fri, 20 Jan 2017 15:58:06 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.15.2/8.15.2) with ESMTPS id v0KFvdjm011785 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 20 Jan 2017 16:57:39 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.15.2/8.15.2/Submit) with ESMTP id v0KFvd5V011782; Fri, 20 Jan 2017 16:57:39 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Fri, 20 Jan 2017 16:57:39 +0100 (CET) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: SK cc: "freebsd-stable@freebsd.org" , freebsd-xen@freebsd.org, freebsd-virtualization@freebsd.org Subject: Re: FreeBSD 11 Stable on a Xen :: bridge0 crashing server In-Reply-To: <7c06aea6-0b10-e9c0-d750-f42d4a406258@cps-intl.org> Message-ID: References: <7c06aea6-0b10-e9c0-d750-f42d4a406258@cps-intl.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.fig.ol.no Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2017 15:58:07 -0000 On Fri, 20 Jan 2017 14:26-0000, SK wrote: > Dear List members > > Apologies for cross posting to two other lists -- was not sure which one is > more appropriate for this, as it may be related to stable, xen or > virtualization. > > Here is the situation: > I have a VPS server from a well reputed provider (and they deserve the > reputation), running FreeBSD 11 stable x64 under Xen Full Virtualization > (HVM). I have the xn0 interface which is working fine. I intend to use VIMAGE, > so I compiled the kernel, added cloned_interface="bridge0" and restarted the > server. But as soon as I am attaching the xn0 to bridge0, the kernel is > panicking and the server restarting. > > The provider confirmed that they found similar behaviour on a freshly > installed/provisioned FreeBSD 11 x64 system. > > Further to that, the provider ran some tests, and what they are telling me is > if they install/provision FreeBSD 10 x64, there is no problem with attaching > bridge0 to xn0. Then they updated/upgraded that box to FreeBSD 11 x64, and > that too worked when they attached bridge0 to xn0. However, they are yet to > come back with my request to build a custom kernel with options VIMAGE and try > it out. > > In the meanwhile, I took a crash dump and followed the FreeBSD handbook (not > that it gave me much idea, I'm not a programmer nor am at that level of > skillsets). The dump/debug is available at http://pastebin.com/XuWvJHUZ for > anyone who is interested. > > Just wondering how to go about it. I do need to have bridge0 with xn0 and all > the epairs I'm going to use for my jails. > > Any suggestion/pointer/test-instruction is highly appreciated. The code crashes at line 427 of sys/netinet/if_ether.c: ARPSTAT_INC(txrequests); See https://svnweb.freebsd.org/base/stable/11/sys/netinet/if_ether.c?view=annotate#l427 stable/11 has problems accounting the outgoing octets of any xn interface, although this isn't connected to your case. Just to rule out any uncertainty, try this patch: https://svnweb.freebsd.org/base?view=revision&revision=308126 See PR 213439, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213439 Note, I'm not a developer nor a committer, just a humble sysadmin. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ From owner-freebsd-stable@freebsd.org Fri Jan 20 16:21:33 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93421CB8FF3; Fri, 20 Jan 2017 16:21:33 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward5j.cmail.yandex.net (forward5j.cmail.yandex.net [IPv6:2a02:6b8:0:1630::18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5A312E1; Fri, 20 Jan 2017 16:21:32 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp2h.mail.yandex.net (smtp2h.mail.yandex.net [IPv6:2a02:6b8:0:f05::116]) by forward5j.cmail.yandex.net (Yandex) with ESMTP id 0A95C20F32; Fri, 20 Jan 2017 19:21:21 +0300 (MSK) Received: from smtp2h.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2h.mail.yandex.net (Yandex) with ESMTP id 3DA6F781EFF; Fri, 20 Jan 2017 19:21:16 +0300 (MSK) Received: by smtp2h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ZEALLWeYek-LFAqU3Ot; Fri, 20 Jan 2017 19:21:16 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1484929276; bh=qjQsFsKYlrrzWyCmbX2jHPxwuT9tInBOK3z0M9jjPy4=; h=Subject:To:References:Cc:From:Message-ID:Date:In-Reply-To; b=iNi2xWRvP+vL/l/qJbVIATrEelATaY0D/1Yq3iVylEzJl/+wiNanXnc2uxCpN5Tjl 20L7dtZ1bsiYf9XwOD3+LFAArVppI9Wqtm43QX+rvKb3ebnMBKdN8cqa58Zbg1x+7F r254oCRswrEtq8M/PecXmKkSUmfeNGbc+DjmAefs= Authentication-Results: smtp2h.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0,1 0 Subject: Re: FreeBSD 11 Stable on a Xen :: bridge0 crashing server To: =?UTF-8?Q?Trond_Endrest=c3=b8l?= , SK References: <7c06aea6-0b10-e9c0-d750-f42d4a406258@cps-intl.org> Cc: freebsd-xen@freebsd.org, "freebsd-stable@freebsd.org" , freebsd-virtualization@freebsd.org From: "Andrey V. Elsukov" Message-ID: Date: Fri, 20 Jan 2017 19:20:15 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2017 16:21:33 -0000 On 20.01.2017 18:57, Trond Endrestøl wrote: >> Here is the situation: >> I have a VPS server from a well reputed provider (and they deserve the >> reputation), running FreeBSD 11 stable x64 under Xen Full Virtualization >> (HVM). I have the xn0 interface which is working fine. I intend to use VIMAGE, >> so I compiled the kernel, added cloned_interface="bridge0" and restarted the >> server. But as soon as I am attaching the xn0 to bridge0, the kernel is >> panicking and the server restarting. >> Any suggestion/pointer/test-instruction is highly appreciated. > > The code crashes at line 427 of sys/netinet/if_ether.c: > > ARPSTAT_INC(txrequests); > > See > https://svnweb.freebsd.org/base/stable/11/sys/netinet/if_ether.c?view=annotate#l427 > > stable/11 has problems accounting the outgoing octets of any xn > interface, although this isn't connected to your case. > > Just to rule out any uncertainty, try this patch: > > https://svnweb.freebsd.org/base?view=revision&revision=308126 > > See PR 213439, > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213439 > > Note, I'm not a developer nor a committer, just a humble sysadmin. This problem is unrelated. ARP statistics is global and isn't related to some specific interface. IMHO, the kernel panics due to missing VNET context. As I see from the code in sys/dev/xen, it is not capable with VIMAGE. -- WBR, Andrey V. Elsukov