Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Oct 2018 22:45:53 -0700
From:      "Enji Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>, freebsd-net <freebsd-net@freebsd.org>, Jonathan Looney <jonlooney@gmail.com>
Subject:   Re: Relatively deterministic panic with sendfile(2) when running tests in the sxlock code
Message-ID:  <BF780D4E-EF13-4E65-9230-4945BF7CCBD2@gmail.com>
In-Reply-To: <D5F7ABC3-89F1-48B9-94B0-067E3DE3F5B2@gmail.com>
References:  <CC816726-7B79-4643-82DD-7B4CF4A25F54@gmail.com> <20181015022518.GV1044@FreeBSD.org> <1B58488D-8615-40E8-9115-E26496A6DBCE@gmail.com> <BA546783-C2DA-4ED9-8391-8408A8B9145B@gmail.com> <D5F7ABC3-89F1-48B9-94B0-067E3DE3F5B2@gmail.com>

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

--Apple-Mail=_DDF01C05-878C-4113-944A-9FD3FB199198
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8


> On Oct 14, 2018, at 10:17 PM, Enji Cooper (yaneurabeya) =
<yaneurabeya@gmail.com> wrote:

...

> Oh yipes. I guess passing in a server socket (a bound and listening =
socket) instead of a client socket (connect=E2=80=99ed to a server =
socket) for `s` will result in a crash?
>=20
> =46rom =
https://github.com/ngie-eign/freebsd/blob/95b96470a3a0270c36c4e7fb5eedc150=
fe124fac/lib/libc/tests/sys/sendfile_test.c#L479 =
<https://github.com/ngie-eign/freebsd/blob/95b96470a3a0270c36c4e7fb5eedc15=
0fe124fac/lib/libc/tests/sys/sendfile_test.c#L479>:
> ATF_TC_BODY(s_negative_not_connected_socket, tc)
> {
> 	int client_sock, error, fd, port;
>=20
> 	port =3D XXX_TEST_PORT_BASE + __LINE__;
> 	client_sock =3D setup_tcp_server(XXX_TEST_DOMAIN, port);
>=20
> 	fd =3D open(SOURCE_FILE, O_CREAT|O_RDWR);
> 	ATF_REQUIRE_MSG(fd !=3D -1, "open failed: %s", strerror(errno));
>=20
> 	error =3D sendfile(fd, client_sock, 0, 0, NULL, NULL, =
SF_FLAGS(0, 0));
> 	ATF_REQUIRE_ERRNO(ENOTCONN, error =3D=3D -1);
>=20
> 	(void)close(fd);
> 	(void)close(client_sock);
> }
> Let me see if I can track this down..

	Can=E2=80=99t repro this on 11.2-RELEASE. Trying 11.2-STABLE.
Thanks!
-Enji


--Apple-Mail=_DDF01C05-878C-4113-944A-9FD3FB199198
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

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

iQIzBAEBCAAdFiEE5bk3FaGcY5rvqmb79YOpJmkwhhUFAlvEKZEACgkQ9YOpJmkw
hhVbTxAAlxankNLTD3kOifvUrX9E8AxVMbearhtMu9z+bhoiA1c1lhFyeOhBnehu
nbo46tdmc2VbXCzVTTTj8JW2UloAO/HmJOIPVL+07PhYzUgQKOKkPfCGQOf5pHBg
Iw1VbS2wyAkAgcSj0ZkHxzc7F0TN1xfVMcjfgvhVsGOiBUvXrCAKkmcgXBV/N7Yr
UPjS2bZaIPFHxM0Qt7+cnGm/M49KJMq0ZkH9LSpP18UssPSC5tlx+EdUz02P4FT9
YW3/Cmxohr+Nwdui9MM7LlOopRPeXO/3EQj8DD3jalGFsf4cB7PvDkaOj70p0Ukk
uIetUI5Cj+KZUC1mki6js7i/yi68Fx17bMbrt9BhFSwqJEzSOp9TKJ2E/bn+hKp3
8CYq8WIyka/I7Q3FRgTcWqXeEkyovIkdNMMmtH0DtPANWoyVIgkml0S+RuHLiVmG
fDbJHpiq99u0HeMwRrjRHW5Hto83x//jE1EBv8wDvXuq5SR5X29qQJEAAk+h83WS
Tij8rBYyPiyiFvfKLS0BcXPmi7nPl4hxOCKdGIKUeb1/Ry2vyrCABlt+raVB9i2o
2ylaZG1rfRfktq64K1DOFJY2DyqtkYAEnfsT7Bs+XKHWxKMWPufPCCqlHwQmll9y
+prr+QMRfjCVIvFEX1CboJo02Mk5+kDpsf5SRAjCBSsMH9KX6G0=
=ZcdX
-----END PGP SIGNATURE-----

--Apple-Mail=_DDF01C05-878C-4113-944A-9FD3FB199198--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BF780D4E-EF13-4E65-9230-4945BF7CCBD2>