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 SIGSEGV during shutdown with enabled diagnostics mode #358

Merged
merged 3 commits into from
Oct 7, 2022

Conversation

hlohse
Copy link
Contributor

@hlohse hlohse commented Sep 30, 2022

Motivation

Avoid crash during shutdown with enabled diagnostics mode.

Changes

This was caused by DiagnosticMode's ConsoleReporter which periodically writes metrics to disk and must not access any RocksDB instance after it has been closed already.

Therefore, stop DiagnosticMode first via ShutdownHooks.

https://hivemq.kanbanize.com/ctrl_board/42/cards/9246/details/

@hlohse hlohse requested a review from Remit September 30, 2022 06:04
@cla-bot
Copy link

cla-bot bot commented Sep 30, 2022

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @hlohse on file. In order for us to review and merge your code, please sign our Contributor License Agreement to get yourself added. You'll find the CLA and more information here: https://github.com/hivemq/hivemq-community/blob/master/CONTRIBUTING.adoc#contributor-license-agreement

@hlohse
Copy link
Contributor Author

hlohse commented Sep 30, 2022

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Sep 30, 2022
@cla-bot
Copy link

cla-bot bot commented Sep 30, 2022

The cla-bot has been summoned, and re-checked this pull request!

@hlohse hlohse force-pushed the bugfix/sigsegv-during-shutdown-with-diagnostics branch from 51e2f49 to 0043207 Compare October 5, 2022 08:22
This was caused by DiagnosticMode's ConsoleReporter which periodically
writes metrics to disk and must not access any RocksDB instance after
it has been closed already.

Therefore, stop DiagnosticMode and its ConsoleReporter's executore
first via ShutdownHooks.
@hlohse hlohse force-pushed the bugfix/sigsegv-during-shutdown-with-diagnostics branch from 0043207 to ee32524 Compare October 6, 2022 13:45
@hlohse hlohse merged commit 5aa6f42 into master Oct 7, 2022
@hlohse hlohse deleted the bugfix/sigsegv-during-shutdown-with-diagnostics branch October 7, 2022 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants