This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Exception on stress test for setModel #967
Comments
I change the title because it can be reproduced also on debian, and using a TaurusLabel, with the following snippet that just does a stress test on setting models: from taurus.qt.qtgui.application import TaurusApplication
from taurus.qt.qtgui.display import TaurusLabel
import sys
app = TaurusApplication(cmd_line_parser=None)
w = TaurusLabel()
w.resize(300,100)
w.show()
def loopmodels(model = 'sys/tg_test/1/double_scalar'):
for _ in range(100):
for i in range(len(model), -1, -1):
print(i, model[:i])
w.setModel(model[:i])
app.processEvents()
w.setModel(model)
loopmodels() Running this on a debian9 with py3qt5 results in: $ python stress.py
MainThread INFO 2019-07-25 15:45:27,634 TaurusRootLogger: Using PyQt5 (v5.6 with Qt 5.6.2 and Python 3.6.8)
MainThread INFO 2019-07-25 15:45:27,885 taurus.qt.qtgui.icon.icon: Setting Tango icon theme (from /nfs/home/cpascual/src/taurus/lib/taurus/qt/qtgui/icon/)
MainThread INFO 2019-07-25 15:45:28,139 TaurusRootLogger: Plugin "taurus_pyqtgraph" loaded as "taurus.qt.qtgui.tpg"
27 sys/tg_test/1/double_scalar
26 sys/tg_test/1/double_scala
25 sys/tg_test/1/double_scal
24 sys/tg_test/1/double_sca
TimerLoop 1 WARNING 2019-07-25 15:45:31,788 TaurusPollingTimer[3000].Timer on _pollAttributes: loop function took more than loop interval (3.0s)
23 sys/tg_test/1/double_sc
Exception in thread TimerLoop 1:
Traceback (most recent call last):
File "/home/cpascual/miniconda/envs/py3qt5/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/cpascual/miniconda/envs/py3qt5/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/nfs/home/cpascual/src/taurus/lib/taurus/core/util/timer.py", line 91, in __run
self.__function(*self.__args, **self.__kwargs)
File "/nfs/home/cpascual/src/taurus/lib/taurus/core/tauruspollingtimer.py", line 136, in _pollAttributes
for dev, attrs in self.dev_dict.items():
RuntimeError: dictionary changed size during iteration
22 sys/tg_test/1/double_s
21 sys/tg_test/1/double_
(...)
2 sy
1 s
0
(...)
24 sys/tg_test/1/double_sca
TimerLoop 1 WARNING 2019-07-25 15:45:38,654 TaurusPollingTimer[3000].Timer on _pollAttributes: loop function took more than loop interval (3.0s)
23 sys/tg_test/1/double_sc
(...)
15 sys/tg_test/1/d
terminate called after throwing an instance of 'Tango::DevFailed'
Aborted
|
Notes:
|
It can be reproduced with an even simpler snippet: from taurus.qt.qtgui.application import TaurusApplication
from taurus.qt.qtgui.container import TaurusWidget
app = TaurusApplication(cmd_line_parser=None)
w = TaurusWidget()
w.show()
def loopmodels():
for i in range(1000):
w.setModel('a/b/c/{}'.format(i%2))
app.processEvents()
loopmodels() $ python3 stress3.py
MainThread INFO 2019-07-25 16:37:02,159 TaurusRootLogger: Using PyQt5 (v5.6 with Qt 5.6.2 and Python 3.6.8)
MainThread INFO 2019-07-25 16:37:02,424 taurus.qt.qtgui.icon.icon: Setting Tango icon theme (from /nfs/home/cpascual/src/taurus/lib/taurus/qt/qtgui/icon/)
MainThread INFO 2019-07-25 16:37:02,684 TaurusRootLogger: Plugin "taurus_pyqtgraph" loaded as "taurus.qt.qtgui.tpg"
TimerLoop 1 WARNING 2019-07-25 16:37:06,283 TaurusPollingTimer[3000].Timer on _pollAttributes: loop function took more than loop interval (3.0s)
TimerLoop 1 WARNING 2019-07-25 16:37:10,512 TaurusPollingTimer[3000].Timer on _pollAttributes: loop function took more than loop interval (3.0s)
TimerLoop 1 WARNING 2019-07-25 16:37:14,606 TaurusPollingTimer[3000].Timer on _pollAttributes: loop function took more than loop interval (3.0s)
Exception in thread TimerLoop 1:
Traceback (most recent call last):
File "/home/cpascual/miniconda/envs/py3qt5/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/cpascual/miniconda/envs/py3qt5/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/nfs/home/cpascual/src/taurus/lib/taurus/core/util/timer.py", line 91, in __run
self.__function(*self.__args, **self.__kwargs)
File "/nfs/home/cpascual/src/taurus/lib/taurus/core/tauruspollingtimer.py", line 136, in _pollAttributes
for dev, attrs in self.dev_dict.items():
RuntimeError: dictionary changed size during iteration
TimerLoop 1 ERROR 2019-07-25 16:37:14,994 TaurusPollingTimer[3000]: poll_reply error
TimerLoop 1 ERROR 2019-07-25 16:37:15,018 TaurusPollingTimer[3000]: poll_reply error
TimerLoop 1 WARNING 2019-07-25 16:37:18,271 TaurusPollingTimer[3000].Timer on _pollAttributes: loop function took more than loop interval (3.0s)
TimerLoop 1 ERROR 2019-07-25 16:37:18,272 TaurusPollingTimer[3000]: poll_reply error
TimerLoop 1 WARNING 2019-07-25 16:37:21,626 TaurusPollingTimer[3000].Timer on _pollAttributes: loop function took more than loop interval (3.0s)
TimerLoop 1 ERROR 2019-07-25 16:37:21,627 TaurusPollingTimer[3000]: poll_reply error
TimerLoop 1 WARNING 2019-07-25 16:37:24,981 TaurusPollingTimer[3000].Timer on _pollAttributes: loop function took more than loop interval (3.0s)
TimerLoop 1 WARNING 2019-07-25 16:37:28,800 TaurusPollingTimer[3000].Timer on _pollAttributes: loop function took more than loop interval (3.0s)
TimerLoop 1 ERROR 2019-07-25 16:37:28,801 TaurusPollingTimer[3000]: poll_reply error
TimerLoop 1 ERROR 2019-07-25 16:37:29,011 TaurusPollingTimer[3000]: poll_reply error
TimerLoop 1 ERROR 2019-07-25 16:37:30,018 TaurusPollingTimer[3000]: poll_reply error
TimerLoop 1 WARNING 2019-07-25 16:37:33,336 TaurusPollingTimer[3000].Timer on _pollAttributes: loop function took more than loop interval (3.0s)
TimerLoop 1 ERROR 2019-07-25 16:37:33,337 TaurusPollingTimer[3000]: poll_reply error
TimerLoop 1 WARNING 2019-07-25 16:37:36,716 TaurusPollingTimer[3000].Timer on _pollAttributes: loop function took more than loop interval (3.0s)
TimerLoop 1 ERROR 2019-07-25 16:37:36,717 TaurusPollingTimer[3000]: poll_reply error
TimerLoop 1 WARNING 2019-07-25 16:37:40,154 TaurusPollingTimer[3000].Timer on _pollAttributes: loop function took more than loop interval (3.0s)
TimerLoop 1 ERROR 2019-07-25 16:37:45,016 TaurusPollingTimer[3000]: poll_reply error
|
I think this is a corner case and not release-critical, so moved it to Jan20 milestone |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When performing manual tests for release Jul19, on a taurus-vagrant win10 machine (https://git.cells.es/controls/taurus-vagrant), with conda environment py3qt5.
By deleting character by character the two model names appearing at demo LCD disply at a fast pace, I got this error. Not always reproduced (maybe 50% of times).
Other error:
By changing the model name, foreground role, etc. the application crashes: not easily reproducible.
The text was updated successfully, but these errors were encountered: