nakabonne/ali

Panic when running at high rate

nakabonne opened this issue · 5 comments

What's happened

ali -r 0 -d 2s http://host.xz

Then:
image

Possible Causes

It's probably due to the time it takes to draw to all the charts. Maybe we should each spawn goroutine.

ali/gui/drawer.go

Lines 66 to 84 in 2711e42

valuesP50 = appendValue(valuesP50, res.P50)
d.widgets.percentilesChart.Series("p50", valuesP50,
linechart.SeriesCellOpts(d.widgets.p50Legend.cellOpts...),
)
valuesP90 = appendValue(valuesP90, res.P90)
d.widgets.percentilesChart.Series("p90", valuesP90,
linechart.SeriesCellOpts(d.widgets.p90Legend.cellOpts...),
)
valuesP95 = appendValue(valuesP95, res.P95)
d.widgets.percentilesChart.Series("p95", valuesP95,
linechart.SeriesCellOpts(d.widgets.p95Legend.cellOpts...),
)
valuesP99 = appendValue(valuesP99, res.P99)
d.widgets.percentilesChart.Series("p99", valuesP99,
linechart.SeriesCellOpts(d.widgets.p99Legend.cellOpts...),
)

can I give it a try?

More stacktraces:

goroutine 21 [running]:                                                       ││Min: 12.305µs                                                                ││                                                                             ││                                                                              ││Latest: 2020-10-19T01:48:43Z                                                   │
runtime.throw(0x141a5c3, 0x26)                                                ││                                                                             ││                                                                             ││                                                                              ││End: 2020-10-19T01:48:43Z                                                      │
│       /usr/local/Cellar/go/1.15.2/libexec/src/runtime/panic.go:1116 +0x72 fp=0xc000159c48 sp=0xc000159c18 pc=0x1036992                                     ││                                                                             ││                                                                              ││                                                                               │
runtime.mapiternext(0xc000159e48)                                             ││                                                                             ││                                                                             │└──────────────────────────────────────────────────────────────────────────────┘│                                                                               │
│       /usr/local/Cellar/go/1.15.2/libexec/src/runtime/map.go:853 +0x554 fp=0xc000159cc8 sp=0xc000159c48 pc=0x10127b4                                       ││                                                                             │┌Errors────────────────────────────────────────────────────────────────────────┐│                                                                               │
github.com/nakabonne/ali/gui.(*drawer).redrawMetrics(0xc000214540, 0x1481880, 0xc00020a080)                                                                  ││                                                                             ││- Get "http://34.84.111.163:9898": dial tcp 0.0.0.0:0->34.84.111.163:9898:    ││                                                                               │
│       /Users/s07726/src/github.com/nakabonne/ali/gui/drawer.go:178 +0xb19 fp=0xc000159fc8 sp=0xc000159cc8 pc=0x13507b9                                     ││                                                                             ││socket: too many open files                                                   ││                                                                               │
runtime.goexit()                                                              ││                                                                             ││                                                                             ││                                                                              ││                                                                               │
│       /usr/local/Cellar/go/1.15.2/libexec/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000159fd0 sp=0xc000159fc8 pc=0x106b081                                   ││                                                                             ││                                                                              ││                                                                               │
created by github.com/nakabonne/ali/gui.run                                   ││                                                                             ││                                                                             ││                                                                              ││                                                                               │
│       /Users/s07726/src/github.com/nakabonne/ali/gui/gui.go:76 +0x5cc       ││                                                                             ││                                                                             ││                                                                              ││                                                                               │
│                                                                             ││                                                                             ││                                                                             ││                                                                              ││                                                                               │
goroutine 1 [select]:                                                         ││                                                                             ││                                                                             ││                                                                              ││                                                                               │
github.com/mum4k/termdash.(*termdash).start(0xc00021a480, 0x1481880, 0xc0000aa140, 0x0, 0x0)                                                                 ││                                                                             ││                                                                              ││                                                                               │
│       /Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/termdash.go:342 +0x1fb                                                                    ││                                                                             ││                                                                              ││                                                                               │
github.com/mum4k/termdash.Run(0x1481880, 0xc00020a080, 0x14839a0, 0xc00020c000, 0xc000212000, 0xc00020cc00, 0x2, 0x2, 0x77359400, 0x6fc23ac00)───────────────┘└─────────────────────────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────────────────────────┘└───────────────────────────────────────────────────────────────────────────────┘
┌Progres/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/termdash.go:108 +0x94─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
github.com/nakabonne/ali/gui.run(0x14839a0, 0xc00020c000, 0x1429e58, 0x7ffeefbff692, 0x19, 0xc0001c6000, 0x0, 0x0)                                                                                                                           ││Ctrl-C: quit, Enter: attack, l: next chart, h: prev chart                                                                                                     │
│       /Users/s07726/src/github.com/nakabonne/ali/gui/gui.go:80 +0x7bb                                               0%                                                                                                                     ││                                                                                                                                                              │
github.com/nakabonne/ali/gui.Run(0x7ffeefbff692, 0x19, 0xc0001c6000, 0x0, 0x0)                                                                                                                                                               ││                                                                                                                                                              │
│       /Users/s07726/src/github.com/nakabonne/ali/gui/gui.go:44 +0x16a                                                                                                                                                                      ││                                                                                                                                                              │
main.(*cli).run(0xc0001681c0, 0xc00018c390, 0x1, 0x3, 0xc0001681c0)──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
	/Users/s07726/src/github.com/nakabonne/ali/main.go:120 +0x19a
