[zeromq-dev] Dealer socket pkts are not drained by I/O thread

Osiris Pedroso opedroso at gmail.com
Tue Nov 16 17:22:06 CET 2021


Hi Siva,

What Stephane meant was to write some code that shows the issue you are
experiencing.

Yes, it's more work, but it would speed up wonders how fast you get a
solution for your issue.

Best regards,
Osiris

On Tue, Nov 16, 2021, 10:14 donthamsetty sivaprasad via zeromq-dev <
zeromq-dev at lists.zeromq.org> wrote:

>
> Stephane .
> Thanks for the response.
> To simplify the question ,
> If more than 8192(output_batch_size) bytes is lying in the dealer socket
> pipe , will the I/O thread get more than one notification to drain the
> pipe.?  My understanding  sender will not notify the I/O thread unless pipe
> is completely drained.
>
> Please correct me if i am wrong .
>
> Thanks
> Siva
> On Tuesday, November 16, 2021, 02:35:37 PM GMT+5:30, Stephane Vales <
> vales at ingenuity.io> wrote:
>
>
> Hello Siva,
>
> Rather than pointing the code by itself, maybe it would be better if you
> could write some minimal examples testing your assumptions. Then, if they
> are confirmed, you could use them to expose problems in this list or to
> create issues on github.
>
> Cheers.
>
>
> Stéphane.
>
>
> Le 16 nov. 2021 à 07:51, donthamsetty sivaprasad via zeromq-dev <
> zeromq-dev at lists.zeromq.org> a écrit :
>
> Hi ,
> The stream engine ( ZMQ dealer=>ZMQ dealer using TCP connection) in the
> I/O thread at a time reads at most 8172 from the below code. But the writer
> sends the notification to the I/O thread only if it completely drains the
> queue in ypie.hpp: flush() based on the compare and swap _c_ptr .
>
> src/config.hpp:    out_batch_size = 8192,
> src/stream_engine.cpp:        while (_outsize < static_cast<size_t>
> (out_batch_size)) {
> src/stream_engine.cpp:            size_t n = _encoder->encode (&bufptr,
> out_batch_size - _outsi
>
>
> Could you please confirm if this is a real problem ? If more than 8172
> bytes are lying in pipe and I?O threads drains only 8172 , How does writer
> sends read notification to I/O thread since it is not fully drained?
>
> Could you please answer this ?
>
> Thanks
> Siva
> On Sunday, November 14, 2021, 08:49:10 AM GMT+5:30, donthamsetty
> sivaprasad via zeromq-dev <zeromq-dev at lists.zeromq.org> wrote:
>
>
> The version used is zeromq 4.3.1
>
> Thanks in advance .
> Response is highly appreciated.
>
> Thanks
> Siva
>
> On Sunday, November 14, 2021, 08:42:00 AM GMT+5:30, donthamsetty
> sivaprasad via zeromq-dev <zeromq-dev at lists.zeromq.org> wrote:
>
>
> Hi ,
> The pipe_t between Dealer socket and I/O thread has been stuck in the
> sense that msgs are continuously written into the pipe but not drained. And
> the sender is not doing the flush because the compare and swap pointer is
> NOT null.
> I have gone through the code. After the sender has notified the I/O thread
> for read , I/O thread reads atmost output_batch_size(8072).. Please correct
> me if I am wrong . If the I/O thread does not fully drain the pipe for any
> reason , the sender will not notify again since sender depends on c_ptr
> (cas ptr) being NULL , which will not be set to NULL unless the I/O thread
> drains the pipe fully.
> Basically the case is sender is NOT nitifying the I/O thread sicne the
> c_ptr is not NULL at all and I/O thread is not reading because it will not
> get the notifcation ..The pipe is continuously filled and messages are not
> sent out to the ultimate destination due to this..
>
> OR
> The above situtation could be there is some race in multi core
> environment where compare and swap operation is not operating consistently
> . Our system is ARM v7 system .
>
> Please let me know if there are known problems.
>
> THanks
> Siva
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20211116/6e634e55/attachment.htm>


More information about the zeromq-dev mailing list