From owner-freebsd-net@freebsd.org Mon Oct 15 05:45:57 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7708710CFCBE; Mon, 15 Oct 2018 05:45:57 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E45EA84BE1; Mon, 15 Oct 2018 05:45:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg1-x530.google.com with SMTP id f8-v6so8609002pgq.5; Sun, 14 Oct 2018 22:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Eqq6nsTLunSSApZbvv+6mPN/KahW26M/JboTRJrdQAI=; b=Ekg9VHva06Cb3XETH+1be2rYUxm0lZSnW0bS9r85jEPq+5I0vTCvytuTOdxbRj2zel D7nVCSPHbw+S6OdfJ9h7347immODALt1slAKE1PWSNERfhDXxCMqxceru24PS7OP3+7J 6FcXPFBm2JT3Ru1O2vxLWagt6kfd3NToxN+48vOM5mnNn8BsSO7F3TmcEbNudLMEwtI0 5YQkwHRS6S7g31FkNJGOwc96DwemfeEx3z2B3D0SNJyC909Mv60FunJAgdyl7biHxTRD OSFAaRcLpwTa0PS8snJCsuj5kSjnEXF2e0TruRRjZe7NAfNI0nLBpzOVqcBt+vHxG7sn gCIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=Eqq6nsTLunSSApZbvv+6mPN/KahW26M/JboTRJrdQAI=; b=HwWqDtQ5YeIiPYAT6CqylcuxOr6SOlFuZGVpuDDvlUjntw9cz4/m7EXCPmnmiAe9CN DBkmsr05Cw2GXi57/9UUxJceTiCAM34CSEYTxpB14L85eUdyMX/T5DSxKbeQc7xXz9z6 yKcHSbvdEo612apEv3G2NnYpg0v0++vsIBhbpbRFiQ8mOT7VnPjETSXeRYna0aIrqYTd 0H+YicNpCdGGt6pLN7K9kPGGaq+h8TyqX53OmlRinB7GvF4zEZxN1NwntgI0vhBmJqGU cNgHgKawXpZlaOHdnbDdfKNll2GwUKGcBJZPUcwcgRNl3/uPLkyqu0maGXQ9DnsahMgR tgiA== X-Gm-Message-State: ABuFfohwCQqmm1mQ8k00ivsFPe5BgjWactB0yhNA4ehPB2xpFjHDGjp+ keGGN7wujoPtQB3EHsvix3+WbaFN X-Google-Smtp-Source: ACcGV6291cFdGXzsg84OQrabyirsWbUgglw6zJR2fYDDEtRZygxULAcSTRaHI5rJN5tgM8eml+5Uqg== X-Received: by 2002:a62:ff09:: with SMTP id b9-v6mr16112988pfn.46.1539582355589; Sun, 14 Oct 2018 22:45:55 -0700 (PDT) Received: from [192.168.20.7] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e22-v6sm10105073pfi.61.2018.10.14.22.45.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Oct 2018 22:45:55 -0700 (PDT) From: "Enji Cooper (yaneurabeya)" Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_DDF01C05-878C-4113-944A-9FD3FB199198"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Relatively deterministic panic with sendfile(2) when running tests in the sxlock code Date: Sun, 14 Oct 2018 22:45:53 -0700 In-Reply-To: Cc: FreeBSD Current , freebsd-net , Jonathan Looney To: Gleb Smirnoff References: <20181015022518.GV1044@FreeBSD.org> <1B58488D-8615-40E8-9115-E26496A6DBCE@gmail.com> X-Mailer: Apple Mail (2.3445.9.1) X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2018 05:45:57 -0000 --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) = 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 = : > 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--