From owner-freebsd-net@freebsd.org Thu May 25 15:32:00 2017 Return-Path: Delivered-To: freebsd-net@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 4EC63D826FE for ; Thu, 25 May 2017 15:32:00 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-oi0-x235.google.com (mail-oi0-x235.google.com [IPv6:2607:f8b0:4003:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 116681116 for ; Thu, 25 May 2017 15:32:00 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-oi0-x235.google.com with SMTP id h4so284243736oib.3 for ; Thu, 25 May 2017 08:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8PhoyeVFTrJfLisDmZnWpuYHiyLx0Yn0cbg0sti+5kY=; b=h+JzmRqpF3DXNRw75WeFXVFzx4HyKtCwZ1F3uduVTlsetw1qn74YC31LBsP61ofQiE vnbtToRTWziyVgolcXz3w+OWdHISAWf2tS68iFyXRLxXVJUGHZ2Y0aNTq3xuoA0uUoot e6OnfR7LmINRQmCWoI89uxm5r7B0hGl8Bbv3oCmPeWJ3zNmv5U1wC5xpNZw6h1voEK7q bpUxWXhTSSyQzQGAO8ss02qAEyd1UfxRw/n+WCHGyLMf0UsTYD25f3SVpjK7Wbntek8E wlgnYBHWsE3UyqxHFnz5e3ZJJbmOgHiRCjQmpY/Y75wwog6YoljpUl0nKzTEhPZht/rR CASA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8PhoyeVFTrJfLisDmZnWpuYHiyLx0Yn0cbg0sti+5kY=; b=VL9AHCaIRKHrlEtpfwUh1VuRAlSILiRZ6JFhnO/Owxxxe4rQ6W6D0UjPP5FeKVh7E4 8I17DEGBXSD0oaiiuyYYbufixdEG6OBBEUNpd8X5MXxvDrPyo+DBRsNug/6tjeXAh4om dLAZGv1TTbmXlJYCFo2znpEYScaMijzdrinD7kkhbg16tkdumHptqVjd2XX08ZMCKYbT MRsMXBSVgkUXnbhtZOzhQKChXQpUBP827DQar8JkBg/PygLRjs5KIDQDk2UsCBo9OhVq 9Q+sKgSoqOn8josHTuINM6alTc5RthwtrkC5Wt/1/gHBlVbzawbl8+TCIRDLxjvr1INj HymA== X-Gm-Message-State: AODbwcAiQGPwVG4a0VdTinYLItIEmWeUkjLi3Px+p4bTpcBfh3TpTwtL oEG6SGHMyJhq76kwVAsUG6IklF9gyKzh X-Received: by 10.202.108.132 with SMTP id h126mr19439113oic.181.1495726319247; Thu, 25 May 2017 08:31:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.17.59 with HTTP; Thu, 25 May 2017 08:31:58 -0700 (PDT) In-Reply-To: <5926EE96.1010000@omnilan.de> References: <58CBCD7A.8060301@omnilan.de> <58CC23F5.7060507@omnilan.de> <58CFA394.8070901@omnilan.de> <5926EE96.1010000@omnilan.de> From: Vincenzo Maffione Date: Thu, 25 May 2017 17:31:58 +0200 Message-ID: Subject: Re: [panic] netmap(4) and if_lagg(4) To: Harry Schmalzbauer Cc: freebsd-net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 15:32:00 -0000 Hi, This is a (silly) bug that is not present anymore in the upstream code https://github.com/luigirizzo/netmap/blob/master/sys/dev/netmap/netmap_free= bsd.c#L410-L417 that is txq and rxq for generic adapter cannot be 0. So I would say the problem is outdated code in the FreeBSD version you are using. Which version you are using exactly? Maybe we can try to push a fix. Cheers, Vincenzo 2017-05-25 16:47 GMT+02:00 Harry Schmalzbauer : > Bez=C3=BCglich Vincenzo Maffione's Nachricht vom 20.03.2017 15:01 (localt= ime): > > 2017-03-20 10:40 GMT+01:00 Harry Schmalzbauer : > > > >> Bez=C3=BCglich Vincenzo Maffione's Nachricht vom 17.03.2017 22:28 > (localtime): > > =E2=80=A6 > >> I'll try to provide more info about the panic this week. Like discuss= ed > >> offlist, the panic happend on a machine with the mentioned fix (latest > >> stable). > >> Perhaps this panic can be fixed, especialy for the vlan children. > >> > > > > Ok, so if you create a vlan on an interface, and use netmap over the > vlan, > > you get a deterministic crash? Does the crash happen when you start > > transmitting, receiving or both? > > > > Sorry for the long delay. > > I now have a crash dump and could provide more info if someone can > afford having a look at the lagg panic. > The panic with em0.vlan vanisehd with latest -stable (11.1-prerelease), > but using lagg reproducably panics. > > Unread portion of the kernel message buffer: > 066.051358 [ 254] generic_find_num_desc called, in tx 1024 rx 1024 > 066.058166 [ 262] generic_find_num_queues called, in txq 0 rxq 0 > 066.064756 [1673] netmap_interp_ringid deprecated API, old ringid > 0x0 -> ringid 0 reg 1 > > > Fatal trap 12: page fault while in kernel mode > cpuid =3D 1; apic id =3D 01 > fault virtual address =3D 0xc > fault code =3D supervisor read data, page not present > instruction pointer =3D 0x20:0xffffffff80426894 > stack pointer =3D 0x28:0xfffffe03afccb750 > frame pointer =3D 0x28:0xfffffe03afccb770 > code segment =3D base 0x0, limit 0xfffff, type 0x1b > =3D DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags =3D interrupt enabled, resume, IOPL =3D 0 > current process =3D 12 (irq269: igb0:que 1) > trap number =3D 12 > panic: page fault > cpuid =3D 1 > KDB: stack backtrace: > #0 0xffffffff805d8277 at kdb_backtrace+0x67 > #1 0xffffffff80596d06 at vpanic+0x186 > #2 0xffffffff80596b73 at panic+0x43 > #3 0xffffffff80898472 at trap_fatal+0x322 > #4 0xffffffff808984c9 at trap_pfault+0x49 > #5 0xffffffff80897d06 at trap+0x286 > #6 0xffffffff8087dfa1 at calltrap+0x8 > #7 0xffffffff8069dc50 at vlan_input+0x1f0 > #8 0xffffffff8068eb08 at ether_demux+0x128 > #9 0xffffffff8068f7ab at ether_nh_input+0x31b > #10 0xffffffff806ab3f0 at netisr_dispatch_src+0xa0 > #11 0xffffffff8068edb6 at ether_input+0x26 > #12 0xffffffff8039f808 at igb_rxeof+0x738 > #13 0xffffffff8039ebcf at igb_msix_que+0x10f > #14 0xffffffff8055e66c at intr_event_execute_handlers+0xec > #15 0xffffffff8055e956 at ithread_loop+0xd6 > #16 0xffffffff8055bcc5 at fork_exit+0x85 > #17 0xffffffff8087e4de at fork_trampoline+0xe > Uptime: 1m37s > Dumping 1535 out of 15529 > MB:..2%..11%..21%..31%..41%..51%..61%..71%..81%..91% > =E2=80=A6 > Reading symbols from /usr/lib/debug/boot/kernel/uhid.ko.debug...done. > Loaded symbols for /usr/lib/debug/boot/kernel/uhid.ko.debug > #0 doadump (textdump=3D) at pcpu.h:222 > 222 pcpu.h: No such file or directory. > in pcpu.h > (kgdb) list *0xffffffff80426894 > 0xffffffff80426894 is in generic_rx_handler > (/usr/local/share/deploy-tools/RELENG_11/src/sys/dev/ > netmap/netmap_generic.c:628). > 623 struct netmap_adapter *na =3D NA(ifp); > 624 struct netmap_generic_adapter *gna =3D (struct > netmap_generic_adapter *)na; > 625 u_int work_done; > 626 u_int rr =3D MBUF_RXQ(m); // receive ring number > 627 > 628 if (rr >=3D na->num_rx_rings) { > 629 rr =3D rr % na->num_rx_rings; // XXX expensive... > 630 } > 631 > 632 /* limit the size of the queue */ > > Thanks, > > -harry > --=20 Vincenzo Maffione