#646 ZMQ events bug with device name that include TANGO_HOST in the name

closed-fixed
nobody
zmq events (2)
C++ API
5
2015-10-07
2014-01-21
Sergi Rubio
No

This bug affects only ZMQ and happened when accessing from ct64suse11 a device running in ct64suse121; being both machines Tango-8.1.2 and having killed notifd before starting the devices.

When running same device/client with notifd active the bug doesn't reproduce.

export TANGO_HOST=controls02:10000
ipython
In [1]: import PyTango
In [2]: dp = PyTango.DeviceProxy('controls01:10000/sys/tg_test/01')
In [3]: def printf(*args_):print(args_)
...:
In [4]: eid = dp.subscribe_event('state',PyTango.EventType.CHANGE_EVENT,printf,stateless=True)

First event is received:

(EventData(attr_name = 'tango://controls01.cells.es:10000/sys/tg_test/01/state', attr_value = DeviceAttribute(data_format = PyTango._PyTango.AttrDataFormat.SCALAR, dim_x = 1, dim_y = 0, has_failed = False, is_empty = False, name = 'State', nb_read = 1, nb_written = 0, quality = PyTango._PyTango.AttrQuality.ATTR_VALID, r_dimension = AttributeDimension(dim_x = 1, dim_y = 0), time = TimeVal(tv_nsec = 0, tv_sec = 1390321122, tv_usec = 407624), type = PyTango._PyTango.CmdArgType.DevState, value = PyTango._PyTango.DevState.FAULT, w_dim_x = 0, w_dim_y = 0, w_dimension = AttributeDimension(dim_x = 0, dim_y = 0), w_value = None), device = TangoTest(sys/tg_test/01), err = False, errors = (), event = 'change', reception_date = TimeVal(tv_nsec = 0, tv_sec = 1390321125, tv_usec = 648294)),)

BUG! Next events received fail to show anything:

In [6]: Tue Jan 21 17:18:52 2014: Event tango://controls01.cells.es:10000/sys/tg_test/01/state.change not found in event callback map !!!
Tue Jan 21 17:18:52 2014: Event tango://controls01.cells.es:10000/sys/tg_test/01/state.change not found in event callback map !!!


This problem doesn't happen when running notifd or avoiding TANGO_HOST in event name:

export TANGO_HOST=controls01:10000
ipython
In [1]: import PyTango
In [3]: dp = PyTango.DeviceProxy('sys/tg_test/01')
In [4]: def printf(*args_):print(args_)
...:
In [5]: eid = dp.subscribe_event('state',PyTango.EventType.CHANGE_EVENT,printf,stateless=True)
(EventData(attr_name = 'tango://controls01.cells.es:10000/sys/tg_test/01/state', attr_value = DeviceAttribute(data_format = PyTango._PyTango.AttrDataFormat.SCALAR, dim_x = 1, dim_y = 0, has_failed = False, is_empty = False, name = 'State', nb_read = 1, nb_written = 0, quality = PyTango._PyTango.AttrQuality.ATTR_VALID, r_dimension = AttributeDimension(dim_x = 1, dim_y = 0), time = TimeVal(tv_nsec = 0, tv_sec = 1390321200, tv_usec = 408004), type = PyTango._PyTango.CmdArgType.DevState, value = PyTango._PyTango.DevState.RUNNING, w_dim_x = 0, w_dim_y = 0, w_dimension = AttributeDimension(dim_x = 0, dim_y = 0), w_value = None), device = TangoTest(sys/tg_test/01), err = False, errors = (), event = 'change', reception_date = TimeVal(tv_nsec = 0, tv_sec = 1390321203, tv_usec = 600440)),)

In [6]: (EventData(attr_name = 'tango://controls01.cells.es:10000/sys/tg_test/01/state', attr_value = DeviceAttribute(data_format = PyTango._PyTango.AttrDataFormat.SCALAR, dim_x = 1, dim_y = 0, has_failed = False, is_empty = False, name = 'State', nb_read = 1, nb_written = 0, quality = PyTango._PyTango.AttrQuality.ATTR_VALID, r_dimension = AttributeDimension(dim_x = 1, dim_y = 0), time = TimeVal(tv_nsec = 0, tv_sec = 1390321206, tv_usec = 408349), type = PyTango._PyTango.CmdArgType.DevState, value = PyTango._PyTango.DevState.FAULT, w_dim_x = 0, w_dim_y = 0, w_dimension = AttributeDimension(dim_x = 0, dim_y = 0), w_value = None), device = TangoTest(sys/tg_test/01), err = False, errors = (), event = 'change', reception_date = TimeVal(tv_nsec = 0, tv_sec = 1390321207, tv_usec = 866107)),)

Discussion

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
    
     This bug affects only ZMQ and happened when accessing from ct64suse11 a device running in ct64suse121; being both machines Tango-8.1.2 and having killed notifd before starting the devices.
    
    • Category: PyTango --> C++ API
     
  • Hola Sergi,

    This is a C++ bug and therefore, I have modified its category.
    It is already solved in future Tango 9 branch.
    If necessary, I can provide a patch for Tango 8

    Cheers

     
    • Sergi Rubio
      Sergi Rubio
      2014-02-05

      Thanks Manu,

      Yes, we would appreciate a lot a patch for Tango8, as we need this feature to upgrade our beamlines control systems.

      Sergi

       
  • Tiago Coutinho
    Tiago Coutinho
    2014-02-24

    • labels: Python binding, zmq events --> zmq events
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     This bug affects only ZMQ and happened when accessing from ct64suse11 a device running in ct64suse121; being both machines Tango-8.1.2 and having killed notifd before starting the devices.
    
     When running same device/client with notifd active the bug doesn't reproduce.
    
     
  • Fixed with Tango 9

     
    • status: open --> closed-fixed