Skip to content
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

fix: abort on panic in tokio thread #109

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ edition = "2021"
[workspace]
members = ["state-reconstruct-fetcher", "state-reconstruct-storage"]

[profile.release]
panic = 'abort'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this should be the default behaviour. When possible, I think each task should run to completion to make sure that the state won't get corrupted. For tasks that may panic I'd prefer to handle the error.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I totally agree the threads shouldn't panic - if there is code that panics on invalid network data, disk failure or whatever we should fix that. But I don't know where the code might be; #104 happened just once - it could be some irreproducible cosmic ray... This change is just to find it.


[dependencies]
async-trait = "0.1.74"
bincode = "1"
Expand Down