Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

5.0.0-rc3: review if exiting cleanly when running out of RAM is best course of action #2023

Open
matthewdarwin opened this issue Dec 29, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@matthewdarwin
Copy link

My nodeos ran out of RAM..

Dec 29 03:02:15 wax-snap71c nodeos[2594144]: std::bad_alloc: Error unpacking field transactions
Dec 29 03:02:15 wax-snap71c nodeos[2594144]:     {"field":"transactions","what":"std::bad_alloc"}
Dec 29 03:02:15 wax-snap71c nodeos[2594144]:     net-8  raw.hpp:363 operator()
Dec 29 03:02:15 wax-snap71c nodeos[2594144]: error unpacking eosio::chain::signed_block
Dec 29 03:02:15 wax-snap71c nodeos[2594144]:     {"type":"eosio::chain::signed_block"}
Dec 29 03:02:15 wax-snap71c nodeos[2594144]:     net-8  raw.hpp:668 unpack

and then exited cleanly:

Dec 29 03:05:12 wax-snap71c nodeos[2594144]: info  2023-12-29T03:05:12.914 nodeos    http_plugin.cpp:515           plugin_shutdown      ] exit shutdown
Dec 29 03:05:12 wax-snap71c nodeos[2594144]: info  2023-12-29T03:05:12.916 nodeos    main.cpp:155                  operator()           ] nodeos version v5.0.0wax01-rc3 v5.0.0wax01-rc3-10c04d06485c8a1fdb52f6036dfa90b93813cb3a-dirty
Dec 29 03:05:12 wax-snap71c nodeos[2594144]: info  2023-12-29T03:05:12.916 nodeos    main.cpp:62                   log_non_default_opti ] Non-default options: [.........]
Dec 29 03:05:52 wax-snap71c systemd[1]: nodeos.service: Main process exited, code=killed, status=11/SEGV

I am not convinced that the state of the world is 100% accurate in this situation. Would it be better to not exit cleanly instead?(force user to revert to well known state)

For me, I have rolled back to earlier snapshot to avoid any doubt.

@bhazzard bhazzard changed the title 5.0.0-rc3: review if existing cleanly when running out of RAM is best course of action 5.0.0-rc3: review if exiting cleanly when running out of RAM is best course of action Jan 3, 2024
@bhazzard bhazzard added enhancement New feature or request discussion labels Jan 3, 2024
@bhazzard
Copy link

bhazzard commented Jan 3, 2024

Thank you for the suggestion, we will discuss. We won't consider this a blocker for 5.0.0 stable.

@heifner
Copy link
Member

heifner commented Jan 3, 2024

In general the strategy is to just exit (non-clean shutdown):

void chain_apis::api_base::handle_bad_alloc() {
elog("std::bad_alloc - memory exhausted");
//return -2 -- it's what programs/nodeos/main.cpp reports for std::exception
std::_Exit(-2);
}

This must be a case where we are not catching and handling std::bad_alloc appropriately.

@bhazzard bhazzard added bug Something isn't working and removed enhancement New feature or request triage discussion labels Jan 9, 2024
@bhazzard bhazzard modified the milestone: Leap v6.0.0-rc1 Jan 9, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants