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

Replay-blockchain option not purging state code cache #1406

Closed
eosusa opened this issue Jul 13, 2023 · 1 comment · Fixed by #1780, #1787 or #1788
Closed

Replay-blockchain option not purging state code cache #1406

eosusa opened this issue Jul 13, 2023 · 1 comment · Fixed by #1780, #1787 or #1788
Assignees
Labels
👍 lgtm OCI Work exclusive to OCI team
Milestone

Comments

@eosusa
Copy link

eosusa commented Jul 13, 2023

When attempting to kick off a --replay-blockchain on a 3.2.4 node that crashed and left dirty db, I get the following error and it will not proceed:

info  2023-07-13T16:11:29.593 nodeos    chain_plugin.cpp:966          plugin_initialize    ] Starting fresh blockchain state using genesis state extracted from blocks.log.
info  2023-07-13T16:11:29.603 nodeos    block_log.cpp:284             open                 ] Log is nonempty
info  2023-07-13T16:11:29.603 nodeos    block_log.cpp:317             open                 ] Index is nonempty
warn  2023-07-13T16:11:29.604 nodeos    chain_plugin.cpp:1251         plugin_initialize    ] 3060000 database_exception: Database exception
code cache is dirty
    {}
    nodeos  code_cache.cpp:234 code_cache_base

error 2023-07-13T16:11:29.604 nodeos    main.cpp:161                  main                 ] 3060000 database_exception: Database exception
code cache is dirty
    {}
    nodeos  code_cache.cpp:234 code_cache_base
rethrow
    {}
    nodeos  chain_plugin.cpp:1251 plugin_initialize

Manually purging the state directory before the replay did resolve the issue (but ironically led me to the new "feature" where a missing state folder wont delete ship logs and errors out with generic cannot write to statehist logs error)

@spoonincode
Copy link
Member

I think it might make sense to silently remove the code cache if it's dirty.

@spoonincode spoonincode self-assigned this Oct 5, 2023
@heifner heifner assigned heifner and unassigned spoonincode Oct 16, 2023
@heifner heifner added the OCI Work exclusive to OCI team label Oct 16, 2023
heifner added a commit that referenced this issue Oct 16, 2023
@heifner heifner linked a pull request Oct 16, 2023 that will close this issue
heifner added a commit that referenced this issue Oct 17, 2023
[4.0] Recreate EOS VM OC code cache if corrupt
@heifner heifner linked a pull request Oct 17, 2023 that will close this issue
heifner added a commit that referenced this issue Oct 17, 2023
[4.0 -> 5.0] Recreate EOS VM OC code cache if corrupt
@heifner heifner added this to the Leap v4.0.5 milestone Oct 17, 2023
heifner added a commit that referenced this issue Oct 17, 2023
[5.0 -> main] Recreate EOS VM OC code cache if corrupt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment