[zeromq-dev] assertion failure with master

Chuck Remes cremes.devlist at mac.com
Mon Nov 8 06:21:20 CET 2010


On Nov 7, 2010, at 11:14 PM, Chuck Remes wrote:

> I was running a program that allocated a couple of hundred REQ sockets to connect to a server with a single REP socket via a QUEUE device.
> 
> I noticed that when I allocated >64 sockets I started getting an assertion failure.
> 
>  Assertion failed: nbytes == sizeof (command_t)  (mailbox.cpp:193)
> 
> I examined the code and saw a comment explaining how this should *never* happen since the command size was already confirmed as being less than the PIPE_BUF. However, I noted a reference to SNDBUF higher up in that same function. I'm wondering if I am exhausting a system resource (SNDBUF in this case) by allocating so many sockets.
> 
> BTW, this shell has a very high file descriptor limit (25k) so I know I haven't hit that particular limit.
> 
> I can show the code but it's ruby and I know that gives some folks hives. :)
> 
> Just imagine a loop that allocates several hundred or several thousand REQ sockets that are all connecting to the same QUEUE device endpoint.

FYI, running this same code against 2.0.10 results in a hang.

cr




More information about the zeromq-dev mailing list