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

nodeos should exit with exit code 2 if database is unclean, but doesn't #565

Closed
Tracked by #1440
matthewdarwin opened this issue Dec 12, 2022 · 6 comments · Fixed by #710
Closed
Tracked by #1440

nodeos should exit with exit code 2 if database is unclean, but doesn't #565

matthewdarwin opened this issue Dec 12, 2022 · 6 comments · Fixed by #710
Assignees
Labels
actionable bug Something isn't working 👍 lgtm

Comments

@matthewdarwin
Copy link

matthewdarwin commented Dec 12, 2022

nodeos should exit with exit code 2 if database is unclean, but doesn't. it doesn't detect the situation cleanly and aborts with incorrect plugin error.

Steps to reproduce:

  • nodeos 3.2
  • make it running fine
  • run pkill -9 nodeos
warn  2022-12-12T19:15:51.201 nodeos    chain_plugin.cpp:1246         plugin_initialize    ] 3110006 plugin_config_exception: Incorrect plugin configuration
Genesis state is necessary to initialize fresh blockchain state but genesis state could not be found in the blocks log. Please either load from snapshot or find a blocks log that starts from genesis.
    {}
    nodeos  chain_plugin.cpp:1046 plugin_initialize
error 2022-12-12T19:15:51.201 nodeos    main.cpp:161                  main                 ] 3110006 plugin_config_exception: Incorrect plugin configuration
Genesis state is necessary to initialize fresh blockchain state but genesis state could not be found in the blocks log. Please either load from snapshot or find a blocks log that starts from genesis.
    {}
    nodeos  chain_plugin.cpp:1046 plugin_initialize
rethrow
    {}
    nodeos  chain_plugin.cpp:1246 plugin_initialize

nodeos finished with exit code 254
@enf-ci-bot enf-ci-bot moved this to Todo in Team Backlog Dec 12, 2022
@heifner heifner added bug Something isn't working actionable and removed triage labels Dec 12, 2022
@linh2931
Copy link
Member

@matthewdarwin How did you start our node? I could not reproduce the problem in rel 3.2:

...
info  2022-12-19T13:43:29.167 nodeos    chain_plugin.cpp:968          plugin_initialize    ] Starting fresh blockchain state using genesis state extracted from blocks.log.
warn  2022-12-19T13:43:29.168 nodeos    chain_plugin.cpp:1253         plugin_initialize    ] 13 N5boost10wrapexceptISt12system_errorEE: Database dirty flag set
rethrow Database dirty flag set:
    {"what":"Database dirty flag set"}
    nodeos  chain_plugin.cpp:1253 plugin_initialize

error 2022-12-19T13:43:29.168 nodeos    main.cpp:157                  main                 ] database dirty flag set (likely due to unclean shutdown): replay required
~/work/leap-3.2/build$ echo $?
2

@heifner heifner added the more-info waiting for submitter to reply with more information label Dec 19, 2022
@stephenpdeos
Copy link
Member

@matthewdarwin what environment are you running in? Operating system, container, host OS

@matthewdarwin
Copy link
Author

I will check it when I have a few minutes.

cmadh pushed a commit to cmadh/leap that referenced this issue Jan 2, 2023
…_path_spaces

[3.2] Backport: Fix build when build path has spaces for mandel and appbase
@stephenpdeos
Copy link
Member

@matthewdarwin bumping this ticket, thanks!

@stephenpdeos stephenpdeos added 👍 lgtm and removed more-info waiting for submitter to reply with more information labels Feb 9, 2023
@heifner
Copy link
Member

heifner commented Feb 10, 2023

@matthewdarwin How did you start our node? I could not reproduce the problem in rel 3.2:

You have to start from a snapshot. If genesis is in the blocklog you do not get this error.

@heifner
Copy link
Member

heifner commented Jul 24, 2023

Cat: Logging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable bug Something isn't working 👍 lgtm
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants