From owner-freebsd-net@FreeBSD.ORG Thu Aug 29 20:48:00 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 32197AB7; Thu, 29 Aug 2013 20:48:00 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-lb0-x22d.google.com (mail-lb0-x22d.google.com [IPv6:2a00:1450:4010:c04::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3189E2801; Thu, 29 Aug 2013 20:47:59 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id o14so1064062lbi.32 for ; Thu, 29 Aug 2013 13:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=CcISQNVl0zmUJb2N5e+a1QsrMAEWMjRtpycuFtsB27Y=; b=vOqafh+99rUundUoAMiFiFPVyxGa2fjbPh4Oay3Mr1BfKmQOjYj1O+6ZI+MWSOeeAO jsvtbtg8pXg6riPzrw7sejVR+ym6Qp4tapDt6G37bIkw6dvodQJi1l6+U4+x9gk7u+xp 3BxWeu5iKhUhOao5eoIt2weDp6bSRqt7ePFemIv6RW5LfC8ZSoUy5c9m7eocoFvHFi31 ndKApq3AOxO85/vvWc84YgQTBbzKzNtsTapp8c8wV2hee8dRZ4cEtrpZrKOSH+7o0XAb a5D1/IUNMWpM3WztAs8BOYPo3yOOvCTMA3WDbO9HfEARjVQg6g3AP6YoLh7lPKWG3pFr 0pdg== MIME-Version: 1.0 X-Received: by 10.152.8.12 with SMTP id n12mr4555558laa.10.1377809276531; Thu, 29 Aug 2013 13:47:56 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.168.136 with HTTP; Thu, 29 Aug 2013 13:47:56 -0700 (PDT) In-Reply-To: <521C5EC2.1060901@yandex.ru> References: <521C5EC2.1060901@yandex.ru> Date: Thu, 29 Aug 2013 13:47:56 -0700 X-Google-Sender-Auth: JQvbNg2aBkzW85Fsgxgquk6zpiY Message-ID: Subject: Re: devel/jenkins port not starting. Kernel panic in IPv6 multicast code From: Craig Rodrigues To: "Andrey V. Elsukov" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-net@freebsd.org, bms@freebsd.org, lwhsu@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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, 29 Aug 2013 20:48:00 -0000 On Tue, Aug 27, 2013 at 1:09 AM, Andrey V. Elsukov wrote= : > On 27.08.2013 01:07, Craig Rodrigues wrote: > > Hi, > > > > On box 2, since I this is a debug kernel with WITNESS and INVARIANTS > > enabled, I get a kernel panic. (see attached core.txt.gz) > > It seems the log was stripped by maillist. > > > The panic occurs here on line 1779: > > > > 1768 static struct ifnet * > > 1769 in6p_lookup_mcast_ifp(const struct inpcb *in6p, > > 1770 const struct sockaddr_in6 *gsin6) > > 1771 { > > 1772 struct route_in6 ro6; > > 1773 struct ifnet *ifp; > > 1774 > > 1775 KASSERT(in6p->inp_vflag & INP_IPV6, > > 1776 ("%s: not INP_IPV6 inpcb", __func__)); > > 1777 KASSERT(gsin6->sin6_family =3D=3D AF_INET6, > > 1778 ("%s: not AF_INET6 group", __func__)); > > 1779 KASSERT(IN6_IS_ADDR_MULTICAST(&gsin6->sin6_addr), > > 1780 ("%s: not multicast", __func__)); > > > > If I look at gsin6->sin6_addr inside kgdb, > > I see: > > > > (kgdb) p gsin6->sin6_addr > > $1 =3D {__u6_addr =3D {__u6_addr8 =3D > > "\000\000\000\000\000\000\000\000\000\000=EF=BF=BD=EF=BF=BD=EF=BF=BDM|= =EF=BF=BD", __u6_addr16 =3D {0, 0, 0, > > 0, 0, 65535, 19951, 54652}, __u6_addr32 =3D {0, 0, > > 4294901760, 3581693423}}} > > > > > > I am not so familiar with this part of the networking code. > > Can someone recommend where is the best place to fix > > this would be? > > AFAIR, I already saw similar report here. > This is V4 mapped IPv6 address ::ffff:239.77.124.213. > I guess application is trying to use setsockopt with IPV6_JOIN_GROUP > option. And since outgoing interface isn't specified, the kernel is > trying to determine it from routing table. But this mapped address > triggers assert in in6p_lookup_mcast_ifp() function. It seems to me, > that v4mapped addresses isn't supported in the multicast code. If you > remove KASSERT from in6p_lookup_mcast_ifp(), this address will be > treated as invalid later. > > -- > WBR, Andrey V. Elsukov > > Andrey, Thanks for the analysis. It looks like the mailing list is dropping my attachments, so I uploaded my log files here: http://people.freebsd.org/~rodrigc/jenkins-problem/ I don't understand where to go about fixing the problem. Should we fix the FreeBSD kernel to not panic in this case, by changing the KASSERT to an error? Does the Jenkins source code need to change? Is there a way I can configure my system not to trigger this error? I am not using IPv6 in my network. Thanks -- Craig