From owner-freebsd-net@freebsd.org Fri Jan 27 06:10:38 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53D2CCC39E7 for ; Fri, 27 Jan 2017 06:10:38 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 305711D4 for ; Fri, 27 Jan 2017 06:10:38 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 2CEA7CC39E6; Fri, 27 Jan 2017 06:10:38 +0000 (UTC) Delivered-To: net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AD55CC39E5 for ; Fri, 27 Jan 2017 06:10:38 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt0-x241.google.com (mail-qt0-x241.google.com [IPv6:2607:f8b0:400d:c0d::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CCA451D3; Fri, 27 Jan 2017 06:10:37 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt0-x241.google.com with SMTP id h53so7425255qth.3; Thu, 26 Jan 2017 22:10:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Dz95wd4hbrU86nWPZIy1+sPyp5ZclYlMC76VNRZawjk=; b=HK9bT7lE+tJTQABwq8fcwM1doJVqGxW/9jk6c9UfvrwueaP57HcCT2HjvJzivVTWQi CkPBc2NqtUM0u2cEpTpt/NcThy/02uEEPRF54wSvx4f19luvJx8d5cl9BuRYFVqKNHnV sEY3nV58EODt6p3947TkBqsmj6wHx2wd+aK/gjLwClA9R8OFsCXI/wFwEAbplbvGReUE 3+jvFgXsj80CeeKwDWfHFlKPyHg9ZK9PIuaAs8r/h2cEt+iETzoKem2ab3+++U4hdrwR yFJkc1Jg54CmeVlVq8jpJVboIK8NP9T3rnJ+es+oPWhR3FU3TrjSMeumTUtlorPMaiaw WvYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Dz95wd4hbrU86nWPZIy1+sPyp5ZclYlMC76VNRZawjk=; b=i+F/gVugzjAe9PEmlFd39RvnKtLt0q8HaUdFPvKWkqXiMSgJevLhu1VumoiNIhGZXl RnDTHgX8EuFyYUHrfYHsDjfs0gTgRsdrzpx7fhfeC4xcg8cfTjJoqmfSMcXZn/ZoYQwd xRyTrFsbZNEO3WmBJ+vlRRkHXE2m3M7FPg0sfFv2AgCcAfKNV2TKhd0us0Ox/oVcatUO bqP+dhWGsj9nIZGkI5fGSmu6NcLMN6pZyez8RgKP/lOKv3wlA6B1SwFSs1p2rDsfYYfq ld7b/DU3ZO2eMuwsR5f1QQ8MB1Z8lEK0YtXlUVo2ePXBxyTNa5y04Hz7gA4/55kZ5QVM 6JwQ== X-Gm-Message-State: AIkVDXJh/MFP2uQNWc6VOsvDWT2I/kwQNufmbouIa/I0KQAxVgZDRHlE1++VK+P46DpErQ== X-Received: by 10.55.148.133 with SMTP id w127mr7114326qkd.217.1485497436434; Thu, 26 Jan 2017 22:10:36 -0800 (PST) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id h33sm3301156qtc.42.2017.01.26.22.10.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jan 2017 22:10:35 -0800 (PST) Sender: Mark Johnston Date: Thu, 26 Jan 2017 22:16:13 -0800 From: Mark Johnston To: Gleb Smirnoff Cc: jch@FreeBSD.org, hiren@FreeBSD.org, Jason Eggleston , rrs@FreeBSD.org, jtl@FreeBSD.org, net@FreeBSD.org Subject: Re: listening sockets as non sockets Message-ID: <20170127061613.GA61354@wkstn-mjohnston.west.isilon.com> References: <20170127005251.GM2611@FreeBSD.org> <20170127014117.GA90480@raichu> <20170127041557.GN2611@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170127041557.GN2611@FreeBSD.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2017 06:10:38 -0000 On Thu, Jan 26, 2017 at 08:15:57PM -0800, Gleb Smirnoff wrote: > On Thu, Jan 26, 2017 at 05:41:17PM -0800, Mark Johnston wrote: > M> > It passes regression tests from tools/regression/sockets and tests/sys, > M> > including the race tests, and including accept filter ones. > M> > M> I haven't yet looked much at the diff, so sorry in advance if this > M> question is inappropriate. > M> > M> One problem I've fought a couple of times (with Infiniband SDP and unix > M> sockets) is a race between accept(2) and a concurrent close of the > M> listening socket. Right now, this problem has to be handled in the > M> domain-specific code (see r303855 for instance), and it's generally > M> awkward to do so. Does your work address this intrinsic race in any way? > M> > M> FWIW, I have a basic test case for unix sockets here, though I believe > M> it's been incorporated into stress2: > M> https://people.freebsd.org/~markj/unix_socket_detach.c > > This is strees2/misc/unix_socket_detach.sh, isn't it? Yep. unix_socket_detach2.sh too. > My patch survived > running it during night. I have also looked at r303855 and its code isn't > touched by my patch. I will look further if the problem can be solved > in general at socket layer. Thanks for point. Thanks for looking!