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

Make sure all exceptions are caught when executing code in http_plugin's thread pool, so Leap doesn't crash when processing APIs. #1370

Merged
merged 6 commits into from
Jul 28, 2023

Conversation

greg7mdp
Copy link
Contributor

@greg7mdp greg7mdp commented Jul 4, 2023

Resolves #1372

Make sure all exceptions are caught when executing code in http_plugin's thread pool.

Add section in tests/nodeos_run_test.py to verify that an exception when processing the tail end of get_table_row in the http thread pool is caught and doesn't kill nodeos.

Also removed duplicated test (same test run twice) in tests/CMakeLists.txt

@greg7mdp greg7mdp requested a review from heifner July 4, 2023 17:33
@greg7mdp greg7mdp changed the title Catch exceptions when calling http_fwd(); Make sure all exceptions are caught when executing code in http_plugin's thread pool, so Leap doesn't crash when processing APIs. Jul 4, 2023
Copy link
Member

@heifner heifner left a comment

Choose a reason for hiding this comment

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

Please add a test case.

@ericpassmore
Copy link
Contributor

please update resolving issue to #1372

@greg7mdp
Copy link
Contributor Author

OK, I have added the test. It passes with this PR, but without the change in macros.hpp, it fails as shown in the image below:
image

@greg7mdp greg7mdp requested a review from linh2931 July 27, 2023 15:44
@greg7mdp greg7mdp merged commit 2971a61 into main Jul 28, 2023
21 checks passed
@greg7mdp greg7mdp deleted the gh-17 branch July 28, 2023 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Guard Against crashes in HTTP when making addition nodeos calls
4 participants