Pallinder/go-randomdata

long running use, can cause an array out of bounds exception

jayunit100 opened this issue · 4 comments

goroutine 9 [running]:
math/rand.(*rngSource).Uint64(...)
	/usr/local/Cellar/go/1.10.3/libexec/src/math/rand/rng.go:246
math/rand.(*rngSource).Int63(0xc4200a5500, 0xc4202e8bd0)
	/usr/local/Cellar/go/1.10.3/libexec/src/math/rand/rng.go:231 +0x8a
math/rand.(*Rand).Int63(0xc420094510, 0x4)
	/usr/local/Cellar/go/1.10.3/libexec/src/math/rand/rand.go:82 +0x33
math/rand.(*Rand).Int31(0xc420094510, 0x4)
	/usr/local/Cellar/go/1.10.3/libexec/src/math/rand/rand.go:96 +0x2b
math/rand.(*Rand).Int31n(0xc420094510, 0x20f, 0x0)
	/usr/local/Cellar/go/1.10.3/libexec/src/math/rand/rand.go:131 +0x4f
math/rand.(*Rand).Intn(0xc420094510, 0x20f, 0x0)
	/usr/local/Cellar/go/1.10.3/libexec/src/math/rand/rand.go:169 +0x45
github.com/jayunit100/vuln-sim/vendor/github.com/Pallinder/go-randomdata.randomFrom(0xc4200d0000, 0x20f, 0x2c7, 0x0, 0xc4202e8b48)
	/Users/jayunit100/go/src/github.com/jayunit100/vuln-sim/vendor/github.com/Pallinder/go-randomdata/random_data.go:84 +0x37
github.com/jayunit100/vuln-sim/vendor/github.com/Pallinder/go-randomdata.Adjective(0xc4200192d8, 0x4)
	/Users/jayunit100/go/src/github.com/jayunit100/vuln-sim/vendor/github.com/Pallinder/go-randomdata/random_data.go:262 +0x45
github.com/jayunit100/vuln-sim/vendor/github.com/Pallinder/go-randomdata.SillyName(0x7ffffff7010ae51b, 0xc4202e8c68)
	/Users/jayunit100/go/src/github.com/jayunit100/vuln-sim/vendor/github.com/Pallinder/go-randomdata/random_data.go:279 +0x44
github.com/jayunit100/vuln-sim/pkg/model3.randApp(0xa, 0xc420106080, 0xc4202e8d20, 0x1011519, 0xc5f68aade0)
	/Users/jayunit100/go/src/github.com/jayunit100/vuln-sim/pkg/model3/simulator.go:154 +0x26
github.com/jayunit100/vuln-sim/pkg/model3.(*ClusterSim).initEvents.func1(0xc4200a92c0, 0xc5f68aade0, 0xc4202e8e88, 0x4, 0xc5f68a1500)
	/Users/jayunit100/go/src/github.com/jayunit100/vuln-sim/pkg/model3/simulator.go:230 +0x22e
github.com/jayunit100/vuln-sim/pkg/model3.(*ClusterSim).initEvents(0xc4200a92c0, 0xc422f7a060, 0xc4239619c0, 0xa)
	/Users/jayunit100/go/src/github.com/jayunit100/vuln-sim/pkg/model3/simulator.go:236 +0x59d
github.com/jayunit100/vuln-sim/pkg/model3.(*ClusterSim).Initialize(0xc4200a92c0)
	/Users/jayunit100/go/src/github.com/jayunit100/vuln-sim/pkg/model3/simulator.go:203 +0x1c6
github.com/jayunit100/vuln-sim/pkg/model3.(*ClusterSim).Simulate(0xc4200a92c0, 0x0)
	/Users/jayunit100/go/src/github.com/jayunit100/vuln-sim/pkg/model3/simulator.go:376 +0x34
main.ExperimentalSimulation1.func1(0xc42008a6c0, 0xc4200a92c0)
	/Users/jayunit100/go/src/github.com/jayunit100/vuln-sim/clustersim/main.go:106 +0x2b
created by main.ExperimentalSimulation1
	/Users/jayunit100/go/src/github.com/jayunit100/vuln-sim/clustersim/main.go:105 +0x122

Interesting, do you have a good way to reproduce this?

I ran github.com/ blackducksoftware/vuln-sim which uses this lib very heavily to run a simulation... for a reaaaaaaaly long time and got it, your welcome to grep around the code base if you want.

Otherwise , maybe I can get you a docker incantation to do it , will see if I can get a few minutes to try and repro again.

Docker would be awesome!

Sent with GitHawk

I thought it could be this issue golang/go#21393