codesenberg / bombardier

Fast cross-platform HTTP benchmarking tool written in Go
MIT License
6.03k stars 315 forks source link

Panic in histogram.go:53 using 1.1.1 on win/386 #27

Closed orthoxerox closed 6 years ago

orthoxerox commented 6 years ago

What version of bombardier are you using?

bombardier version v1.1.1 windows/386

What operating system and processor architecture are you using (if relevant)?

windows/386

What did you do?

bombardier -d 1m http://localhost:55555/test/00660066

What you expected to happen?

I expected it to run for 1 minute.

What actually happened?

Bombarding http://localhost:55555/test/00660066 for 1m0s using 125 connections
[============>------------------------------------------------------------] 50sp
anic: runtime error: index out of range

goroutine 167 [running]:
codesenberg/bombardier/vendor/github.com/codesenberg/concurrent/float64/histogra
m.(*Histogram).getShardFor(0x31372710, 0xe498c1cd, 0x4088ffa5, 0xfa894f1a)
        C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier
/vendor/github.com/codesenberg/concurrent/float64/histogram/histogram.go:53 +0x5
c
codesenberg/bombardier/vendor/github.com/codesenberg/concurrent/float64/histogra
m.(*Histogram).Add(0x31372710, 0xe498c1cd, 0x4088ffa5, 0x1, 0x0)
        C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier
/vendor/github.com/codesenberg/concurrent/float64/histogram/histogram.go:64 +0x3
1
codesenberg/bombardier/vendor/github.com/codesenberg/concurrent/float64/histogra
m.(*Histogram).Increment(0x31372710, 0xe498c1cd, 0x4088ffa5)
        C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier
/vendor/github.com/codesenberg/concurrent/float64/histogram/histogram.go:58 +0x3
d
main.(*bombardier).recordRps(0x31270fc0)
        C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier
/bombardier.go:259 +0x1b8
main.(*bombardier).rateMeter(0x31270fc0)
        C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier
/bombardier.go:239 +0xa5
created by main.(*bombardier).bombard
        C:/Users/frei/Documents/Go/Workspaces/Default/src/codesenberg/bombardier
/bombardier.go:273 +0xfc

This happens with no rhyme or reason I can detect. Sometimes it panics with -d 1s, sometimes it works for 10s with no issues.

codesenberg commented 6 years ago

Many thanks for reporting this. Could you confirm that fix that just landed on master actually resolves the issue?

orthoxerox commented 6 years ago

I've never compiled a go program, so this might take a wee while.

codesenberg commented 6 years ago

Fortunately, it's very easy to do. First, you gonna need to download and install Go and then it's just (provided, you added go.exe to your PATH):

go get -u github.com/codesenberg/bombardier

(the binary will end up in %GOPATH%/bin, I think)

Or, if you trust me enough, just use this version that I cross-compiled for windows/386 from master:

bombardier.zip

codesenberg commented 6 years ago

Hey, @orthoxerox, I was wondering if you had any progress with the issue.

orthoxerox commented 6 years ago

Thanks for reminding me, I'll try and test it by the end of the week.

codesenberg commented 6 years ago

@orthoxerox, well, you haven't told by the end of which week I guess. According to average life expectancy, I will be physically able to wait for approx. 2000 weeks, but I'd rather not to :smile: So, any progress with this?

orthoxerox commented 6 years ago

Sorry! Thanks for reminding me, I've transferred your build artifact to a location reachable from my work PC and will test tomorrow.

orthoxerox commented 6 years ago

Hi! I've finally gotten around to testing the new version and I no longer get any panics from bombardier.

codesenberg commented 6 years ago

Hurray! :tada: