Skip to content

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

Open

Description

@matthewdarwin

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.

Activity

  1. 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[/+] on Jan 3, 2024
  2. bhazzard commented on Jan 3, 2024

    @bhazzard

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

  3. heifner commented on Jan 3, 2024

    @heifner
    Contributor

    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.

  4. added
    bugSomething isn't working
    and removed
    enhancementNew feature or request
    on Jan 9, 2024
  5. modified the milestone: Leap v6.0.0-rc1 on Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions