Skip to content

chain_head+chainbase mixup when stopping & restarting a replay on 1.1dev #1125

@spoonincode

Description

@spoonincode

This is on 909603c (the log shows a different dirty version; I had copied over the messages before reconfirming on a plain 909603c)

I have an existing blocklog and load a snapshot within that log; the replay commences. At some point I Ctrl-C which should cleanly stop the replay,

info  2025-01-26T02:05:18.638 nodeos    controller.cpp:1746           replay_block_log     ] 96330500 of 96345310
info  2025-01-26T02:05:19.574 nodeos    controller.cpp:5648           set_proposed_produce ] proposed producer schedule with version 1576
info  2025-01-26T02:05:21.402 nodeos    controller.cpp:1746           replay_block_log     ] 96331000 of 96345310
^Cinfo  2025-01-26T02:05:22.616 nodeos    main.cpp:193                  operator()           ] appbase quit called
info  2025-01-26T02:05:22.616 nodeos    controller.cpp:4535           interrupt_apply_bloc ] Interrupting apply block
info  2025-01-26T02:05:22.616 nodeos    controller.cpp:3806           apply_block          ] Interrupt of trx id: 696edff4d19d91b020bcab7b17b41ee69f43dd2f1552bdafd00bb8b1ea8810a9
warn  2025-01-26T02:05:22.616 nodeos    controller.cpp:4357           replay_irreversible_ ] 3080011 interrupt_exception: Transaction interrupted by signal
interrupt signaled, ran 24us, start 2025-01-26T02:05:22.616
    {"bt":24,"s":"2025-01-26T02:05:22.616"}
    nodeos  transaction_context.cpp:504 checktime
eidosonecoin <= eosio.token::transfer pending console output:
    {"console":"","account":"eosio.token","action":"transfer","receiver":"eidosonecoin"}
    nodeos  apply_context.cpp:134 exec_one

    {}
    nodeos  controller.cpp:3887 apply_block

info  2025-01-26T02:05:22.617 nodeos    main.cpp:165                  operator()           ] nodeos version v1.1.0-dev v1.1.0-dev-6bc0408bb3d015348f3c80e08de047c8085fa676-dirty
info  2025-01-26T02:05:22.617 nodeos    main.cpp:69                   log_non_default_opti ] Non-default options: config-dir = XXX/sysdata/, data-dir = XXX/sysdata/, snapshot = XXX/snapshot-2019-12-22-16-eos-v8-0096328736.bin, chain-state-db-size-mb = 16384
info  2025-01-26T02:05:22.619 nodeos    block_handle.cpp:21           write                ] Writing chain_head block 96331227 05bde5db5f19bc7c0bb5bb60d8f6ed5efaebf180202e8fa5e39c0cc570de53df
info  2025-01-26T02:05:22.619 nodeos    fork_database.cpp:662         close                ] No fork_database to persist
info  2025-01-26T02:05:22.889 nodeos    main.cpp:226                  main                 ] Interrupted, successfully exiting

Then, I restart nodeos (without the snapshot option),

info  2025-01-26T02:05:50.755 nodeos    main.cpp:205                  main                 ] nodeos version v1.1.0-dev v1.1.0-dev-6bc0408bb3d015348f3c80e08de047c8085fa676-dirty
info  2025-01-26T02:05:50.755 nodeos    main.cpp:206                  main                 ] nodeos using configuration file XXX/sysdata/config.ini
info  2025-01-26T02:05:50.755 nodeos    main.cpp:207                  main                 ] nodeos data directory is XXX/sysdata/
info  2025-01-26T02:05:50.755 nodeos    main.cpp:69                   log_non_default_opti ] Non-default options: config-dir = XXX/sysdata/, data-dir = XXX/sysdata/, chain-state-db-size-mb = 16384
info  2025-01-26T02:05:50.755 nodeos    block_handle.cpp:52           read                 ] Loading chain_head block 96331227 05bde5db5f19bc7c0bb5bb60d8f6ed5efaebf180202e8fa5e39c0cc570de53df
info  2025-01-26T02:05:50.755 nodeos    main.cpp:165                  operator()           ] nodeos version v1.1.0-dev v1.1.0-dev-6bc0408bb3d015348f3c80e08de047c8085fa676-dirty
info  2025-01-26T02:05:50.755 nodeos    main.cpp:69                   log_non_default_opti ] Non-default options: config-dir = XXX/sysdata/, data-dir = XXX/sysdata/, chain-state-db-size-mb = 16384
info  2025-01-26T02:05:50.757 nodeos    block_handle.cpp:21           write                ] Writing chain_head block 96331227 05bde5db5f19bc7c0bb5bb60d8f6ed5efaebf180202e8fa5e39c0cc570de53df
info  2025-01-26T02:05:50.757 nodeos    fork_database.cpp:662         close                ] No fork_database to persist
error 2025-01-26T02:05:50.758 nodeos    main.cpp:229                  main                 ] 3060000 database_exception: Database exception
chain_head block num 96331227 does not match chainbase revision 96328736
    {"bn":96331227,"r":96328736}
    nodeos  controller.cpp:1991 startup

    {}
    nodeos  chain_plugin.cpp:1176 plugin_startup

Metadata

Metadata

Assignees

Labels

OCIWork exclusive to OCI teambugThe product is not working as was intended.👍 lgtm

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions