From owner-freebsd-net@freebsd.org Fri Jan 27 04:16:00 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 01482CC3F95 for ; Fri, 27 Jan 2017 04:16:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id E0C541EFC for ; Fri, 27 Jan 2017 04:15:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id E0296CC3F94; Fri, 27 Jan 2017 04:15:59 +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 DFD01CC3F93 for ; Fri, 27 Jan 2017 04:15:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E3DA1EFB; Fri, 27 Jan 2017 04:15:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v0R4FvQ4032515 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 26 Jan 2017 20:15:58 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v0R4FvYl032514; Thu, 26 Jan 2017 20:15:57 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 26 Jan 2017 20:15:57 -0800 From: Gleb Smirnoff To: Mark Johnston 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: <20170127041557.GN2611@FreeBSD.org> References: <20170127005251.GM2611@FreeBSD.org> <20170127014117.GA90480@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170127014117.GA90480@raichu> 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 04:16:00 -0000 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? 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. -- Totus tuus, Glebius.