InputMergeActor: fix deadlock#174
Merged
Merged
Conversation
woutdenolf
marked this pull request as draft
July 12, 2026 13:13
woutdenolf
force-pushed
the
173-inputmergeactor-lock-need-to-be-re-entrant
branch
from
July 12, 2026 15:30
e9b136d to
7c30c65
Compare
woutdenolf
marked this pull request as ready for review
July 12, 2026 15:31
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
woutdenolf
force-pushed
the
173-inputmergeactor-lock-need-to-be-re-entrant
branch
from
July 12, 2026 15:39
7c30c65 to
6e081c7
Compare
woutdenolf
commented
Jul 12, 2026
Comment on lines
244
to
247
|
|
||
| self._lock = threading.Lock() | ||
| # Re-entrant in case downstream actor triggers this actor in the same call stack. | ||
| self._lock = threading.RLock() | ||
|
|
Member
Author
There was a problem hiding this comment.
This is the fix. The rest are unit tests.
loichuder
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An Ewoks ppf actor graph has an
InputMergeActorin front of aPythonActor(see docs).The deadlock can happen when the Ewoks task loops to itself so
InputMergeActortriggersPythonActorwhich trigger the sameInputMergeActorOf course this is very unlikely but could happen
The fix is to make the lock in
InputMergeActorre-entrant. Since this is the same call stack we don't have to worry these calls can happen concurrently, as opposed to calls from different upstream actors.