devel/jenkins port not starting. Kernel panic in IPv6 multicast code

Craig Rodrigues rodrigc at FreeBSD.org
Thu Aug 29 20:48:00 UTC 2013


On Tue, Aug 27, 2013 at 1:09 AM, Andrey V. Elsukov <bu7cher at yandex.ru>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 == 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 = {__u6_addr = {__u6_addr8 =
> > "\000\000\000\000\000\000\000\000\000\000���M|�", __u6_addr16 = {0, 0, 0,
> > 0, 0, 65535, 19951, 54652}, __u6_addr32 = {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


More information about the freebsd-net mailing list