Re: [zeromq-dev] CZMQ: zloop_poller terminates the function handler
Hello, Please ignore my previous message. That was due to a bug in the design and has nothing to do with the CZMQ library. Regards, Shrikanth On Tue, Jan 17, 2017 at 4:58 PM, Shrikanth M.D.wrote: > Hello, > > I think I fixed the issue. It was due to invoking zstr_free inside the > handler without passing the address of the pointer. > zstr_free(msg) --> Lead to termination of poller > zstr_free() --> Fixed the issue .i.e. event handler is not being > terminated anymore. I guess any error inside the handler leads to poller > termination as per CZMQ implementation. > > Nevertheless, I have another query regarding timers. > Timer expired for 400 > Timer expired for 200 > Timer expired for 100 > Timer expired for 300 > Timer expired for 400 > > Numbers that you see above are some object IDs. Each timer for each object > ID expires after a time interval of 15000 ms. > As per the scenario that I am trying to design when the poller socket has > an event (some message), I cancel the timer of these objects. > > I see that the timer cancellation with zloop_timer_end --> leads to > handler termination. > Below is the code snippet. > [image: Inline image 1] > > > I see my program exits when I cancel some timers upon receving the message > on the poller socket. > Is it that I should wait until a particular timer_id expires and its > handle is triggered so that the timer could be cancelled from within the > handler? > > Please suggest. > > thanks & regards, > Shrikanth > > > > On Tue, Jan 17, 2017 at 11:42 AM, Luca Boccassi > wrote: > >> On Tue, 2017-01-17 at 00:42 +0100, Shrikanth M.D. wrote: >> > Hello All, >> > >> > I have a zloop_poller invoked as below: >> > zloop_poller (loop, , s_netconf_socket_event,inter_thread_pair); >> > >> > >> > I see that while executing the function handles, >> s_netconf_socket_event, my >> > program terminates. >> > I have added debugs and see no obvious issues with my program. >> > >> > Is there any explicit cause due to which czmq would end the handler by >> > itself? >> > >> > Regards, >> > Shrikanth >> >> Can you provide a code snippet that reproduces the case? >> >> ___ >> zeromq-dev mailing list >> zeromq-dev@lists.zeromq.org >> https://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org https://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] CZMQ: zloop_poller terminates the function handler
Hello, I think I fixed the issue. It was due to invoking zstr_free inside the handler without passing the address of the pointer. zstr_free(msg) --> Lead to termination of poller zstr_free() --> Fixed the issue .i.e. event handler is not being terminated anymore. I guess any error inside the handler leads to poller termination as per CZMQ implementation. Nevertheless, I have another query regarding timers. Timer expired for 400 Timer expired for 200 Timer expired for 100 Timer expired for 300 Timer expired for 400 Numbers that you see above are some object IDs. Each timer for each object ID expires after a time interval of 15000 ms. As per the scenario that I am trying to design when the poller socket has an event (some message), I cancel the timer of these objects. I see that the timer cancellation with zloop_timer_end --> leads to handler termination. Below is the code snippet. [image: Inline image 1] I see my program exits when I cancel some timers upon receving the message on the poller socket. Is it that I should wait until a particular timer_id expires and its handle is triggered so that the timer could be cancelled from within the handler? Please suggest. thanks & regards, Shrikanth On Tue, Jan 17, 2017 at 11:42 AM, Luca Boccassiwrote: > On Tue, 2017-01-17 at 00:42 +0100, Shrikanth M.D. wrote: > > Hello All, > > > > I have a zloop_poller invoked as below: > > zloop_poller (loop, , s_netconf_socket_event,inter_thread_pair); > > > > > > I see that while executing the function handles, s_netconf_socket_event, > my > > program terminates. > > I have added debugs and see no obvious issues with my program. > > > > Is there any explicit cause due to which czmq would end the handler by > > itself? > > > > Regards, > > Shrikanth > > Can you provide a code snippet that reproduces the case? > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > https://lists.zeromq.org/mailman/listinfo/zeromq-dev > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org https://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Behaviour change between 4.1.5 and 4.2.1?
Hi Luca, I am setting HWM before connect/bind. I already tried to skip through the git log, but somewhat gave up, since I am too unfamiliar with the internals of ZeroMQ. I am using tcp as transport (under Windows; it does not seem to matter whether select or poll is used). Note: The issue I recently reported on github (https://github.com/zeromq/libzmq/issues/2305) is not the same as this one, but it came up when I tried to reproduce the issue described in my mail in a minimal setting. Best regards Simon -Ursprüngliche Nachricht- Von: Luca Boccassi [mailto:luca.bocca...@gmail.com] Gesendet: Montag, 16. Januar 2017 12:26 An: ZeroMQ development list Betreff: Re: [zeromq-dev] Behaviour change between 4.1.5 and 4.2.1? On Mon, 2017-01-16 at 10:32 +, simon.giese...@btc-ag.com wrote: > Hi, > > we have migrated from ZeroMQ 4.1.5 to 4.2.1 recently and I notice some > behaviour change in some of our test cases. These cases are related to > enforcing that some queues run full resp. the HWM is exceeded. Sorry I cannot > be more precise at the moment; I tried to reproduce the behavioural > differences with some reduced code example, but have not been successful so > far. To enable me to facilitate a more focused reproduction of the issue, I > have a general question in advance. Have there been any deliberate changes in > behaviour between 4.1.5 and 4.2.1 that might be related to this? From reading > the release notes, I did not find something that raised my attention. > > Best regards > Simon One major change is that setting HWM works also after connecting/binding, is that what you are doing? There were many other bug fixes that can be seen in the git log, can't remember all of them off the top of my head Also what transport mode are you using? Kind regards, Luca Boccassi ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org https://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] CZMQ: zloop_poller terminates the function handler
On Tue, 2017-01-17 at 00:42 +0100, Shrikanth M.D. wrote: > Hello All, > > I have a zloop_poller invoked as below: > zloop_poller (loop, , s_netconf_socket_event,inter_thread_pair); > > > I see that while executing the function handles, s_netconf_socket_event, my > program terminates. > I have added debugs and see no obvious issues with my program. > > Is there any explicit cause due to which czmq would end the handler by > itself? > > Regards, > Shrikanth Can you provide a code snippet that reproduces the case? signature.asc Description: This is a digitally signed message part ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org https://lists.zeromq.org/mailman/listinfo/zeromq-dev