Skip to content

Random Fuzzer panic: invalid argument to Intn #4362

Closed

Description

Summary of Bug

go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=500 -SimulationGenesis= -SimulationVerbose=true -SimulationCommit=true -SimulationSeed=7601778 -SimulationPeriod=50 -v -timeout 24h

fails with the following error message:

--- FAIL: TestFullGaiaSimulation (0.11s)
panic: invalid argument to Intn [recovered]
        panic: invalid argument to Intn

goroutine 26 [running]:
testing.tRunner.func1(0xc0004b3e00)
        /snap/go/3739/src/testing/testing.go:830 +0x392
panic(0xe5c820, 0x1295c00)
        /snap/go/3739/src/runtime/panic.go:522 +0x1b5
math/rand.(*Rand).Intn(0xc0000f8ff0, 0x0, 0xc0004b0b40)
        /snap/go/3739/src/math/rand/rand.go:169 +0x9c
github.com/cosmos/cosmos-sdk/x/simulation.GetMemberOfInitialState(0xc0000f8ff0, 0xc00003d720, 0x3, 0x3, 0x1)
        /home/cosmos/go/src/github.com/cosmos/cosmos-sdk/x/simulation/transition_matrix.go:61 +0x57
github.com/cosmos/cosmos-sdk/x/simulation.newMockValidators(0xc0000f8ff0, 0xc001240000, 0x11, 0x24, 0x3fe8ce8eddf631bd, 0xc4, 0x3fef72b3d35c098b, 0xc00003d720, 0x3, 0x3, ...)
        /home/cosmos/go/src/github.com/cosmos/cosmos-sdk/x/simulation/mock_tendermint.go:37 +0x168
github.com/cosmos/cosmos-sdk/x/simulation.initChain(0xc0000f8ff0, 0x3fe8ce8eddf631bd, 0xc4, 0x3fef72b3d35c098b, 0xc00003d720, 0x3, 0x3, 0xc0000eab90, 0x3, 0x3, ...)
        /home/cosmos/go/src/github.com/cosmos/cosmos-sdk/x/simulation/simulate.go:47 +0x1e8
github.com/cosmos/cosmos-sdk/x/simulation.SimulateFromSeed(0x12dac80, 0xc0004b3e00, 0x12accc0, 0xc0000c2008, 0xc0000ee7e0, 0x1153ba8, 0x73fe72, 0xc00007fc20, 0xf, 0xf, ...)
        /home/cosmos/go/src/github.com/cosmos/cosmos-sdk/x/simulation/simulate.go:80 +0x604
github.com/cosmos/cosmos-sdk/cmd/gaia/app.TestFullGaiaSimulation(0xc0004b3e00)
        /home/cosmos/go/src/github.com/cosmos/cosmos-sdk/cmd/gaia/app/sim_test.go:376 +0x375
testing.tRunner(0xc0004b3e00, 0x1153b68)
        /snap/go/3739/src/testing/testing.go:865 +0xc0
created by testing.(*T).Run
        /snap/go/3739/src/testing/testing.go:916 +0x35a
FAIL    github.com/cosmos/cosmos-sdk/cmd/gaia/app       0.234s

Version

$ gaiad version --long
gaia: 0.34.3-128-g3153e934
git commit: 3153e93446ad5cda029b96c408c2bbfb1b91adc1
build tags: netgo,ledger
go version go1.12.5 linux/amd64
$ gaiacli version --long
gaia: 0.34.3-128-g3153e934
git commit: 3153e93446ad5cda029b96c408c2bbfb1b91adc1
build tags: netgo,ledger
go version go1.12.5 linux/amd64

Steps to Reproduce

go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=500 -SimulationGenesis= -SimulationVerbose=true -SimulationCommit=true -SimulationSeed=7601778 -SimulationPeriod=50 -v -timeout 24h


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions