Skip to content

Fix deadlock between auto-pause and action execution#122

Open
BhekananiCele wants to merge 1 commit into
sw3103:masterfrom
ComvestecSolutions:master
Open

Fix deadlock between auto-pause and action execution#122
BhekananiCele wants to merge 1 commit into
sw3103:masterfrom
ComvestecSolutions:master

Conversation

@BhekananiCele

Copy link
Copy Markdown

The lock-splitting change (splitting _lock into _actionsLock and _pauseLock) introduced a lock-ordering deadlock when AutoPause is enabled. _autoPauseTimer_Elapsed held _pauseLock and called Stop() which acquires _actionsLock, while PerformActions held _actionsLock and called StopAutoPauseTimer() which acquires _pauseLock.

Move the Stop() call outside the _pauseLock in _autoPauseTimer_Elapsed to break the circular dependency.

The lock-splitting change (splitting _lock into _actionsLock and
_pauseLock) introduced a lock-ordering deadlock when AutoPause is
enabled. _autoPauseTimer_Elapsed held _pauseLock and called Stop()
which acquires _actionsLock, while PerformActions held _actionsLock
and called StopAutoPauseTimer() which acquires _pauseLock.

Move the Stop() call outside the _pauseLock in _autoPauseTimer_Elapsed
to break the circular dependency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant