From owner-freebsd-xen@freebsd.org Mon Aug 20 09:50:25 2018 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E702108AD36 for ; Mon, 20 Aug 2018 09:50:25 +0000 (UTC) (envelope-from prvs=76356e8f4=roger.pau@citrix.com) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [185.25.65.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.citrix.com", Issuer "DigiCert SHA2 Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC30084573 for ; Mon, 20 Aug 2018 09:50:24 +0000 (UTC) (envelope-from prvs=76356e8f4=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.53,264,1531785600"; d="scan'208";a="77850597" Date: Mon, 20 Aug 2018 11:49:04 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Marko Zec CC: Nathan Friess , Subject: Re: xen+vimage kernel panic Message-ID: <20180820094904.xdvsdowllpjcivlx@mac> References: <1f010180-30c3-3a28-a2ca-b9f6279aee9c@gmail.com> <20180819224852.40754d2a@x23> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180819224852.40754d2a@x23> User-Agent: NeoMutt/20180716 X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2018 09:50:25 -0000 On Sun, Aug 19, 2018 at 10:48:52PM +0200, Marko Zec wrote: > On Sun, 19 Aug 2018 12:50:55 -0600 > Nathan Friess wrote: > > > Hi, > > > > While testing out the new PVH support in a domU (which is running > > great!), I discovered a kernel panic related to xen and vimage > > support when trying to add an xn interface into a bridge. > > > > I'm running r337024 from svn. Removing vimage (which seems to be > > turned on in 12-CURRENT now) allows using the bridge with no panics. > > As part of attempting to debug this I enabled vimage in my 11.2 domU > > and that also panics in the same code. > > > > I'm not sure if the problem is a xen issue or a vimage issue so I > > haven't submitted a PR yet. The kernel output is listed below. > > > > It looks like netfront_backend_changed() calls > > netfront_send_fake_arp(), which calls arp_ifinit() on the interface. > > The first line of the call stack with arprequest+0x454 corresponds to > > a call to ARPSTAT_INC(txrequests) at the end of arprequest, which > > expands to VNET_PCPUSTAT_ADD(). I tried to debug further and I got a > > little lost, but that's where I figured out that vimage is involved > > somehow. > > > > Are there any thoughts on why the xn interface would cause a panic > > there? > > The xn driver calls arp_ifinit() without setting the vnet context > first. Perhaps the attached patch could help (not even compile > tested...) I know nothing about VNET, so is this initialization required now that VNET is enabled? Is this an existing bug in netfront that was harmless before VNET was activated? Can you please file a bug report and attach the patch? Thanks, Roger.