ByteArena / backends

Byte Arena - Digital playground for Autonomous agents
https://get.bytearena.com
1 stars 0 forks source link

[arenamaster] WaitGroup misuse #201

Closed xtuc closed 6 years ago

xtuc commented 6 years ago
{"time":"2017-10-16T08:18:43Z","lvl":"debug","service":"healthcheck","message":"Arena 00:f0:a3:b1:97:a5 reported health OK","context":{"hostname":"sd-58059"}}
{"time":"2017-10-16T08:18:47Z","lvl":"debug","service":"vm","message":"VM (4) booted","context":{"hostname":"sd-58059"}}
{"time":"2017-10-16T08:18:47Z","lvl":"debug","service":"master","message":"Provisioning new VM","context":{"hostname":"sd-58059"}}
panic: sync: negative WaitGroup counter

goroutine 62 [running]:
sync.(*WaitGroup).Add(0xc42018e1f8, 0xffffffffffffffff)
        /usr/local/go/src/sync/waitgroup.go:75 +0x1c9
sync.(*WaitGroup).Done(0xc42018e1f8)
        /usr/local/go/src/sync/waitgroup.go:100 +0x34
github.com/bytearena/bytearena/vendor/github.com/bytearena/schnapps/scheduler.(*Pool).consumeEvents(0xc42018e1c0)
        /go/src/github.com/bytearena/bytearena/vendor/github.com/bytearena/schnapps/scheduler/scheduler.go:229 +0x216
created by github.com/bytearena/bytearena/vendor/github.com/bytearena/schnapps/scheduler.NewFixedVMPool
        /go/src/github.com/bytearena/bytearena/vendor/github.com/bytearena/schnapps/scheduler/scheduler.go:60 +0x2d1
xtuc commented 6 years ago

Fixed in https://github.com/ByteArena/schnapps/commit/7644079353489a611912efd93f1c8fe161fc95cc