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

Enable backtraces for errors #812

Merged
merged 1 commit into from
May 10, 2023
Merged

Conversation

LukasKalbertodt
Copy link
Member

Fixes #752

In case you wanna test, just add a bail!("Oopsie Woopsie"); to Config::validate and run cargo run -- check.

Curiously, it takes a significant time to print the backtrace! This is very likely due to symbol resolution (when the backtrace is captured, only function addresses are captured, which later need to be resolved to function names and file locations). But I didn't expect it to be that bad. It should be better in release mode though. And I don't think this is problematic in practice. Errors reaching main are not expected and stop Tobira, so it's not a DOS vector.

@LukasKalbertodt LukasKalbertodt added the changelog:admin Changes primarily for admins label May 10, 2023
@github-actions github-actions bot temporarily deployed to test-deployment-pr812 May 10, 2023 09:38 Destroyed
Copy link
Member

@owi92 owi92 left a comment

Choose a reason for hiding this comment

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

In case you wanna test, just add a bail!("Oopsie Woopsie"); to Config::validate and run cargo run -- check.

Thanks for the hint! Appears to work as intended 👍

@owi92 owi92 merged commit b188d9e into elan-ev:master May 10, 2023
3 checks passed
@LukasKalbertodt LukasKalbertodt deleted the error-backtraces branch May 10, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:admin Changes primarily for admins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add stack trace for non-panic errors (Err)
2 participants