Closed lizthegrey closed 10 months ago
another crash:
panic: runtime error: index out of range [-2]
goroutine 867 [running]:
math/rand.(*rngSource).Uint64(...)
math/rand/rng.go:249
math/rand.(*rngSource).Int63(0x8?)
math/rand/rng.go:234 +0x92
math/rand.(*Rand).Int63(...)
math/rand/rand.go:96
math/rand.(*Rand).Int31(...)
math/rand/rand.go:110
math/rand.(*Rand).Int31n(0xc0003e2d80?, 0x9258768?)
math/rand/rand.go:142 +0x6a
math/rand.(*Rand).Intn(0x0?, 0x0?)
math/rand/rand.go:183 +0x25
main.Rng.Int(...)
github.com/honeycombio/loadgen/fielder.go:89
main.Rng.HexString({0xc?}, 0x8)
github.com/honeycombio/loadgen/fielder.go:115 +0x66
main.Rng.getValueGenerators.func14()
github.com/honeycombio/loadgen/fielder.go:148 +0x45
main.(*Fielder).AddFields(0xc0000b10e0, {0xcda130, 0xc008ee5980}, 0x0, 0x6?)
github.com/honeycombio/loadgen/fielder.go:479 +0x335
main.(*SenderOTel).CreateSpan(0x3cd9a2b?, {0xcd59a0?, 0xc008ae2870?}, {0xbcdc97?, 0x2?}, 0x15?, 0x36a17197d?)
github.com/honeycombio/loadgen/sender_otel_honey.go:104 +0x41c
main.(*TraceGenerator).generate_spans(0xc0003e7340, {0xcd59a0, 0xc008ae2870}, 0x1, 0x3, 0x18, 0x6e3649ba8)
github.com/honeycombio/loadgen/generator.go:98 +0x454
main.(*TraceGenerator).generate_root(0xc000275f80?, 0xc000275f40?, 0x4, 0x19, 0x6fc23ac00)
github.com/honeycombio/loadgen/generator.go:112 +0x165
main.(*TraceGenerator).generator(0xc0003e7340, 0xc0004a6010, 0x3e6?)
github.com/honeycombio/loadgen/generator.go:140 +0x205
created by main.(*TraceGenerator).Generate in goroutine 15
github.com/honeycombio/loadgen/generator.go:193 +0x565
Looks like sharing of a seeded rand across goroutines in a non-safe way
Versions
Steps to reproduce
Run for a while.
Additional context