[zeromq-dev] Water marks/pipe/activate_write problem

Victor Luchitz vluchits at gmail.com
Wed May 7 11:44:43 CEST 2014


Minimal test case:

Pusher - http://pastebin.com/dcYKdhzM

Puller - http://pastebin.com/Nzy4HGTx

I have also modified zeromq to print an alert message upon receiving
activate_write command in object.hpp and also to print peers_msgs_read
in zmq::pipe_t::check_write(). It seems that the activate_write command
goes to an I/O thread on the puller and not transmitted to the pusher since
the alert is never triggered on the pusher and peers_msgs_read is always 0
on the pusher as well.

Best regards,
Victor


2014-05-06 20:46 GMT+04:00 Victor Luchitz <vluchits at gmail.com>:

> Hi Pieter,
>
> will try to. I must note that this is a networking application and thus I
> should have seen the activate_write being communicated in the tcpdump
> output but I didn't.
>
> The test_hwm test app seems to be working ok though, but it uses inproc://
> sockets..
>
> Regards,
> Victor
>
>
> 2014-05-06 20:19 GMT+04:00 Pieter Hintjens <ph at imatix.com>:
>
> Hi Victor,
>>
>> Can you reproduce this with a minimal test case?
>>
>> -Pieter
>>
>> On Tue, May 6, 2014 at 5:56 PM, Victor Luchitz <vluchits at gmail.com>
>> wrote:
>> > Hello,
>> >
>> > I've been trying to build semi-reliable messaging infrastructure around
>> ZMQ
>> > 4.0.3 and mostly got everything working except for a few things.
>> >
>> > I'm currently using PUSH/PULL model to pass messages between client
>> (PUSH)
>> > and server(PULL) in non-blocking fashion.
>> >
>> > The weird behavior that I'm observing is that in my case the PUSH socket
>> > never receives the command_t::activate_write command from the other end
>> of
>> > the pipe. The low water mark is set on the PULL socket and I _do_ see
>> the
>> > code path in pipe.cpp being triggered:
>> >
>> > send_activate_write (peer, msgs_read);
>> >
>> > on the server. However, it seems that the command goes elsewhere
>> locally.
>> > That in turns leads us to peers_msgs_read equalling to 0 in
>> > zmq::pipe_t::check_write() on the PUSH side and eventually reaching the
>> HWM
>> > even though the messages are properly communicated to the other end of
>> the
>> > pipe. That in turns causes messages to be dropped and/or ZMQ reserving
>> > excessive amounts of RAM.
>> >
>> > Sorry if it all seems so confusing but that's the best explanation I can
>> > come up with at the moment.
>> >
>> > --
>> > Best regards,
>> >  Victor Luchitz
>> >
>> > _______________________________________________
>> > zeromq-dev mailing list
>> > zeromq-dev at lists.zeromq.org
>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> >
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
>
>
> --
> Best regards,
>  Victor Luchitz
>



-- 
Best regards,
 Victor Luchitz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140507/0d011dd9/attachment.htm>


More information about the zeromq-dev mailing list