From owner-freebsd-current@freebsd.org Thu Sep 20 11:53:25 2018 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 67FC510998AA for ; Thu, 20 Sep 2018 11:53:25 +0000 (UTC) (envelope-from imb@protected-networks.net) Received: from mail.protected-networks.net (mail.protected-networks.net [IPv6:2001:470:8d59:1::8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protected-networks.net", Issuer "Protected Networks CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0752089DAA for ; Thu, 20 Sep 2018 11:53:24 +0000 (UTC) (envelope-from imb@protected-networks.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= protected-networks.net; h=content-transfer-encoding :content-language:content-type:content-type:in-reply-to :mime-version:user-agent:date:date:message-id:from:from :references:subject:subject; s=201508; t=1537444402; bh=ovit2pf/ 2oxyYs/m234x1RU+Uf9Mvf9b1WwxElZzjP8=; b=ArUVvxy2RjkUi813e8bpaPG4 LeNcjtbG83/kOB+VcZdSUapAj+rnC4UaRlrKDPx1aWNudsulgGSlu5YxYRPfDAQT 7Z6EhNafHItYr6r1Qv/TDMTf2fMoEDFCh1DQa7fwQERocKjoj43yV5bZMAmyU90a XbLDhWm/NypWMYwEWDs= Received: from toshi.auburn.protected-networks.net (toshi.auburn.protected-networks.net [192.168.1.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: imb@mail.protected-networks.net) by mail.protected-networks.net (Postfix) with ESMTPSA id CDFB91CBE6 for ; Thu, 20 Sep 2018 07:53:22 -0400 (EDT) Subject: Re: udp6: Page fault panics To: freebsd-current@freebsd.org References: <20180916000455.isqioezu6oovhjzg@ler-imac.local> From: Michael Butler Openpgp: preference=signencrypt Message-ID: <895cd59b-a09e-4af0-f316-56e966354ba2@protected-networks.net> Date: Thu, 20 Sep 2018 07:53:22 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 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: Thu, 20 Sep 2018 11:53:25 -0000 On 9/17/18 4:17 AM, Andrey V. Elsukov wrote: > On 16.09.2018 03:04, Larry Rosenman wrote: >> vpanic() at vpanic+0x1a3/frame 0xfffffe00ca17c150 >> panic() at panic+0x43/frame 0xfffffe00ca17c1b0 >> trap_fatal() at trap_fatal+0x35f/frame 0xfffffe00ca17c200 >> trap_pfault() at trap_pfault+0x49/frame 0xfffffe00ca17c260 >> trap() at trap+0x2ba/frame 0xfffffe00ca17c370 >> calltrap() at calltrap+0x8/frame 0xfffffe00ca17c370 >> --- trap 0xc, rip = 0xffffffff80631428, rsp = 0xfffffe00ca17c440, rbp = 0xfffffe00ca17c480 --- >> selectroute() at selectroute+0x198/frame 0xfffffe00ca17c480 >> in6_selectroute_fib() at in6_selectroute_fib+0xf/frame 0xfffffe00ca17c4a0 >> ip6_output() at ip6_output+0xfd7/frame 0xfffffe00ca17c710 > > (kgdb) l *selectroute+0x198 > 0xffffffff80de14c8 is in selectroute > (/home/devel/freebsd/base/head/sys/netinet6/in6_src.c:736). > 731 * Use a cached route if it exists and is valid, else try to allocate > 732 * a new one. Note that we should check the address family of the > 733 * cached destination, in case of sharing the cache with IPv4. > 734 */ > 735 if (ro) { > 736 if (ro->ro_rt && > 737 (!(ro->ro_rt->rt_flags & RTF_UP) || > 738 ((struct sockaddr *)(&ro->ro_dst))->sa_family != AF_INET6 || > 739 !IN6_ARE_ADDR_EQUAL(&satosin6(&ro->ro_dst)->sin6_addr, > 740 dst))) { > >> calltrap() at calltrap+0x8/frame 0xfffffe00c9d863e0 >> --- trap 0xc, rip = 0xffffffff80636b2b, rsp = 0xfffffe00c9d864b0, rbp = 0xfffffe00c9d86710 --- >> ip6_output() at ip6_output+0xeeb/frame 0xfffffe00c9d86710 >> udp6_send() at udp6_send+0x720/frame 0xfffffe00c9d868d0 > (kgdb) l *ip6_output+0xeeb > 0xffffffff80de75bb is in ip6_output > (/home/devel/freebsd/base/head/sys/netinet6/ip6_output.c:531). > 526 */ > 527 if (inp) { > 528 ro->ro_dst.sin6_family = AF_INET6; > 529 RT_VALIDATE((struct route *)ro, &inp->inp_rt_cookie, fibnum); > 530 } > 531 if (ro->ro_rt && fwd_tag == NULL && (ro->ro_rt->rt_flags & RTF_UP) && > 532 ro->ro_dst.sin6_family == AF_INET6 && > 533 IN6_ARE_ADDR_EQUAL(&ro->ro_dst.sin6_addr, &ip6->ip6_dst)) { > 534 rt = ro->ro_rt; > 535 ifp = ro->ro_rt->rt_ifp; > > It looks like Ryan's assumption is correct and panics happen due to > several threads use the same PCB and then route cache invalidation happens. > https://lists.freebsd.org/pipermail/freebsd-net/2018-September/051563.html > > But IPv6 path also needs similar patch. > I can confirm that SVN r338804 resolves this issue, imb