# RE: \[PATCH 5/7\] librdmacm/rspreload: Do not block connect when supporting fork

- From: Sridhar Samudrala \<hidden\>
- Date: 2012-08-21 17:43:42 
- List: linux-rdma
- Page: https://ratatoskr.run/linux-rdma/2012/08/15419018
- Thread: https://ratatoskr.run/linux-rdma/2012/08/15419018/t.md

```text
On Mon, 2012-08-20 at 20:22 +0000, Hefty, Sean wrote:
> > I just updated the repository and noticed that we are falling back to
> > normal sockets even with preload.
> > After some debugging, found a couple of issuse. See inline.
> 
> Thanks for the report.
> 
> I've pushed a patch to the repository to address those issues, along with one other problem that I was able to hit.  If the connection is nonblocking, then fork_active() can be called before the connection has completed, which can result in getpeername() failing.
> 
> I'm still not able to reproduce the hang that you were seeing, but I can reproduce the problem where the throughput strongly favors the first process to connect over a second process.  I'm looking into that.

I am seeing another hang with 2 clients doing bi-directional traffic to a server.
I am consistently seeing this hang with the attached test programs.

You can start the server using
  tcp_server -d -e

and run 2 clients
  tcp_client -h <server-ip> -n 10000 -d -e

Can you try it out with your IB setup? If you don't see this hang, then it is possible
that the issues i am seeing are RoCE specific.

Thanks
Sridhar
```

## Attachments

- [tcp\_client.c](https://ratatoskr.run/linux-rdma/2012/08/15419018/attachment/0) (text/x-csrc, 3821 bytes)
- [tcp\_server.c](https://ratatoskr.run/linux-rdma/2012/08/15419018/attachment/1) (text/x-csrc, 3862 bytes)
