[zeromq-dev] Using libsdp and zeromq

Paul Colomiets paul at colomiets.name
Mon Aug 27 22:21:38 CEST 2012


On Mon, Aug 27, 2012 at 4:28 PM, Michael Rissi
<michael.rissi at dectris.com> wrote:
> Hello zeromq devs!
>
> I tried to use zeromq with preloaded libsdp over infiniband. This
> unfortunately fails. The reason for it is the
> SOCK_CLOEXEC flag set in ip.cpp. Libsdp checks the socket type to be exactly
> SOCK_STREAM. If
> it is not the case (as in zeromq, where the socket type is type =
> SOCK_STREAM | SOCK_CLOEXEC),
> it will fall back to use TCP/IP. This can be found in line 681 of port.c in
> the libsdp library (download under
> http://www.openfabrics.org/downloads/libsdp/ )
>
> Being clever in zeromq and unsetting HAVE_SOCK_CLOEXEC will not help, as the
> zeromq server will
> crash sooner or later when exiting a client.
>

Nothing will crash. It will leak socket if you will run "exec" call or
fork then exec. Which is usually avoidable in zeromq apps. To remove
memory leak you can use one of the techniques, described here:

http://stackoverflow.com/questions/899038/getting-the-highest-allocated-file-descriptor


-- 
Paul



More information about the zeromq-dev mailing list