[zeromq-dev] Strange problem with lua-zmq on Windows

Ross Andrews ross.andrews at gmail.com
Wed Aug 10 22:45:05 CEST 2011


>
> Neither one; they don't exit. They just block forever after a while.
>
>
> When I see this with REQ/REP sockets, it usually means something got into a
> bad state. It isn't obvious to me from your example code how that would
> happen.
>
> Yeah, it looks like it's getting into a state where it's recv'ing forever,
even though there are messages waiting. The problem is in creating a bunch
of new sockets at once: if I create one socket and send 10k messages across
it works fine; if I create a new socket for each message (but close them
right after, so only one socket is ever open at a time) then it works (but
is slower).


>  3. What version of 0mq is in use?
>
> 2.0.10. I'm using the iamaleskey version of lua-zmq. Either of these can be
> upgraded if you think that's the problem (a new version of lua-zmq got
> announced this morning on the Lua list)
>
>
> Definitely upgrade. There have been dozens and dozens of bugs fixed since
> 2.0.10.
>
>
 Yeah, that's the next thing I'm going to try.

No, the guide is not saying the exact opposite. The guide is giving you a
> set of best practices which you should follow. It doesn't go into detail
> explaining how to use 0mq sockets safely between multiple threads because it
> is hard to get right and *usually* the need to do so indicates a design flaw
> (though it's not always a flaw).
>

Fair enough. :) I think I don't want to get into it though; I'm afraid I'm
not smart enough to get it right.

I'm very gratified that I can get it reproducing this without touching
threads though, because it means that the threaded code that I have in the
real client isn't the problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110810/b038a50e/attachment.htm>


More information about the zeromq-dev mailing list