skalenetwork / skale-consensus

Running the very core of SKL network, SKALE BFT consensus is universal, modern, modular, high-performance, asynchronous, provably-secure, agent-based Proof-of-Stake blockchain consensus engine in C++ 17. Includes provably secure embedded Oracle. Used by SKALE elastic blockchains. Easy and flexible enough to implement your own blockchain or smart contract platform. BLS signatures and Binary Asynchronous Consensus are main building blocks.
https://docs.skale.network/technology/consensus-spec
GNU Affero General Public License v3.0
77 stars 32 forks source link

No mutex for /da_proofs DB during db-pruning #728

Closed oleksandrSydorenkoJ closed 1 year ago

oleksandrSydorenkoJ commented 1 year ago

Version skalenetwork/schain:3.16.0-beta.6

Preconditions: Active schain Medium type

Steps to reproduce:

  1. Run load tests for a 48 hours.
  2. Check skaled logs

Expected state: Consensus should be able to catch monitor for DB before db-pruning

Actual state: No mutex for /da_proofs DB during db-pruning and a lot of logs in output. Skaled doesn't crashes after receiving this errors, da_proofs_N.db has been rotated without any errors.

Logs:

[2023-01-31 04:48:15.867] [3:main] [error] 131711:!Exception: BlockProposalServerAgent:Couldnt create DAProof response header
[2023-01-31 04:48:15.867] [3:main] [error] 131711: !Caused by: Schain:daProofArrived
[2023-01-31 04:48:15.867] [3:main] [error] 131711:  !Caused by: CacheLevelDB:rotateDBsIfNeeded
[2023-01-31 04:48:15.867] [3:main] [error] 131711:   !Caused by: CacheLevelDB:getActiveDBSize
[2023-01-31 04:48:15.867] [3:main] [error] 131711:    !Caused by: boost::filesystem::file_size: No such file or directory: "/data_dir//da_proofs_3.db/db.463/000146.log"
kladkogex commented 1 year ago

It looks like it was a corrupted database issue