panic: runtime error: slice out of range
System information
Geth version: 1.7.2 / Quorum 2.1.0
OS & Version: ubuntu (Docker)
Branch, Commit Hash or Release: 2.1.0
Expected behaviour
Geth runs normally, even with an ethstats dashboard connected.
Actual behaviour
Geth crashes when opening ethstats:
...
TRACE[09-21|17:48:51] Received message from stats server msg="map[emit:[node-pong map[clientTime:2018-09-21 17:48:51.472812893 +0000 UTC m=+75.405805524 serverTime:1.537552131473e+12]]]"
TRACE[09-21|17:48:51] Sending measured latency to ethstats latency=0
TRACE[09-21|17:48:51] Sending new block to ethstats number=0 hash=e54a4f…c66dd6
TRACE[09-21|17:48:51] Sending pending transactions to ethstats count=1
TRACE[09-21|17:48:51] Sending node details to ethstats
TRACE[09-21|17:48:51] Received message from stats server msg="map[emit:[history false]]"
WARN [09-21|17:48:51] Invalid stats history request msg=false
panic: runtime error: slice bounds out of range
goroutine 86 [running]:
github.com/ethereum/go-ethereum/ethstats.(*Service).reportHistory(0xc42009a930, 0xc420210ab0, 0x0, 0x0, 0x0, 0x0, 0x0)
/quorum-2.1.0/build/_workspace/src/github.com/ethereum/go-ethereum/ethstats/ethstats.go:617 +0x8a0
github.com/ethereum/go-ethereum/ethstats.(*Service).loop(0xc42009a930)
/quorum-2.1.0/build/_workspace/src/github.com/ethereum/go-ethereum/ethstats/ethstats.go:256 +0xc89
created by github.com/ethereum/go-ethereum/ethstats.(*Service).Start
/quorum-2.1.0/build/_workspace/src/github.com/ethereum/go-ethereum/ethstats/ethstats.go:123 +0x57
Steps to reproduce the behaviour
- Start a new node, connect it to an existing network.
- Let is synchronize with the chain (fast sync)
- While it synchronizes, node crashes
Geth startup parameters:
geth --datadir /qdata/dd --port 30303 --identity testnet-e48d0cd2-0330-44e9-8b3e-d2eb77d85049 --ethstats testnet-e48d0cd2-0330-44e9-8b3e-d2eb77d85049:uakjzmhxeogzxlahgbsv@testnet-e48d0cd2-0330-44e9-8b3e-d2eb77d85049-http.testnet.svc.cluster.local:3000 --mine --minerthreads 1 --istanbul.requesttimeout 10000 --istanbul.blockperiod 1 --emitcheckpoints --rpc --rpcport 8545 --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum --networkid 959407790 --permissioned --nodiscover --verbosity 5
Hey @michaelkunzmann-sap this code will need some review since we've ripped out pow stuff. We'll take a look.
Hi @michaelkunzmann-sap, I've not actually been able to recreate this issue, however I believe I've found the cause of it. You can see my fix here: https://github.com/jpmorganchase/quorum/pull/547
Could you test with the branch for this to see if it resolves your issue please: https://github.com/SatpalSandhu61/quorum/tree/fix-ethstats-slice-out-of-range
Thanks.
I've just realised that this is actually fixed in upstream geth under the following PR: https://github.com/ethereum/go-ethereum/pull/15869.
So it will be fixed in Quorum when we perform the upgrade to 1.8.12 (currently awaiting review/merge in the following PR: https://github.com/jpmorganchase/quorum/pull/542).
Hi @SatpalSandhu61 is there a workaround for us in production?
Hi @michaelkunzmann-sap, are you able to apply the fix and rebuild geth? It's a one line fix, which you can find here: https://github.com/ethereum/go-ethereum/pull/15869/files Other than the code change, I can't think of a workaround for it.