celo-org / celo-blockchain

Official repository for the golang Celo Blockchain
https://celo.org
GNU Lesser General Public License v3.0
554 stars 199 forks source link

miner.TestMiner is flakey #2247

Open piersy opened 7 months ago

piersy commented 7 months ago

Test fails occasionally with panic, failed run.

This was the most recent commit on master d99a04a177fcb86921a2b013669096933f03feb4 (the actual commit doesn't exist because I force pushed that branch, but I don't think the branch would have had an effect on this test)

=== RUN   TestMiner
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa49f41]

goroutine 5 [running]:
github.com/celo-org/celo-blockchain/consensus/consensustest.(*MockEngine).Seal(0xc000332400, {0x10b87a0?, 0xc0003de000}, 0xc000096380)
    /runner/_work/celo-blockchain/celo-blockchain/consensus/consensustest/mockprotocol.go:384 +0x181
github.com/celo-org/celo-blockchain/miner.(*worker).submitTaskToEngine(0xc000228780, 0xc00003c400)
    /runner/_work/celo-blockchain/celo-blockchain/miner/worker.go:466 +0xb3
github.com/celo-org/celo-blockchain/miner.(*worker).constructAndSubmitNewBlock(0xc000228780, {0x10b7858, 0xc00003c080})
    /runner/_work/celo-blockchain/celo-blockchain/miner/worker.go:308 +0x515
github.com/celo-org/celo-blockchain/miner.(*worker).mainLoop.func1.1()
    /runner/_work/celo-blockchain/celo-blockchain/miner/worker.go:410 +0x3b
created by github.com/celo-org/celo-blockchain/miner.(*worker).mainLoop.func1
    /runner/_work/celo-blockchain/celo-blockchain/miner/worker.go:409 +0x1aa
FAIL    github.com/celo-org/celo-blockchain/miner   0.053s