[zeromq-dev] Deadlock between REQ/REP sockets?

Martin Sustrik sustrik at 250bpm.com
Tue Jun 1 15:14:10 CEST 2010


> Correct. For an update, the attachment process seems to be working much 
> better with the P2P socket thread disabled (pthread_create() commented 
> out). Perhaps the IPC message handler was not getting CPU time to 
> process the message somehow and was only swapped in once the client 
> quit. I am now finding seg faults coming from zmq_engine.cpp, line 119 
> according to GDB. Currently investigating this.

Great, please do report your findings (back traces to the degfault if 

As for you scenario, switch to 0mq trunk version and use zmq_queue 
device as the hub. You'll initialise it using an XML configuration file. 
Something like this:

         <bind addr = "tcp://eth0:5555"/>
         <bind addr = "tcp://eth0:5556"/>

Then use REQ socket in the client. Connect it to the zmq_queue's "in" 
endpoint (port 5555).

Use REP socket in the server. Connect it to the zmq_queue's "out" 
endpoint (port 5556).

That way you won't need P2P sockets at all.


More information about the zeromq-dev mailing list