crypto-org-chain / cronos

Cronos is the first Ethereum-compatible blockchain network built on Cosmos SDK technology. Cronos aims to massively scale the DeFi, GameFi, and overall Web3 user community by providing builders with the ability to instantly port apps and crypto assets from other chains while benefiting from low transaction fees, high throughput, and fast finality.
Other
292 stars 234 forks source link

v1.0.2 Out of memory #811

Closed CRossel87a closed 1 year ago

CRossel87a commented 1 year ago

The new client version crashes with panic: runtime error: invalid memory address or nil pointer dereference

It is configured with rocksdb

Jan 18 08:28:35 frhb77184ds cronosd[1715750]: 8:28AM INF starting ABCI with Tendermint Jan 18 08:28:35 frhb77184ds cronosd[1715750]: 8:28AM INF service start impl=multiAppConn module=proxy msg={} server=node Jan 18 08:28:35 frhb77184ds cronosd[1715750]: 8:28AM INF service start connection=query impl=localClient module=abci-client msg={} server=node Jan 18 08:28:35 frhb77184ds cronosd[1715750]: 8:28AM INF service start connection=snapshot impl=localClient module=abci-client msg={} server=node Jan 18 08:28:35 frhb77184ds cronosd[1715750]: 8:28AM INF service start connection=mempool impl=localClient module=abci-client msg={} server=node Jan 18 08:28:35 frhb77184ds cronosd[1715750]: 8:28AM INF service start connection=consensus impl=localClient module=abci-client msg={} server=node Jan 18 08:28:35 frhb77184ds cronosd[1715750]: 8:28AM INF service start impl=EventBus module=events msg={} server=node Jan 18 08:28:35 frhb77184ds cronosd[1715750]: 8:28AM INF service start impl=PubSub module=pubsub msg={} server=node Jan 18 08:28:35 frhb77184ds cronosd[1715750]: 8:28AM INF service start impl=IndexerService module=txindex msg={} server=node Jan 18 08:28:35 frhb77184ds cronosd[1715750]: 8:28AM INF ABCI Handshake App Info hash= height=0 module=consensus protocol-version=0 server=node software-version=v1.0.1 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: 8:28AM INF ABCI Replay Blocks appHeight=0 module=consensus server=node stateHeight=6542799 storeHeight=6542800 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: 8:28AM INF initializing blockchain state from genesis.json Jan 18 08:28:35 frhb77184ds cronosd[1715750]: panic: runtime error: invalid memory address or nil pointer dereference Jan 18 08:28:35 frhb77184ds cronosd[1715750]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x128c258] Jan 18 08:28:35 frhb77184ds cronosd[1715750]: goroutine 1 [running]: Jan 18 08:28:35 frhb77184ds cronosd[1715750]: math/big.(Int).Sign(...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.18.4/share/go/src/math/big/int.go:39 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/cosmos/cosmos-sdk/types.Dec.IsNegative(...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/cosmos/cosmos-sdk/types/decimal.go:211 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/cosmos/cosmos-sdk/x/staking/types.validateMinCommissionRate({0x2771d20?, 0x0?}) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/cosmos/cosmos-sdk/x/staking/types/params.go:226 +0x58 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/cosmos/cosmos-sdk/x/params/types.Subspace.SetParamSet({{0x389fcc0, 0xc0011bc1b0}, 0xc000211378, {0x3875880, 0xc002077bd0}, {0x38758d0, 0xc002077c90}, {0xc00203bf98, 0x7, 0x18}, ...}, ...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/cosmos/cosmos-sdk/x/params/types/subspace.go:262 +0x185 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper.SetParams(...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/cosmos/cosmos-sdk/x/staking/keeper/params.go:71 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper.InitGenesis({{0x3875880, 0xc002077b80}, {0x389fcc0, 0xc0011bc1b0}, {0x3894ce0, 0xc00174a140}, {0x7f2318043928, 0xc000defe40}, {0x389faa8, 0xc001770138}, ...}, ...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/cosmos/cosmos-sdk/x/staking/keeper/genesis.go:28 +0x1c5 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/cosmos/cosmos-sdk/x/staking.AppModule.InitGenesis({{{0x38a5180, 0xc0011bc1b0}}, {{0x3875880, 0xc002077b80}, {0x389fcc0, 0xc0011bc1b0}, {0x3894ce0, 0xc00174a140}, {0x7f2318043928, 0xc000defe40}, ...}, ...}, ...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/cosmos/cosmos-sdk/x/staking/module.go:152 +0x105 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/cosmos/cosmos-sdk/types/module.(Manager).InitGenesis(, {{0x3890a58, 0xc000126000}, {0x38a06d0, 0xc000d43b00}, {{0x0, 0x0}, {0xc001508c18, 0x12}, 0x0, ...}, ...}, ...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/cosmos/cosmos-sdk/types/module/module.go:322 +0x423 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/crypto-org-chain/cronos/app.(*App).InitChainer(, {{0x3890a58, 0xc000126000}, {0x38a06d0, 0xc000d43b00}, {{0x0, 0x0}, {0xc001508c18, 0x12}, 0x0, ...}, ...}, ...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/app/app.go:803 +0x1cf Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/cosmos/cosmos-sdk/baseapp.(BaseApp).InitChain(0xc0001c9500, {{0x0, 0xed91a6d90, 0x0}, {0xc001508c18, 0x12}, 0xc00129f9e0, {0x4ee02e8, 0x0, 0x0}, ...}) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/cosmos/cosmos-sdk/baseapp/abci.go:71 +0x3f5 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/tendermint/tendermint/abci/client.(localClient).InitChainSync(0xc0017462a0, {{0x0, 0xed91a6d90, 0x0}, {0xc001508c18, 0x12}, 0xc00129f9e0, {0x4ee02e8, 0x0, 0x0}, ...}) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/tendermint/tendermint/abci/client/local_client.go:272 +0x118 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/tendermint/tendermint/proxy.(appConnConsensus).InitChainSync(0x0?, {{0x0, 0xed91a6d90, 0x0}, {0xc001508c18, 0x12}, 0xc00129f9e0, {0x4ee02e8, 0x0, 0x0}, ...}) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/tendermint/tendermint/proxy/app_conn.go:77 +0x55 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/tendermint/tendermint/consensus.(Handshaker).ReplayBlocks(, {{{0xb, 0x0}, {0xc0015ef4d8, 0x7}}, {0xc001508c60, 0x12}, 0x1, 0x63d5cf, {{0xc0013610e0, ...}, ...}, ...}, ...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/tendermint/tendermint/consensus/replay.go:319 +0xd78 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc0020212d8, {0x38a2658, 0xc00011ec30}) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/tendermint/tendermint/consensus/replay.go:268 +0x3c8 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/tendermint/tendermint/node.doHandshake({, }, {{{0xb, 0x0}, {0xc0015ef4d8, 0x7}}, {0xc001508c60, 0x12}, 0x1, 0x63d5cf, ...}, ...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/tendermint/tendermint/node/node.go:329 +0x1b8 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/tendermint/tendermint/node.NewNode(0xc0002c3040, {0x388ce20, 0xc00150f4a0}, 0xc001518c70, {0x386c900, 0xc001771e30}, 0x1?, 0x4ee02e8?, 0xc001518e00, {0x3891fc8, ...}, ...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/tendermint/tendermint/node/node.go:777 +0x597 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/evmos/ethermint/server.startInProcess(, {{0x0, 0x0, 0x0}, {0x38ac0f0, 0xc0012ab680}, 0x0, {0x0, 0x0}, {0x38a5180, ...}, ...}, ...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/evmos/ethermint/server/start.go:322 +0xe47 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/evmos/ethermint/server.StartCmd.func2(0xc0016fb500?, {0xc001734760?, 0x0?, 0x2?}) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/evmos/ethermint/server/start.go:123 +0x1ec Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/spf13/cobra.(Command).execute(0xc0016fb500, {0xc001734740, 0x2, 0x2}) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/spf13/cobra/command.go:916 +0x862 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/spf13/cobra.(Command).ExecuteC(0xc00176cc00) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/spf13/cobra/command.go:1044 +0x3bc Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/spf13/cobra.(Command).Execute(...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/spf13/cobra/command.go:968 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/spf13/cobra.(Command).ExecuteContext(...) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/spf13/cobra/command.go:961 Jan 18 08:28:35 frhb77184ds cronosd[1715750]: github.com/cosmos/cosmos-sdk/server/cmd.Execute(0x2218220?, {0x279c094, 0x6}, {0xc0011a2468, 0x17}) Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/vendor/github.com/cosmos/cosmos-sdk/server/cmd/execute.go:36 +0x20f Jan 18 08:28:35 frhb77184ds cronosd[1715750]: main.main() Jan 18 08:28:35 frhb77184ds cronosd[1715750]: /build/nx6zslxd97vghqsnm4nvjbz0m07ylg5d-source/cmd/cronosd/main.go:13 +0x38 Jan 18 08:28:35 frhb77184ds systemd[1]: cronos.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

mmsqe commented 1 year ago

@CRossel87a it's error when validateMinCommissionRate, but upgrade shouldn't need InitGenesis?

yihuang commented 1 year ago

Looks like operation issue some where, it shouldn't do InitGenesis here, do you get the app-db-backend right?

CRossel87a commented 1 year ago

Issue was resolved by changing from: app-db-backend = ""

to: app-db-backend = "rocksdb"