listening sockets as non sockets
Mark Johnston
markj at FreeBSD.org
Fri Jan 27 06:10:38 UTC 2017
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!
More information about the freebsd-net
mailing list