-
Notifications
You must be signed in to change notification settings - Fork 34
Unsubscribe in push_event leads to API_EventTimeout #686
Comments
Hi, I don't know if I have mentioned this already but I think that this bug is a regression since Tango 9.1 - see this forum thread. Maybe with this information it will be possible to track which change introduced this regression? I have also evaluated some possibilities to workaround this issue in taurus:
Surprisingly the second option did not solve the issue what make me doubt if there are no more bugs - there the unsubscribes are executed from another thread and not the event consumer. Only the third option does not fail, but in this case we are leaving subscriptions active so it is not really optimal. Please let us know if we can help somehow. |
…ango-controls#686) Subscribing or unsubscribing events in an event callback when this callback was called during a subscribe_event() phase was leading to events and heartbeat events no longer received by the event client. A bug was fixed when several ZMQ_DELAY_EVENT tasks were received consecutively by the ZMQ control task.
…ango-controls#686) Subscribing or unsubscribing events in an event callback when this callback was called during a subscribe_event() phase was leading to events and heartbeat events no longer received by the event client. A bug was fixed when several ZMQ_DELAY_EVENT commands were received consecutively by the ZMQ control socket.
Hi @reszelaz , thank you very much for creating the issue and for providing a reproducible example showing the issue. There was indeed a bug in this very specific use case. I made a test with the C++ client from https://github.com/reszelaz/test-tango-unsub slightly modified to avoid to subscribe at the first call and it seems to work fine in this use case:
I think I found a way to fix the bug. Could you please test it? |
Great news Reynald that you already found a solution for that! |
The origin of the problem is understood. Now we have to find the best solution to fix it. The fix I proposed might have some side effects we need to evaluate. |
…ango-controls#686) Subscribing or unsubscribing events in an event callback when this callback was called during a subscribe_event() phase was leading to events and heartbeat events no longer received by the event client. A bug was fixed when several ZMQ_DELAY_EVENT commands were received consecutively by the ZMQ control socket.
Create forward port of #699. |
From the reporter point of view it can be closed:) It is in 9.3.4rc5 right? |
Thanks @reszelaz . It is in 9.3.4rc5 indeed. |
…ango-controls#686) Subscribing or unsubscribing events in an event callback when this callback was called during a subscribe_event() phase was leading to events and heartbeat events no longer received by the event client. A bug was fixed when several ZMQ_DELAY_EVENT commands were received consecutively by the ZMQ control socket.
We encountered this issue when investigating tango-controls/pytango#292.
The architecture is as following. We have one DS called
DeviceServer
whichexports in total two devices, each of a different class. These two classes are:
Device1
with one attributeattr1
Device2
with two attributesattr1
andattr2
What we will do:
attr1
configuration events of theDevice1
device.attr1
change events of theDevice2
device.attr2
change events of theDevice2
devicewith a callback which will unsubscribe from the previously subscribed
attr1
configuration events of theDevice1
device.This leads to the situation where the client stops receiving events and just get's
API_EventTimeout
.Thanks to the example provided by @schooft we could also reproduce it with C++ client.
More details and the exemplary code can be found in https://github.com/reszelaz/test-tango-unsub.
The text was updated successfully, but these errors were encountered: