From owner-freebsd-current@freebsd.org Tue Feb 12 19:54:44 2019 Return-Path: Delivered-To: freebsd-current@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 C067C14CEAC6; Tue, 12 Feb 2019 19:54:43 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE4F177D5E; Tue, 12 Feb 2019 19:54:40 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from disco.vangyzen.net (unknown [70.97.188.230]) by smtp.vangyzen.net (Postfix) with ESMTPSA id AE2EA56468; Tue, 12 Feb 2019 13:54:25 -0600 (CST) Subject: Re: Networking panic on 12 - found the cause To: Pete French , "Andrey V. Elsukov" , freebsd-stable@freebsd.org, freebsd-current References: <4a350f47-eaca-5aca-9268-bf7a6618e71c@yandex.ru> From: Eric van Gyzen Message-ID: <0a0f2668-19f7-ad62-dff4-e2997e57ea5c@vangyzen.net> Date: Tue, 12 Feb 2019 13:54:21 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CE4F177D5E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of eric@vangyzen.net designates 2607:fc50:1000:7400:216:3eff:fe72:314f as permitted sender) smtp.mailfrom=eric@vangyzen.net X-Spamd-Result: default: False [-6.55 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[vangyzen.net]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[hotblack.vangyzen.net]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; IP_SCORE(-3.28)[ip: (-8.18), ipnet: 2607:fc50:1000::/36(-4.23), asn: 36236(-3.90), country: US(-0.07)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:36236, ipnet:2607:fc50:1000::/36, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2019 19:54:44 -0000 On 2/12/19 8:53 AM, Pete French wrote: > I found my panic. If I take everything out of rc.conf and loader.conf > and sysctl.conf and boot the system it works fine when I add an IP > address. If I add this one line to sysctl.conf > >     net.link.ether.inet.garp_rexmit_count=2 > > Then I get a panic when I configure the interface: > > root@serpentine-passive:~ #  ifconfig igb0 inet 10.32.10.4/16 up > > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address   = 0x28 > fault code              = supervisor read data, page not present > instruction pointer     = 0x20:0xffffffff80c987f1 > stack pointer           = 0x28:0xfffffe00004d5730 > frame pointer           = 0x28:0xfffffe00004d5750 > code segment            = base 0x0, limit 0xfffff, type 0x1b >                         = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags        = interrupt enabled, resume, IOPL = 0 > current process         = 12 (swi4: clock (0)) > trap number             = 12 > panic: page fault > cpuid = 0 > time = 1549981620 > KDB: stack backtrace: > #0 0xffffffff80bdfdc7 at kdb_backtrace+0x67 > #1 0xffffffff80b93fa3 at vpanic+0x1a3 > #2 0xffffffff80b93df3 at panic+0x43 > #3 0xffffffff8106a7bf at trap_fatal+0x35f > #4 0xffffffff8106a819 at trap_pfault+0x49 > #5 0xffffffff81069e3e at trap+0x29e > #6 0xffffffff810450c5 at calltrap+0x8 > #7 0xffffffff80c986f6 at ether_output+0x6b6 > #8 0xffffffff80d03354 at arprequest+0x4c4 > #9 0xffffffff80d0515c at garp_rexmit+0xbc > #10 0xffffffff80bade19 at softclock_call_cc+0x129 > #11 0xffffffff80bae2f9 at softclock+0x79 > #12 0xffffffff80b57c57 at ithread_loop+0x1a7 > #13 0xffffffff80b54da2 at fork_exit+0x82 > #14 0xffffffff810460be at fork_trampoline+0xe I see the same behavior on head (and stable/12). (kgdb) f #16 0xffffffff80ce5331 in ether_output_frame (ifp=0xfffff80003672800, m=0xfffff8000c88b100) at /usr/src/sys/net/if_ethersubr.c:468 468 switch (pfil_run_hooks(V_link_pfil_head, &m, ifp, PFIL_OUT, 0xffffffff80ce5321 <+81>: mov %gs:0x0,%rax 0xffffffff80ce532a <+90>: mov 0x500(%rax),%rax => 0xffffffff80ce5331 <+97>: mov 0x28(%rax),%rax I think this is part of the V_link_pfil_head. I'm not very familiar with vnet. Does this need a CURVNET_SET(), maybe in garp_rexmit()? Eric