Sardana server (standalone) has problems with Pool Elements subscription
Seems like there is a limitation in Tango that it is not possible to subscribe to the attribute events before the complete DS was started. The following query was raised to the Tango experts.
The following WARNING message is logged at the server startup:
MainThread DEBUG 2018-01-04 11:15:18,909 TaurusPollingTimer[3000].Timer on _pollAttributes: Timer::stop()
MainThread WARNING 2018-01-04 11:15:18,909 pc255.cells.es:10000.Pool_zreszela_2: Received elements error event Pool was shutdown or is inaccessible
MainThread DEBUG 2018-01-04 11:15:18,909 pc255.cells.es:10000.Pool_zreszela_2: DevFailed[
DevError[
desc = Device dserver/sardana/zreszela is not exported (hint: try starting the device server)
origin = DeviceProxy::get_corba_name()
reason = API_DeviceNotExported
severity = ERR]
DevError[
desc = Failed to execute command_inout on device dserver/sardana/zreszela, command ZmqEventSubscriptionChange
origin = Connection::command_inout()
reason = API_CommandFailed
severity = ERR]
DevError[
desc = Device server send exception while trying to register event
origin = EventConsumer::connect_event()
reason = API_DSFailedRegisteringEvent
severity = ERR]
]
As a consequence of the failed event subscription the Taurus polling gets enabled on this attribute which will be disabled at some point when the reconnection succeeds.
The consequences of this behavior were not studied yet. But IMHO, since the Elements attribute is very critical to the system integrity we should look for a more reliable way of the Pool and MacroServer connection on the startup. So most probably we will need to change the way the Sardana server starts up.
The following segfaults https://github.com/sardana-org/sardana/issues/466 are also relaed to this subscription failure. Also on the old open SUSE 11.1 and ALBA's Tango stack (still Tango 7) the segfault is reproducible. I don't know to which extend they depend on the underneeth Tango stack - on my Debian PC the segfault is not reproducible.