Skip to content
This repository was archived by the owner on Jul 8, 2022. It is now read-only.
This repository was archived by the owner on Jul 8, 2022. It is now read-only.

Change event subscription blind to change events right after device server restart #359

@ghost

Description

[moved here from https://sourceforge.net/p/tango-cs/bugs/834/]

Background
If a device server is restarted, all connected event subscribers will try to reconnect to it after a timeout. Once the client has reconnected, it will receive the latest value of the attribute. So far, so good.

Expected behaviour:
After the connection has been reestablished, from there on the event subscriber should receive every attribute value change that occurs (e.g. a change event on the State attribute).

Actual behaviour:
After the event subscriber has reconnected to the device server, there is a time window in which the event subscriber will not be informed about attribute changes.
E.g. when subscribing to change events on the State attribute, any State changes won't be reported to the event subscribers during that time window. The length of the time window seems to depend on the polling period. A polling period of 10s on State makes the event channel blind to State changes for at least a couple of seconds.

In other words, the event subscriber gets unsynchronized with the device server. And it will remain unsynchronized for potentially a long time, until another attribute change on the server is prompted.

Steps to reproduce:
If the attribute is configured with a large polling period (e.g. the default 3000ms), the bug is easy and reliably to reproduce.

  1. Tested with Tango 9.2.5a, OmniORB 4.2.1, libzmq v4.1.4, PyTango 4.2.1 on Ubuntu 16.04 [amd64]
  2. start TangoTest device server ( (Mthreaded_impl: false; State polling enabled and set to 10s)

Ready to accept request

  1. start attached event_bug_demo_client.py
    [this script connects to State change events and prints out the events]

State: UNKNOWN

  1. Quit and restart TangoTest
    wait until the event subscriber has reestablished the connection
Error state: Event channel is not responding anymore, maybe the server or event system is down
State:  UNKNOWN
  1. Now quickly execute attached event_bug_demo_switch_state.py
    [this will call SwitchStates on TangoTest, causing State to go from UNKNOWN to RUNNING]

If done quickly enough, the event_bug_demo_client.py script will stay stuck at UNKNOWN forever.

Please let me know if there is anything further I can provide to help analyzing this issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions