[zeromq-dev] Can't get ZMQ_REQ_RELAXED to run

Björn Kuhlbrodt bjoern.kuhlbrodt at gpsolar.com
Tue Nov 19 14:49:49 CET 2013

Hi Christian

Well, it's stuck in zmq::mailbox_t::recv {int rc = signaler.wait (timeout_);}. Note that this is the first message of a newly created socket I'trying to queue. The architecture is a bit more complex, see my reply to Pieters mail.
Ah, also note that the send fail only in about 90% of the times I start the application. In the other 10% it runs just fine. Also note that everything is fine once I set ZMQ_REQ_RELAXED to false.

I also tried to make a minimal version that I could post, but the minimal version works of course...

Best regards 

	libzmq.dll!zmq::signaler_t::wait(int timeout_)  Line 213	C++
>	libzmq.dll!zmq::mailbox_t::recv(zmq::command_t * cmd_, int timeout_)  Line 72 + 0xb bytes	C++
 	libzmq.dll!zmq::socket_base_t::process_commands(int timeout_, bool throttle_)  Line 901	C++
 	libzmq.dll!zmq::socket_base_t::send(zmq::msg_t * msg_, int flags_)  Line 722 + 0xd bytes	C++
 	libzmq.dll!zmq_msg_send(zmq_msg_t * msg_, void * s_, int flags_)  Line 593 + 0x1b bytes	C++

-----Original Message-----
From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Christian Kamm
Sent: Dienstag, 19. November 2013 06:11
To: ZeroMQ development list
Subject: Re: [zeromq-dev] Can't get ZMQ_REQ_RELAXED to run

A stack trace of the process when zmq_msg_send() blocks could already be telling. It sounds like it's getting stuck in either pipe::terminate() or dealer::xrecv()...


Pieter Hintjens <ph at imatix.com> wrote:

>Hi Björn,
>The best thing when it comes to specific functionalities like this is a 
>minimal test case that shows the problem.
>On Mon, Nov 18, 2013 at 9:09 AM, Björn Kuhlbrodt 
><bjoern.kuhlbrodt at gpsolar.com> wrote:
>> Hello
>> I' trying to use the new (4.0.1) ZMQ_REQ_RELAXED in C++ with VS2010 (and the standard C-Binding from the 0MQ main site), but keep failing.
>> What I have:
>> One context with two ZMQ_REQ sockets in two different threads, one binds and answers to REQs, one connects and sends REQs. This runs fine and nice until one system crashes before answering a REQ - a known Problem of the REQ-REP.
>> What I tried:
>> I'm not too eager to kill the context to get the REQ-REP running again, because that would kill my other socket too. The new ZMQ_REQ_RELAXED came in very handy, just fit to solve the problem.
>> BUT:
>> Now the zmq_msg_send(...)-Method fails to return after a few packages (or even for the first packet) while the client is up and waiting for packages, yes even actively communicating with the server over the other socket. I tried ZMQ_REQ_CORRELATE on and off - doesn't make a change. Tried ZMQ_REQ_RELAXED off again - everything works (except in crash-case).
>> So my question:
>> Anyone here tried the ZMQ_REQ_RELAXED? Any idea? I'm willing to post code, but I'd need to extract the crucial parts, which could take a while.
>> Regards
>> Bjorn
>> Dr. Björn Kuhlbrodt
>> Senior Software Developer
>> GP Inspect GmbH
>> Tel: +49 89 750778 4729
>> Fax: +49 89 750778 4710
>> Mail: bjoern.kuhlbrodt at gpsolar.com
>> GP Inspect GmbH | Hainbuchenring 9-11 | 82061 Neuried | Deutschland 
>> Geschäftsführer | Christian Probst, Dr. Eric Rüland, Enis Ersü, 
>> Martin Heinrich Amtsgericht München | HRB 173887
>> A company of ISRA VISION Group
>> ---------------------------------------------------------------------
>> --------------------------------- This e-mail may contain material 
>> that is confidential, privileged and for the sole use of the intended 
>> recipient. Any review, reliance or distribution by others or 
>> forwarding without express permission is strictly prohibited. If you 
>> are not the intended recipient, please contact the sender and delete 
>> all copies. GP Inspect GmbH, ISRA VISION AG, its branches and subsidiaries herewith exclude any liability for third-party information recognizably contained in this email or its attachments. Third-party information does not necessarily reflect the opinion of GP Inspect GmbH or ISRA VISION AG.
>> ---------------------------------------------------------------------
>> ---------------------------------
>> ---------------------------------------------------------------------
>> --------------------------------- 
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>Pieter Hintjens
>CEO of iMatix.com
>Founder of ZeroMQ community
>blog: http://hintjens.com
>zeromq-dev mailing list
>zeromq-dev at lists.zeromq.org
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org

More information about the zeromq-dev mailing list