Scan aborted due to bad triggering on slaves
This issue keeps happening sporadically in the tests (e.g job 17692):
________________________________ test_scan_node ________________________________
session = <bliss.common.session.Session object at 0x7f5d0208ff98>
redis_data_conn = Redis<ConnectionPool<UnixDomainSocketConnection<path=/tmp/pytest-of-root/pytest-0/beacon0/test_configuration/redis.sock,db=1>>>
scan_tmpdir = local('/tmp/pytest-of-root/pytest-0/test_scan_node0')
def test_scan_node(session, redis_data_conn, scan_tmpdir):
scan_saving = getattr(setup_globals, "SCAN_SAVING")
scan_saving.base_path = str(scan_tmpdir)
parent = scan_saving.get_parent_node()
m = getattr(setup_globals, "roby")
m.velocity(10)
diode = getattr(setup_globals, "diode")
chain = AcquisitionChain()
chain.add(
SoftwarePositionTriggerMaster(m, 0, 1, 5),
SamplingCounterAcquisitionDevice(diode, 0.01, npoints=5),
)
s = Scan(chain, "test_scan", scan_info={"metadata": 42})
assert s.name == "test_scan_1"
assert s.root_node.db_name == parent.db_name
assert isinstance(s.node, ScanNode)
assert s.node.type == "scan"
assert s.node.db_name == s.root_node.db_name + ":" + s.name
scan_node_dict = redis_data_conn.hgetall(s.node.db_name)
assert scan_node_dict.get(b"name") == b"test_scan_1"
assert scan_node_dict.get(b"db_name") == s.node.db_name.encode()
assert scan_node_dict.get(b"node_type") == b"scan"
assert scan_node_dict.get(b"parent") == s.node.parent.db_name.encode()
scan_info_dict = redis_data_conn.hgetall(s.node.db_name + "_info")
assert pickle.loads(scan_info_dict[b"metadata"]) == 42
with gevent.Timeout(5):
> s.run()
tests/scans/test_publishing.py:77:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
bliss/scanning/scan.py:756: in run
gevent.joinall(stop_task, raise_error=True)
/miniconda/envs/testenv/lib/python3.7/contextlib.py:119: in __exit__
next(self.gen)
bliss/common/cleanup.py:265: in capture_exceptions
six.reraise(etype, value, tb)
/miniconda/envs/testenv/lib/python3.7/site-packages/six.py:693: in reraise
raise value
bliss/common/cleanup.py:247: in capture
yield
bliss/scanning/scan.py:744: in run
gevent.joinall(run_next_tasks, raise_error=True, count=1)
src/gevent/greenlet.py:849: in gevent._greenlet.joinall
???
src/gevent/greenlet.py:865: in gevent._greenlet.joinall
???
src/gevent/greenlet.py:312: in gevent._greenlet.Greenlet._raise_exception
???
/miniconda/envs/testenv/lib/python3.7/site-packages/gevent/_compat.py:47: in reraise
raise value.with_traceback(tb)
src/gevent/greenlet.py:716: in gevent._greenlet.Greenlet.run
???
bliss/scanning/scan.py:783: in _run_next
for i in next_iter:
bliss/scanning/chain.py:685: in __next__
gevent.joinall(tasks, raise_error=True)
src/gevent/greenlet.py:849: in gevent._greenlet.joinall
???
src/gevent/greenlet.py:865: in gevent._greenlet.joinall
???
src/gevent/greenlet.py:312: in gevent._greenlet.Greenlet._raise_exception
???
/miniconda/envs/testenv/lib/python3.7/site-packages/gevent/_compat.py:47: in reraise
raise value.with_traceback(tb)
src/gevent/greenlet.py:716: in gevent._greenlet.Greenlet.run
???
bliss/scanning/chain.py:81: in _wait_ready
gevent.joinall(tasks, raise_error=True, count=1)
src/gevent/greenlet.py:849: in gevent._greenlet.joinall
???
src/gevent/greenlet.py:865: in gevent._greenlet.joinall
???
src/gevent/greenlet.py:312: in gevent._greenlet.Greenlet._raise_exception
???
/miniconda/envs/testenv/lib/python3.7/site-packages/gevent/_compat.py:47: in reraise
raise value.with_traceback(tb)
src/gevent/greenlet.py:716: in gevent._greenlet.Greenlet.run
???
bliss/scanning/acquisition/motor.py:187: in wait_ready
self.task.get()
src/gevent/greenlet.py:633: in gevent._greenlet.Greenlet.get
???
src/gevent/greenlet.py:312: in gevent._greenlet.Greenlet._raise_exception
???
/miniconda/envs/testenv/lib/python3.7/site-packages/gevent/_compat.py:47: in reraise
raise value.with_traceback(tb)
src/gevent/greenlet.py:716: in gevent._greenlet.Greenlet.run
???
bliss/scanning/acquisition/motor.py:171: in timer_task
self.trigger_slaves()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> % (self.name, invalid_slaves)
)
E RuntimeError: roby: Aborted due to bad triggering on slaves: [<bliss.scanning.acquisition.counter.SamplingCounterAcquisitionDevice object at 0x7f5d01f670b8>]
bliss/scanning/chain.py:343: RuntimeError