Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_dynamic_state_insertion unstable #779

Open
franzlst opened this issue Apr 17, 2020 · 1 comment
Open

test_dynamic_state_insertion unstable #779

franzlst opened this issue Apr 17, 2020 · 1 comment

Comments

@franzlst
Copy link
Member

The test_dynamic_state_insertion is unstable. The dynamic_library_insertion parameterization is stable, the other two are not.

Till the test is fixed, it is marked as unstable.

The following stacktrace occurs often:

... 
2019-08-06 10:52:58:    DEBUG - rafcon.core.execution.execution_engine:  Start execution engine ...
Both threads are former gui threads! Current thread <Thread(Thread-626, started 140231936726784)>, Observer thread <Thread(Thread-302, stopped 140233028462336)>
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.hierarchy_state:  Starting execution of HierarchyState with name 'dynamic state deletion inside library' and id 'PMEJDO' [1 child states]
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.library_state:  Entering library state 'dynamic_library_insertion_and_deletion' with name 'dynamic_library_insertion_and_deletion'
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.hierarchy_state:  Starting execution of HierarchyState with name 'dynamic library insertion and deletion' and id 'QUSEKE' [4 child states]
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.library_state:  Entering library state 'disable_history' with name 'disable history'
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.execution_state:  Running ExecutionState with name 'disable history' and id 'JFDYXU'
2019-08-06 10:52:58:    DEBUG - rafcon.disable history:  Disable history
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.state:  Finished execution of ExecutionState with name 'disable history' and id 'JFDYXU': Outcome 'success' [0]
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.library_state:  Exiting library state 'disable_history' with name 'disable history'
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.state:  Finished execution of LibraryState with name 'disable history' and id 'PHTTXK': Outcome 'success' [0]
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.execution_state:  Running ExecutionState with name 'generate state' and id 'QRRWWV'
2019-08-06 10:52:58:    DEBUG - rafcon.generate state:  Insert state
2019-08-06 10:52:58:    DEBUG - rafcon.core.storage.storage:  Loading state machine from path /var/lib/jenkins/workspace/rafcon_github_all_branches/tests/assets/unit_test_state_machines/increase_gvm_counter...
2019-08-06 10:52:58:    DEBUG - rafcon.core.storage.storage:  Load state recursively: /var/lib/jenkins/workspace/rafcon_github_all_branches/tests/assets/unit_test_state_machines/increase_gvm_counter/increase gvm counter$QICPUE
2019-08-06 10:52:58:    DEBUG - rafcon.core.storage.storage:  Loaded state machine (/var/lib/jenkins/workspace/rafcon_github_all_branches/tests/assets/unit_test_state_machines/increase_gvm_counter) has 1 states. (Max hierarchy level 1)
2019-08-06 10:52:58:    DEBUG - rafcon.core.storage.storage:  Loaded state machine (/var/lib/jenkins/workspace/rafcon_github_all_branches/tests/assets/unit_test_state_machines/increase_gvm_counter) has 0 transitions.
2019-08-06 10:52:58:  VERBOSE - rafcon.utils.timer:  Profiler: load_state_machine_from_path (args: ('/var/lib/jenkins/workspace/rafcon_github_all_branches/tests/assets/unit_test_state_machines/increase_gvm_counter',); kwargs: {}); duration: 0.0052s
2019-08-06 10:52:58:  WARNING - rafcon.gui.models.abstract_state:  You have modified core property of an inner state of a library state.
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.state:  Finished execution of ExecutionState with name 'generate state' and id 'QRRWWV': Outcome 'aborted' [-1]
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.container_state:  Outcome 'aborted' [-1] of ExecutionState with name 'generate state' and id 'QRRWWV' not connected, using default transition to parental Outcome 'aborted' [-1]
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.state:  Finished execution of HierarchyState with name 'dynamic library insertion and deletion' and id 'QUSEKE' [4 child states]: Outcome 'aborted' [-1]
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.library_state:  Exiting library state 'dynamic_library_insertion_and_deletion' with name 'dynamic_library_insertion_and_deletion'
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.state:  Finished execution of LibraryState with name 'dynamic_library_insertion_and_deletion' and id 'SUGIGX': Outcome 'aborted' [-1]
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.container_state:  Outcome 'aborted' [-1] of LibraryState with name 'dynamic_library_insertion_and_deletion' and id 'SUGIGX' not connected, using default transition to parental Outcome 'aborted' [-1]
2019-08-06 10:52:58:    DEBUG - rafcon.core.states.state:  Finished execution of HierarchyState with name 'dynamic state deletion inside library' and id 'PMEJDO' [1 child states]: Outcome 'aborted' [-1]
----------------------------- Captured stderr call -----------------------------
2019-08-06 10:52:58:    ERROR - rafcon.core.states.execution_state:  ExecutionState with name 'generate state' and id 'QRRWWV' had an internal error: AssertionError: 
Traceback (most recent call last):
  File "script.py (940)", line 15, in execute
  File "/var/lib/jenkins/workspace/rafcon_github_all_branches/source/rafcon/utils/gui_functions.py", line 71, in call_gui_callback
    raise_(e_instance, None, e_traceback)
  File "/var/lib/jenkins/workspace/rafcon_github_all_branches/.tox/py35/lib/python3.5/site-packages/future/utils/__init__.py", line 416, in raise_
    raise exc
  File "/var/lib/jenkins/workspace/rafcon_github_all_branches/source/rafcon/utils/gui_functions.py", line 49, in fun
    result = callback(*args)
  File "/var/lib/jenkins/workspace/rafcon_github_all_branches/.tox/py35/lib/python3.5/site-packages/gtkmvc3/observable.py", line 47, in wrapper
    res = _func(*args, **kwargs)
AssertionError

Originally created by @sebastian-brunner ([email protected]) at 2019-08-06 11:50:51+00:00 (moved from RMC internal repository)

@franzlst
Copy link
Member Author

Also the first parametrization (dynamic_library_insertion) is unstable.

This is the underlying error, causing the AssertionError:

00:03:47.550 =================================== FAILURES ===================================
00:03:47.550 __________ test_dynamic_state_insertion[dynamic_library_insertion-0] ___________
00:03:47.550 Traceback (most recent call last):
00:03:47.550   File "/home_local/jenkins/common_rafcon_develop/tests/gui/execution/test_dynamic_state_operations.py", line 30, in test_dynamic_state_insertion
00:03:47.550     gui(menubar_ctrl.on_start_activate, None, None)
00:03:47.550   File "/home_local/jenkins/common_rafcon_develop/tests/gui/conftest.py", line 34, in __call__
00:03:47.550     call_gui_callback(wait_for_gui)
00:03:47.550   File "/home_local/jenkins/common_rafcon_develop/.tox/py27/lib/python2.7/site-packages/rafcon/utils/gui_functions.py", line 71, in call_gui_callback
00:03:47.550     raise_(e_instance, None, e_traceback)
00:03:47.550   File "/home_local/jenkins/common_rafcon_develop/.tox/py27/lib/python2.7/site-packages/rafcon/utils/gui_functions.py", line 49, in fun
00:03:47.550     result = callback(*args, **kwargs)
00:03:47.550   File "/home_local/jenkins/common_rafcon_develop/.tox/py27/lib/python2.7/site-packages/rafcon/core/decorators.py", line 53, in func_wrapper
00:03:47.550     return_value = func(*args, **kwargs)
00:03:47.550   File "/home_local/jenkins/common_rafcon_develop/.tox/py27/lib/python2.7/site-packages/gtkmvc3/observable.py", line 47, in wrapper
00:03:47.550     res = _func(*args, **kwargs)
00:03:47.550   File "/home_local/jenkins/common_rafcon_develop/.tox/py27/lib/python2.7/site-packages/rafcon/core/states/container_state.py", line 768, in add_state
00:03:47.550     assert isinstance(state, State)
00:03:47.550 AssertionError

So a LibraryState is created (dynamically in the execute function of an ExecutionState) and passed as state to ContainerState.add_state. However, at that point assert isinstance(state, State) is not fulfilled.

I tried hard, to find out why this is, but did not succeed. One problem is that I cannot reproduce this locally on my machine.

Originally created by @franzlst ([email protected]) at 2019-08-06 12:08:03+00:00 (moved from RMC internal repository)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant