Event-subscribed client segfaults if events cannot reach it
I found this while investigating crashes in taurus GUIs when a tango DS was restarted (see taurus-org/taurus#1118 (closed)).
I managed to reproduce this using conda environments with both py2 and py3, and with pytango v 9.3.0 till 9.3.4-rc6 (pytango 9.2.x did not seem to be affected)
To reproduce, follow these steps
(UPDATE: 2020-07-09: all this was done with the tangotest DS running on a separate docker bridge network from which the events could not reach the client running in the host)
- Start tangotest DS
- launch this script:
import tango
import time
import sys
d = tango.DeviceProxy("sys/tg_test/1")
cb = tango.utils.EventCallback()
d.subscribe_event("ampli", tango.EventType.ATTR_CONF_EVENT, cb)
while True:
print(".")
sys.stdout.flush()
time.sleep(1)
- stop and start the tangotest DS
- ~10s after seeing the API_EventTimeout printed, the script crashes
Maybe it is related to #185 and/or #292 (closed)
Edited by Reynald Bourtembourg