main.main()
	/Users/s07726/src/github.com/nakabonne/ali/main.go:61 +0x8f

goroutine 7 [syscall]:
os/signal.signal_recv(0x147ed00)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/sigqueue.go:144 +0x9d
os/signal.loop()
	/usr/local/Cellar/go/1.15.2/libexec/src/os/signal/signal_unix.go:23 +0x25
created by os/signal.Notify.func1.1
	/usr/local/Cellar/go/1.15.2/libexec/src/os/signal/signal.go:150 +0x45

goroutine 18 [select]:
github.com/nsf/termbox-go.Init.func1()
	/Users/s07726/go/pkg/mod/github.com/nsf/termbox-go@v0.0.0-20200204031403-4d2b513ad8be/api.go:98 +0x332
created by github.com/nsf/termbox-go.Init
	/Users/s07726/go/pkg/mod/github.com/nsf/termbox-go@v0.0.0-20200204031403-4d2b513ad8be/api.go:95 +0x6b0

goroutine 19 [select]:
github.com/mum4k/termdash/private/event/eventqueue.(*Unbound).wake(0xc00020a000)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:71 +0xfe
created by github.com/mum4k/termdash/private/event/eventqueue.New
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:60 +0xcb

goroutine 20 [select]:
github.com/nsf/termbox-go.PollEvent(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/s07726/go/pkg/mod/github.com/nsf/termbox-go@v0.0.0-20200204031403-4d2b513ad8be/api.go:342 +0x249
github.com/mum4k/termdash/terminal/termbox.(*Terminal).pollEvents(0xc00020c000)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/terminal/termbox/termbox.go:142 +0x5d
created by github.com/mum4k/termdash/terminal/termbox.New
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/terminal/termbox/termbox.go:95 +0xb9

goroutine 22 [select]:
github.com/mum4k/termdash/private/event/eventqueue.(*Unbound).wake(0xc00020a800)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:71 +0xfe
created by github.com/mum4k/termdash/private/event/eventqueue.New
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:60 +0xcb

goroutine 23 [sync.Cond.Wait]:
runtime.goparkunlock(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/proc.go:312
sync.runtime_notifyListWait(0xc00020a850, 0xc00000008b)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/sema.go:513 +0xf8
sync.(*Cond).Wait(0xc00020a840)
	/usr/local/Cellar/go/1.15.2/libexec/src/sync/cond.go:56 +0x9d
github.com/mum4k/termdash/private/event/eventqueue.(*Unbound).Pull(0xc00020a800, 0x1481880, 0xc00020a7c0, 0x0, 0x0)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:154 +0xab
github.com/mum4k/termdash/private/event.(*subscriber).run(0xc00020a880, 0x1481880, 0xc00020a7c0)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/event.go:108 +0x4c
created by github.com/mum4k/termdash/private/event.newSubscriber
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/event.go:89 +0x245

goroutine 24 [select]:
github.com/mum4k/termdash/private/event/eventqueue.(*Unbound).wake(0xc00020a900)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:71 +0xfe
created by github.com/mum4k/termdash/private/event/eventqueue.New
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:60 +0xcb

goroutine 25 [sync.Cond.Wait]:
runtime.goparkunlock(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/proc.go:312
sync.runtime_notifyListWait(0xc00020a950, 0xc00000008b)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/sema.go:513 +0xf8
sync.(*Cond).Wait(0xc00020a940)
	/usr/local/Cellar/go/1.15.2/libexec/src/sync/cond.go:56 +0x9d
github.com/mum4k/termdash/private/event/eventqueue.(*Unbound).Pull(0xc00020a900, 0x1481880, 0xc00020a8c0, 0x0, 0x0)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:154 +0xab
github.com/mum4k/termdash/private/event.(*subscriber).run(0xc00020a980, 0x1481880, 0xc00020a8c0)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/event.go:108 +0x4c
created by github.com/mum4k/termdash/private/event.newSubscriber
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/event.go:89 +0x245

goroutine 26 [select]:
github.com/mum4k/termdash/private/event/eventqueue.(*Unbound).wake(0xc00020aa00)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:71 +0xfe
created by github.com/mum4k/termdash/private/event/eventqueue.New
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:60 +0xcb

goroutine 27 [sync.Cond.Wait]:
runtime.goparkunlock(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/proc.go:312
sync.runtime_notifyListWait(0xc00020aa50, 0xc00000008d)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/sema.go:513 +0xf8
sync.(*Cond).Wait(0xc00020aa40)
	/usr/local/Cellar/go/1.15.2/libexec/src/sync/cond.go:56 +0x9d
github.com/mum4k/termdash/private/event/eventqueue.(*Unbound).Pull(0xc00020aa00, 0x1481880, 0xc00020a9c0, 0x0, 0x0)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:154 +0xab
github.com/mum4k/termdash/private/event/eventqueue.(*Throttled).Pull(0xc00020ee90, 0x1481880, 0xc00020a9c0, 0x1479aa0, 0xc003d3e000)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:225 +0x45
github.com/mum4k/termdash/private/event.(*subscriber).run(0xc00020aa80, 0x1481880, 0xc00020a9c0)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/event.go:108 +0x4c
created by github.com/mum4k/termdash/private/event.newSubscriber
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/event.go:89 +0x245

goroutine 28 [select]:
github.com/mum4k/termdash/private/event/eventqueue.(*Unbound).wake(0xc00020ab00)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:71 +0xfe
created by github.com/mum4k/termdash/private/event/eventqueue.New
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:60 +0xcb

goroutine 29 [sync.Cond.Wait]:
runtime.goparkunlock(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/proc.go:312
sync.runtime_notifyListWait(0xc00020ab50, 0xc00000008d)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/sema.go:513 +0xf8
sync.(*Cond).Wait(0xc00020ab40)
	/usr/local/Cellar/go/1.15.2/libexec/src/sync/cond.go:56 +0x9d
github.com/mum4k/termdash/private/event/eventqueue.(*Unbound).Pull(0xc00020ab00, 0x1481880, 0xc00020aac0, 0x0, 0x0)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:154 +0xab
github.com/mum4k/termdash/private/event.(*subscriber).run(0xc00020ab80, 0x1481880, 0xc00020aac0)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/event.go:108 +0x4c
created by github.com/mum4k/termdash/private/event.newSubscriber
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/event.go:89 +0x245

goroutine 30 [select]:
github.com/mum4k/termdash/private/event/eventqueue.(*Unbound).wake(0xc00020ac00)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:71 +0xfe
created by github.com/mum4k/termdash/private/event/eventqueue.New
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:60 +0xcb

goroutine 31 [sync.Cond.Wait]:
runtime.goparkunlock(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/proc.go:312
sync.runtime_notifyListWait(0xc00020ac50, 0xc00000008d)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/sema.go:513 +0xf8
sync.(*Cond).Wait(0xc00020ac40)
	/usr/local/Cellar/go/1.15.2/libexec/src/sync/cond.go:56 +0x9d
github.com/mum4k/termdash/private/event/eventqueue.(*Unbound).Pull(0xc00020ac00, 0x1481880, 0xc00020abc0, 0x0, 0x0)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:154 +0xab
github.com/mum4k/termdash/private/event/eventqueue.(*Throttled).Pull(0xc00020eed0, 0x1481880, 0xc00020abc0, 0x1479aa0, 0xc003d3e000)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:225 +0x45
github.com/mum4k/termdash/private/event.(*subscriber).run(0xc00020ac80, 0x1481880, 0xc00020abc0)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/event.go:108 +0x4c
created by github.com/mum4k/termdash/private/event.newSubscriber
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/event.go:89 +0x245

goroutine 10 [sync.Cond.Wait]:
runtime.goparkunlock(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/proc.go:312
sync.runtime_notifyListWait(0xc00020a050, 0xc00000008d)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/sema.go:513 +0xf8
sync.(*Cond).Wait(0xc00020a040)
	/usr/local/Cellar/go/1.15.2/libexec/src/sync/cond.go:56 +0x9d
github.com/mum4k/termdash/private/event/eventqueue.(*Unbound).Pull(0xc00020a000, 0x1481880, 0xc0000aa140, 0x0, 0x0)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/private/event/eventqueue/eventqueue.go:154 +0xab
github.com/mum4k/termdash/terminal/termbox.(*Terminal).Event(0xc00020c000, 0x1481880, 0xc0000aa140, 0x1479aa0, 0xc003d3e000)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/terminal/termbox/termbox.go:151 +0x45
github.com/mum4k/termdash.(*termdash).processEvents(0xc00021a480, 0x1481880, 0xc0000aa140)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/termdash.go:310 +0x79
created by github.com/mum4k/termdash.(*termdash).start
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/termdash.go:339 +0x12c

goroutine 50 [runnable]:
github.com/mum4k/termdash/widgets/linechart.minMax(0xc001e00000, 0xab23, 0xab23, 0xc001e00000, 0x27)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/widgets/linechart/linechart.go:539 +0x7c
github.com/mum4k/termdash/widgets/linechart.newSeriesValues(0xc00a51a000, 0xab23, 0xc000, 0xc00016c140)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/widgets/linechart/linechart.go:60 +0x8a
github.com/mum4k/termdash/widgets/linechart.(*LineChart).Series(0xc000216000, 0x140ddde, 0x7, 0xc00a51a000, 0xab23, 0xc000, 0xc0033f80a0, 0x2, 0x2, 0x0, ...)
	/Users/s07726/go/pkg/mod/github.com/mum4k/termdash@v0.12.2/widgets/linechart/linechart.go:212 +0xbd
github.com/nakabonne/ali/gui.(*drawer).redrawChart(0xc000214540, 0x1481880, 0xc00020a080, 0x0)
	/Users/s07726/src/github.com/nakabonne/ali/gui/drawer.go:59 +0x62f
created by github.com/nakabonne/ali/gui.attack
	/Users/s07726/src/github.com/nakabonne/ali/gui/keybinds.go:56 +0xc8

goroutine 51 [runnable]:
github.com/nakabonne/ali/gui.(*drawer).redrawGauge(0xc000214540, 0x1481880, 0xc00020a080, 0x0)
	/Users/s07726/src/github.com/nakabonne/ali/gui/drawer.go:95 +0x191
created by github.com/nakabonne/ali/gui.attack
	/Users/s07726/src/github.com/nakabonne/ali/gui/keybinds.go:57 +0x114

goroutine 52 [runnable]:
math.asin(0xbfdabc3e2bccdc5c, 0x40425af1e5f4ad25)
	/usr/local/Cellar/go/1.15.2/libexec/src/math/asin.go:21 +0x125
github.com/influxdata/tdigest.(*TDigest).integratedLocation(...)
	/Users/s07726/go/pkg/mod/github.com/influxdata/tdigest@v0.0.0-20180711151920-a7d76c6f093a/tdigest.go:202
github.com/influxdata/tdigest.(*TDigest).process(0xc0007f4280)
	/Users/s07726/go/pkg/mod/github.com/influxdata/tdigest@v0.0.0-20180711151920-a7d76c6f093a/tdigest.go:93 +0x379
github.com/influxdata/tdigest.(*TDigest).Quantile(0xc0007f4280, 0x3fe0000000000000, 0xc000357af8)
	/Users/s07726/go/pkg/mod/github.com/influxdata/tdigest@v0.0.0-20180711151920-a7d76c6f093a/tdigest.go:118 +0x2f
github.com/tsenart/vegeta/v12/lib.(*tdigestEstimator).Get(0xc00068a248, 0x3fe0000000000000, 0xc000122698)
	/Users/s07726/go/pkg/mod/github.com/tsenart/vegeta/v12@v12.8.3/lib/metrics.go:200 +0x3a
github.com/tsenart/vegeta/v12/lib.LatencyMetrics.Quantile(0x4b661df846, 0x0, 0x0, 0x0, 0x0, 0x0, 0x27c3584, 0x3011, 0x147d600, 0xc00068a248, ...)
	/Users/s07726/go/pkg/mod/github.com/tsenart/vegeta/v12@v12.8.3/lib/metrics.go:168 +0x45
github.com/nakabonne/ali/attacker.Attack(0x1481880, 0xc00020a080, 0x7ffeefbff692, 0x19, 0xc000208120, 0xc0002081e0, 0x0, 0x77359400, 0x6fc23ac00, 0x140c50b, ...)
	/Users/s07726/src/github.com/nakabonne/ali/attacker/attacker.go:134 +0x566
github.com/nakabonne/ali/gui.attack.func1(0x1481880, 0xc00020a080, 0xc000214540, 0x7ffeefbff692, 0x19, 0x0, 0x77359400, 0x6fc23ac00, 0x140c50b, 0x3, ...)
	/Users/s07726/src/github.com/nakabonne/ali/gui/keybinds.go:59 +0xb8
created by github.com/nakabonne/ali/gui.attack
	/Users/s07726/src/github.com/nakabonne/ali/gui/keybinds.go:58 +0x19a

goroutine 53 [select]:
github.com/nakabonne/ali/attacker.sendMetrics(0x1481880, 0xc00020a100, 0xc0001225a0, 0xc0002081e0, 0xc00054c0a8)
	/Users/s07726/src/github.com/nakabonne/ali/attacker/attacker.go:158 +0x145
created by github.com/nakabonne/ali/attacker.Attack
	/Users/s07726/src/github.com/nakabonne/ali/attacker/attacker.go:124 +0x325

goroutine 64 [semacquire]:
sync.runtime_Semacquire(0xc00054c0c8)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/sema.go:56 +0x45
sync.(*WaitGroup).Wait(0xc00054c0c0)
	/usr/local/Cellar/go/1.15.2/libexec/src/sync/waitgroup.go:130 +0x65
github.com/tsenart/vegeta/v12/lib.(*Attacker).Attack.func1(0xc0000a62a0, 0xc00054c0c0, 0xc0000a6300, 0x77359400, 0x147e780, 0xc00054c0b0, 0xc00054c0d0, 0xc00022a120, 0xc0007c4930, 0x140c9f1, ...)
	/Users/s07726/go/pkg/mod/github.com/tsenart/vegeta/v12@v12.8.3/lib/attack.go:291 +0x4fb
created by github.com/tsenart/vegeta/v12/lib.(*Attacker).Attack
	/Users/s07726/go/pkg/mod/github.com/tsenart/vegeta/v12@v12.8.3/lib/attack.go:282 +0x21d

goroutine 929 [IO wait]:
internal/poll.runtime_pollWait(0x1d95af8, 0x72, 0x147aee0)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/netpoll.go:220 +0x55
internal/poll.(*pollDesc).wait(0xc00036eb18, 0x72, 0xc000574000, 0x1000, 0x1000)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc00036eb00, 0xc000574000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_unix.go:159 +0x1b1
net.(*netFD).Read(0xc00036eb00, 0xc000574000, 0x1000, 0x1000, 0x103961c, 0xc000b0ab58, 0x1063a40)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000010708, 0xc000574000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/net.go:182 +0x8e
net/http.(*persistConn).Read(0xc00036cb40, 0xc000574000, 0x1000, 0x1000, 0xc000565500, 0xc000b0ac58, 0x1007475)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1887 +0x77
bufio.(*Reader).fill(0xc00097d860)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:101 +0x105
bufio.(*Reader).Peek(0xc00097d860, 0x1, 0x0, 0x0, 0x1, 0x0, 0xc00a3bd980)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:139 +0x4f
net/http.(*persistConn).readLoop(0xc00036cb40)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:2040 +0x1a8
created by net/http.(*Transport).dialConn
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1708 +0xcb7

goroutine 831 [IO wait]:
internal/poll.runtime_pollWait(0x75a3fc0, 0x72, 0x147aee0)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/netpoll.go:220 +0x55
internal/poll.(*pollDesc).wait(0xc000192518, 0x72, 0xc000b46000, 0x1000, 0x1000)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000192500, 0xc000b46000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_unix.go:159 +0x1b1
net.(*netFD).Read(0xc000192500, 0xc000b46000, 0x1000, 0x1000, 0x103961c, 0xc000928b58, 0x1063a40)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000190368, 0xc000b46000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/net.go:182 +0x8e
net/http.(*persistConn).Read(0xc000122d80, 0xc000b46000, 0x1000, 0x1000, 0xc00094bbc0, 0xc000928c58, 0x1007475)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1887 +0x77
bufio.(*Reader).fill(0xc000959f20)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:101 +0x105
bufio.(*Reader).Peek(0xc000959f20, 0x1, 0x0, 0x0, 0x1, 0x0, 0xc000d34720)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:139 +0x4f
net/http.(*persistConn).readLoop(0xc000122d80)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:2040 +0x1a8
created by net/http.(*Transport).dialConn
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1708 +0xcb7

goroutine 939 [select]:
net/http.(*persistConn).writeLoop(0xc000122fc0)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:2340 +0x11c
created by net/http.(*Transport).dialConn
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1709 +0xcdc

goroutine 585 [IO wait]:
internal/poll.runtime_pollWait(0x1f11a58, 0x72, 0x147aee0)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/netpoll.go:220 +0x55
internal/poll.(*pollDesc).wait(0xc0001e4198, 0x72, 0xc00098e000, 0x1000, 0x1000)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0001e4180, 0xc00098e000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_unix.go:159 +0x1b1
net.(*netFD).Read(0xc0001e4180, 0xc00098e000, 0x1000, 0x1000, 0x103961c, 0xc000927b58, 0x1063a40)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000190260, 0xc00098e000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/net.go:182 +0x8e
net/http.(*persistConn).Read(0xc0001e2120, 0xc00098e000, 0x1000, 0x1000, 0xc0006037a0, 0xc000927c58, 0x1007475)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1887 +0x77
bufio.(*Reader).fill(0xc0003f52c0)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:101 +0x105
bufio.(*Reader).Peek(0xc0003f52c0, 0x1, 0x0, 0x0, 0x1, 0x0, 0xc009538900)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:139 +0x4f
net/http.(*persistConn).readLoop(0xc0001e2120)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:2040 +0x1a8
created by net/http.(*Transport).dialConn
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1708 +0xcb7

goroutine 882 [IO wait]:
internal/poll.runtime_pollWait(0x75a4180, 0x72, 0x147aee0)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/netpoll.go:220 +0x55
internal/poll.(*pollDesc).wait(0xc0005c8398, 0x72, 0xc000658000, 0x1000, 0x1000)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0005c8380, 0xc000658000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_unix.go:159 +0x1b1
net.(*netFD).Read(0xc0005c8380, 0xc000658000, 0x1000, 0x1000, 0x103961c, 0xc000b58b58, 0x1063a40)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc0006ae210, 0xc000658000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/net.go:182 +0x8e
net/http.(*persistConn).Read(0xc0005c6360, 0xc000658000, 0x1000, 0x1000, 0xc000b04f00, 0xc000b58c58, 0x1007475)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1887 +0x77
bufio.(*Reader).fill(0xc0008f6540)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:101 +0x105
bufio.(*Reader).Peek(0xc0008f6540, 0x1, 0x0, 0x0, 0x1, 0x0, 0xc00a57e900)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:139 +0x4f
net/http.(*persistConn).readLoop(0xc0005c6360)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:2040 +0x1a8
created by net/http.(*Transport).dialConn
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1708 +0xcb7

goroutine 581 [IO wait]:
internal/poll.runtime_pollWait(0x1f11f98, 0x72, 0x147aee0)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/netpoll.go:220 +0x55
internal/poll.(*pollDesc).wait(0xc000636298, 0x72, 0xc00098a000, 0x1000, 0x1000)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000636280, 0xc00098a000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_unix.go:159 +0x1b1
net.(*netFD).Read(0xc000636280, 0xc00098a000, 0x1000, 0x1000, 0x103961c, 0xc00071fb58, 0x1063a40)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000190250, 0xc00098a000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/net.go:182 +0x8e
net/http.(*persistConn).Read(0xc000634360, 0xc00098a000, 0x1000, 0x1000, 0xc0003b7bc0, 0xc00071fc58, 0x1007475)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1887 +0x77
bufio.(*Reader).fill(0xc0003f5080)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:101 +0x105
bufio.(*Reader).Peek(0xc0003f5080, 0x1, 0x0, 0x0, 0x1, 0x0, 0xc00a3ff920)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:139 +0x4f
net/http.(*persistConn).readLoop(0xc000634360)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:2040 +0x1a8
created by net/http.(*Transport).dialConn
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1708 +0xcb7

goroutine 800 [chan send]:
github.com/tsenart/vegeta/v12/lib.(*Attacker).attack(0xc00022a120, 0xc0007c4930, 0x140c9f1, 0x4, 0xc00054c0c0, 0xc0000a6300, 0xc0000a62a0)
	/Users/s07726/go/pkg/mod/github.com/tsenart/vegeta/v12@v12.8.3/lib/attack.go:341 +0x9c
created by github.com/tsenart/vegeta/v12/lib.(*Attacker).Attack.func1
	/Users/s07726/go/pkg/mod/github.com/tsenart/vegeta/v12@v12.8.3/lib/attack.go:312 +0x411

goroutine 809 [IO wait]:
internal/poll.runtime_pollWait(0x75a3460, 0x72, 0x147aee0)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/netpoll.go:220 +0x55
internal/poll.(*pollDesc).wait(0xc000746598, 0x72, 0xc00097e000, 0x1000, 0x1000)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000746580, 0xc00097e000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_unix.go:159 +0x1b1
net.(*netFD).Read(0xc000746580, 0xc00097e000, 0x1000, 0x1000, 0x103961c, 0xc000b4eb58, 0x1063a40)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc00047e3a0, 0xc00097e000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/net.go:182 +0x8e
net/http.(*persistConn).Read(0xc00074a5a0, 0xc00097e000, 0x1000, 0x1000, 0xc0005640c0, 0xc000b4ec58, 0x1007475)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1887 +0x77
bufio.(*Reader).fill(0xc00097c000)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:101 +0x105
bufio.(*Reader).Peek(0xc00097c000, 0x1, 0x0, 0x0, 0x1, 0x0, 0xc00eeb55c0)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:139 +0x4f
net/http.(*persistConn).readLoop(0xc00074a5a0)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:2040 +0x1a8
created by net/http.(*Transport).dialConn
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1708 +0xcb7

goroutine 925 [IO wait]:
internal/poll.runtime_pollWait(0x1f84f40, 0x72, 0x147aee0)
	/usr/local/Cellar/go/1.15.2/libexec/src/runtime/netpoll.go:220 +0x55
internal/poll.(*pollDesc).wait(0xc0001e4698, 0x72, 0xc000570000, 0x1000, 0x1000)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0001e4680, 0xc000570000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/internal/poll/fd_unix.go:159 +0x1b1
net.(*netFD).Read(0xc0001e4680, 0xc000570000, 0x1000, 0x1000, 0x103961c, 0xc000ba1b58, 0x1063a40)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc0000106f8, 0xc000570000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/net.go:182 +0x8e
net/http.(*persistConn).Read(0xc0001e25a0, 0xc000570000, 0x1000, 0x1000, 0xc000564d80, 0xc000ba1c58, 0x1007475)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1887 +0x77
bufio.(*Reader).fill(0xc00097d4a0)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:101 +0x105
bufio.(*Reader).Peek(0xc00097d4a0, 0x1, 0x0, 0x0, 0x1, 0x0, 0xc00a3fe5a0)
	/usr/local/Cellar/go/1.15.2/libexec/src/bufio/bufio.go:139 +0x4f
net/http.(*persistConn).readLoop(0xc0001e25a0)
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:2040 +0x1a8
created by net/http.(*Transport).dialConn
	/usr/local/Cellar/go/1.15.2/libexec/src/net/http/transport.go:1708 +0xcb7

@yzwdroid Yup, I hope you'll give it a try :D

LineChart.Series seems to be the biggest bottleneck, so we need to make sure that this does not block the process.

ali/gui/drawer.go

Lines 59 to 64 in 2711e42

d.widgets.latencyChart.Series("latency", values,
linechart.SeriesCellOpts(cell.FgColor(cell.ColorNumber(87))),
linechart.SeriesXLabels(map[int]string{
0: "req",
}),
)

ali/gui/drawer.go

Lines 67 to 69 in 2711e42

d.widgets.percentilesChart.Series("p50", valuesP50,
linechart.SeriesCellOpts(d.widgets.p50Legend.cellOpts...),
)

For instance, it might be good to call this at the interval specified as redrawInterval.

@yzwdroid I'm so sorry, but it's a critical issue so I've addressed it. It would be nice if you help me another time.