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

Handle exceptions in controller signals #976

Merged
merged 10 commits into from
Oct 29, 2024
Merged

Conversation

heifner
Copy link
Member

@heifner heifner commented Oct 25, 2024

Adds new integration test that thows in all controller signals. It verifies that non-controller_emit_signal_exception exceptions are caught and dropped and that controller_emit_signal_exception shuts down the node in a state where it can be restarted. test_control_plugin updated with /v1/test_control/throw_on endpoint for allowing external triggers of exceptions on signals.

Includes a fix for reverting chain_head if accepted_block throws. This caused nodeos not to be able to restart as the chain_head did not match the chainbase state.
Includes a fix for applied_transaction throwing and shutting down nodeos.
Includes a fix for vote_signal throwing and shutting down nodeos.

Looking for opinions on if this PR should be backported to release/1.0

Resolves #946

@heifner heifner requested review from linh2931 and greg7mdp October 25, 2024 14:33
@heifner heifner added the OCI Work exclusive to OCI team label Oct 25, 2024
Copy link
Member

@linh2931 linh2931 left a comment

Choose a reason for hiding this comment

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

Non-test-related changes in this PR are enhancing exception handling. Seems safe to be put in Rel 1.0.3.

@@ -159,10 +158,11 @@ class vote_processor_t {
}

public:
explicit vote_processor_t(vote_signal_t& vote_signal, fetch_block_func_t&& get_block)
: vote_signal(vote_signal)
explicit vote_processor_t(emit_vote_signal_func_t&& emit_vote_signal, fetch_block_func_t&& get_block)
Copy link
Contributor

Choose a reason for hiding this comment

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

The two parameters are rvalues... we should probably std::move them.

@ericpassmore
Copy link
Contributor

Note:start
category: System Stability
component: Internal
summary: Handle exceptions in controller signals.
Note:end

@heifner heifner merged commit 5920982 into main Oct 29, 2024
36 checks passed
@heifner heifner deleted the GH-946-emit-exception-test branch October 29, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TEST: Make sure nodeos shuts down on controller_emit_signal_exceptions
4 participants