eclipse / kiso-testing

https://kiso-testing.readthedocs.io/
Other
38 stars 42 forks source link

fix: add event to avoid deadlocks on run_command calls #386

Closed sebclrsn closed 10 months ago

sebclrsn commented 11 months ago

When a callback executed in _receive_message calls run_command while the auxiliary is being deleted, this run_command call never gets to acquire the lock (already acquired by delete_instance in the main thread) and _receive_message never terminates either. This leads to deadlocks on delete_instance calls.

Solution is to add an event acting as a guard and preventing run_command to try and acquire the lock while the auxiliary is being deleted

codecov[bot] commented 11 months ago

Codecov Report

Merging #386 (8c5b7e6) into master (5f203e5) will increase coverage by 0.00%. Report is 12 commits behind head on master. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #386   +/-   ##
=======================================
  Coverage   97.09%   97.10%           
=======================================
  Files          85       85           
  Lines        6824     6830    +6     
=======================================
+ Hits         6626     6632    +6     
  Misses        198      198           
Files Coverage Δ
src/pykiso/interfaces/dt_auxiliary.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

sebastianpfischer commented 11 months ago

@TedRio, do you still want to review or do we merge it?

Pog3k commented 11 months ago

Waiting for validation