-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed halting of the node in rare conditions (#1914)
My node halted during synchronization with the dev cluster. According to the logs, the importing of the blocks stopped because someone was still processing the previous block. I've added a 20-second timeout on the block processing to debug this issue more easily in the future. During my node's graceful shutdown, the `PoA` service was waiting for the child `PoASyncTask` to finish his work. The child process was locked and captured the `ImportResult`, which caused the importer service to be locked. I assume one of `DeadlineClock`'s await functions caused that. I haven't looked into how exactly it could happen; I just replaced the usage of the custom `DeadlineClock` with an `Interval` since it doesn't require `await`. It is just a bad practice to call `await` inside of the `tokio::select`. Maybe, we need to remove `DeadlineClock` from the `PoA` service as well later just to minimize `await` in the `tokio::select`. Or re-write it without async functions. ### Before requesting review - [x] I have reviewed the code myself
- Loading branch information
Showing
3 changed files
with
50 additions
and
24 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