Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Sep 2018 11:17:04 +0300
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        freebsd-current@FreeBSD.org, "Bjoern A. Zeeb" <bz@FreeBSD.org>, karels@FreeBSD.org, Matt Macy <mmacy@FreeBSD.org>, rstone@freebsd.org
Subject:   Re: udp6: Page fault panics
Message-ID:  <ab9a81ec-320e-6446-375d-3a3df3adac6c@yandex.ru>
In-Reply-To: <20180916000455.isqioezu6oovhjzg@ler-imac.local>
References:  <20180916000455.isqioezu6oovhjzg@ler-imac.local>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--p3mMtZH4M5KQgdvfcSJzhob0ntgxYDaJ3
Content-Type: multipart/mixed; boundary="IPqMzjFczEhRHEmhJeYZ1EoyHUOziB9PK";
 protected-headers="v1"
From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: freebsd-current@FreeBSD.org, "Bjoern A. Zeeb" <bz@FreeBSD.org>,
 karels@FreeBSD.org, Matt Macy <mmacy@FreeBSD.org>, rstone@freebsd.org
Message-ID: <ab9a81ec-320e-6446-375d-3a3df3adac6c@yandex.ru>
Subject: Re: udp6: Page fault panics
References: <20180916000455.isqioezu6oovhjzg@ler-imac.local>
In-Reply-To: <20180916000455.isqioezu6oovhjzg@ler-imac.local>

--IPqMzjFczEhRHEmhJeYZ1EoyHUOziB9PK
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

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 =3D 0xffffffff80631428, rsp =3D 0xfffffe00ca17c440, r=
bp =3D 0xfffffe00ca17c480 ---
> selectroute() at selectroute+0x198/frame 0xfffffe00ca17c480
> in6_selectroute_fib() at in6_selectroute_fib+0xf/frame 0xfffffe00ca17c4=
a0
> 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 allocat=
e
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 !=3D AF_INET6 ||=

739			     !IN6_ARE_ADDR_EQUAL(&satosin6(&ro->ro_dst)->sin6_addr,
740			     dst))) {

> calltrap() at calltrap+0x8/frame 0xfffffe00c9d863e0
> --- trap 0xc, rip =3D 0xffffffff80636b2b, rsp =3D 0xfffffe00c9d864b0, r=
bp =3D 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 =3D AF_INET6;
529			RT_VALIDATE((struct route *)ro, &inp->inp_rt_cookie, fibnum);
530		}
531		if (ro->ro_rt && fwd_tag =3D=3D NULL && (ro->ro_rt->rt_flags & RTF_U=
P) &&
532		    ro->ro_dst.sin6_family =3D=3D AF_INET6 &&
533		    IN6_ARE_ADDR_EQUAL(&ro->ro_dst.sin6_addr, &ip6->ip6_dst)) {
534			rt =3D ro->ro_rt;
535			ifp =3D 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 happen=
s.
https://lists.freebsd.org/pipermail/freebsd-net/2018-September/051563.htm=
l

But IPv6 path also needs similar patch.

--=20
WBR, Andrey V. Elsukov


--IPqMzjFczEhRHEmhJeYZ1EoyHUOziB9PK--

--p3mMtZH4M5KQgdvfcSJzhob0ntgxYDaJ3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlufYwAACgkQAcXqBBDI
oXqjqQf6A1DsifgYufCZ3bT3UAqCzqShY5ZxFYVtAiBZ694c7p5MfWvz4W1+QYfW
CRFRTuBzsqNazwhJNIfMRuuz51Wg8qpYtGd0F9LepLQiKwpAbL+Z4jQ4xVwiS2n/
qPuTmXwdW6kaC5sN8yibCheKI8Lc/Sz3tmK6rk4TkKtrCVhkiC0QfiR/GCDaOuM0
Qh4FSGyBxsOU+G2MDHsbSxGveljqWjCK6gpcPB7wTh+iRpbP9JuZA4WHxHiKbk2y
sjQuoHwzZie6c2zebPCcb48fQ8gxk83kdhCoJXP1a0Z85OjhIhJbQVdOdiW2RWNk
rWAXrh96UBlYZbHS0bVtcM4JsMon1g==
=hL6Z
-----END PGP SIGNATURE-----

--p3mMtZH4M5KQgdvfcSJzhob0ntgxYDaJ3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ab9a81ec-320e-6446-375d-3a3df3adac6c>