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

Improve stacktrace output during release_assert #2142

Merged
merged 2 commits into from
Jul 12, 2019

Conversation

wezrule
Copy link
Contributor

@wezrule wezrule commented Jul 10, 2019

During a stress test @Srayman's node crashed, it hit a release_assert in pending_put but no other useful information was given. The abort signal handler is hit but no stacktraces generated.

From:
https://www.boost.org/doc/libs/1_67_0/doc/html/stacktrace/getting_started.html#stacktrace.getting_started.handle_terminates_aborts_and_seg

Not all the platforms provide means for even getting stacktrace in async signal safe way. No stack trace will be saved on such platforms.

Windows is one of these platforms, and while we cannot create the stacktrace dump during an unexpected crash (in the signal handler) we can output the stacktrace to a file before we abort ourselves in release_assert which will help in these cases.

All platforms will also now output the stacktrace to cerr.

Also moved linux specific code for crash dumps to the platform specific directory.

Tested on Ubuntu/Windows

@wezrule wezrule added the quality improvements This item indicates the need for or supplies changes that improve maintainability label Jul 10, 2019
@wezrule wezrule requested a review from argakiig July 10, 2019 14:30
@wezrule wezrule self-assigned this Jul 10, 2019
@wezrule wezrule added this to the V20.0 milestone Jul 11, 2019
@wezrule wezrule merged commit 7890e4e into nanocurrency:master Jul 12, 2019
@wezrule wezrule deleted the release_assert_more_info branch July 12, 2019 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality improvements This item indicates the need for or supplies changes that improve maintainability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants