-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security: Stop RocksDB or tokio calling unexpected code when zebrad exits #3392
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3392 +/- ##
==========================================
+ Coverage 78.34% 78.42% +0.08%
==========================================
Files 267 267
Lines 31526 31576 +50
==========================================
+ Hits 24698 24764 +66
+ Misses 6828 6812 -16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see if waiting for the database in cancel_all_background_work
fixes the errors we're seeing.
I also added some optional changes, we should only do them if this PR actually fixes the errors.
This commit moves the database shutdown code into a common function.
I opened oxarbitrage#164 with some fixes and a test script. It's based on this PR. I would be happy to merge oxarbitrage#164 or whatever you think is best here. I ran a bunch of tests using the new |
Security: Wait for RocksDB tasks to exit on shutdown
@Mergifyio update |
✅ Branch has been successfully updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, let's merge!
@Mergifyio refresh |
✅ Pull request refreshed |
@Mergifyio update |
☑️ Nothing to do
|
Motivation
Fix warnings coming from C++(most probably rocksdb) that are displayed sometimes when Ctrl-C is executed to exit zebrad.
Solution
Bug Fix:
Testing:
Closes #3133.
Review
@teor2345 and i both worked on it but anyone can review.