NibiruChain / nibiru

Nibiru Chain: The breakthrough smart contract platform ushering in the next era of money. Nibiru powers an ecosystem of dApps including perps, RWAs, and more.
https://nibiru.fi
Apache License 2.0
178 stars 208 forks source link

[bug] panic: leveldb closed in x/oracle/integration #1918

Closed Unique-Divine closed 4 weeks ago

Unique-Divine commented 1 month ago

Context

I encountered a strange error in a GitHub action during the integration tests.

  1. Commit: https://github.com/NibiruChain/nibiru/commit/42a8b65e204dbcc65d1952968b2eff9b6ac447fc

  2. Note: I'm unable to reproduce it locally and only started seeing these errors after upgrading cometbft to v0.37.5 and changing the default db backend from goleveldb to PebbleDB

Error Encountered

panic: leveldb: closed

goroutine 903 [running]: github.com/cometbft/cometbft/store.(BlockStore).LoadSeenCommit(0xc001b9e240, 0x251eecc?) /home/runner/go/pkg/mod/github.com/cometbft/cometbft@v0.37.5/store/store.go:253 +0x2af github.com/cometbft/cometbft/consensus.(State).LoadCommit(0xc001b2d180, 0x3e) /home/runner/go/pkg/mod/github.com/cometbft/cometbft@v0.37.5/consensus/state.go:296 +0x114 github.com/cometbft/cometbft/consensus.(Reactor).queryMaj23Routine(0xc001454b40, {0x5c3f800, 0xc001a71a00}, 0xc001a71ad0?) /home/runner/go/pkg/mod/github.com/cometbft/cometbft@v0.37.5/consensus/reactor.go:913 +0x1092 created by github.com/cometbft/cometbft/consensus.(Reactor).AddPeer in goroutine 648 /home/runner/go/pkg/mod/github.com/cometbft/cometbft@v0.37.5/consensus/reactor.go:205 +0x37d FAIL github.com/NibiruChain/nibiru/x/oracle/integration 77.655s


Related Tickets

Unique-Divine commented 4 weeks ago

Note from @onikonychev: Using the verbose flag, "-v", in combination with race seems to remove the condition. This still needs more validation from CI runs on main, but the hypothesis seems to be correct based on the changes from https://github.com/NibiruChain/nibiru/pull/1912

Closing this for now unless the issue resurfaces