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

Chuck Remes cremes.devlist at mac.com
Wed Aug 10 19:18:28 CEST 2011


On Aug 10, 2011, at 12:12 PM, Ross Andrews wrote:

> I'm not sure if this is a Windows problem, a Lua problem, a ZeroMQ problem, or a my-code problem, but after about three weeks I am finally able to reproduce it in a small example so here goes.
> 
> [snip]
> The idea is that I have a client that accepts requests, spawns threads (or maybe uses a thread pool, either way I can't control it) to handle them. "Handling them" consists of creating a REQ socket, sending a request to another (single-threaded) thing to handle them and give a response back, and then returning the response. I have to make a new socket each time because I can't control which thread the requesting thing is on, and I can't share ZMQ sockets across threads.
> 
> The problem is that this case thrashes and then eventually kills lua-zmq. It should handle 500 messages here, actually it dies at an indeterminate point between about 100 and about 400.
> 
> Can anyone give me a clue what's going on?

Please provide a little more information.

1. Which program dies? The client, the server or both?

2. What is the error printed when they exit? Is it a 0mq assertion or a lua error? (Please include the exact error message.)

3. What version of 0mq is in use?

4. Can you reproduce the problem on linux or osx?


BTW, you *can* share 0mq sockets amongst threads as long as only 1 thread is using a socket at any given time. So, for example, you could have a socket pool where each thread "checks out" a socket from the pool, uses it, and then checks it back in again.

cr





More information about the zeromq-dev mailing list