-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race between task resume and task terminate
In current arbitration test, we found the case that a driver can't be destroyed if it is in blocking state while the task has been paused for memory reclaim, finish and resume. Here are events: (1) task is paused for memory reclaim (2) task is finished by external event which skip all the off thread drivers and let the task resume to process them (3) task is resumed by memory arbitration but task resume won't close the off thread drivers but just wake them up to expect they do close themselves when they get back to thread. (4) When the off thread driver threads get woke up, it fails to go on thread as the task has finished and expect the task terminate or finish process to close them which is unexpected. So task resume should check if a task has finished or not to decide wake up or close off thread drivers. Unit test added to reproduce and verify.
- Loading branch information
Showing
6 changed files
with
68 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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