Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Apr 2006 10:34:56 +0000
From:      Dima Dorfman <dd@freebsd.org>
To:        current@freebsd.org
Subject:   CARP broken with IPv6
Message-ID:  <20060404103456.GA988@trit.org>

next in thread | raw e-mail | index | archive | help

--k+w/mQv8wyuph6w0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

CARP seems to be broken with IPv6 on today's -current. When an inet6
address is configured on a carp interface, it panics the first time it
tries to send an advertisement:

panic: _mtx_lock_sleep: recursed on non-recursive mutex carp_if @ ../../../=
netinet/ip_carp.c:1191

The traceback looks like this:

#14 0xc05c4a65 in carp_macmatch6 (v=3D0xc6a71500, m=3D0xc6646700, taddr=3D0=
xc6b3449c)
    at ../../../netinet/ip_carp.c:1191
#15 0xc060414c in nd6_na_output (ifp=3D0xc64c7000, daddr6_0=3D0xe4fabbc4,=
=20
    taddr6=3D0xc6b3449c, flags=3D32, tlladdr=3D1, sdl0=3D0x0)
    at ../../../netinet6/nd6_nbr.c:968
#16 0xc05c45dd in carp_send_na (sc=3D0xc69e9200)
    at ../../../netinet/ip_carp.c:1053
#17 0xc05c4e10 in carp_master_down_locked (sc=3D0xc69e9200)
    at ../../../netinet/ip_carp.c:1273
#18 0xc05c4d4b in carp_master_down (v=3D0xc69e9200)
    at ../../../netinet/ip_carp.c:1251
#19 0xc05370d9 in softclock (dummy=3D0x0) at ../../../kern/kern_timeout.c:2=
71

If I allow the mutex to recurse, the panic goes away (of course) but I
never see an advertisement being sent. CARP appears to work okay with
IPv4.

The cause of the panic is obvious, but I don't quite understand what
carp_macmatch6 is for. Should it be supported in this code path? If
so, I'll try to investigate further why advertisements aren't sent
even after the mutex is allowed to recurse.

I believe that the same issue exists in the 6-STABLE branch, but I
can't be sure. It does not appear to work there with inet6, but that
test was in a completely environment, so it might be a different
issue. Is this issue known on -current?

--k+w/mQv8wyuph6w0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----

iD8DBQFEMkvQBzAFW2n65YIRAvEVAJ0YSVOzWiOdbqWu/vi/bW3sNYAdcACggtaL
k605Detmyp+Vp7OyJTQU+q4=
=ORZD
-----END PGP SIGNATURE-----

--k+w/mQv8wyuph6w0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060404103456.GA988>