Closed
Description
We experimented with current master, and are experiencing regular crashes under reasonably high load. I haven't been able to reduce this yet, but maybe it's helpful as is? Let me know if there's something else I can provide.
$ go version
go version devel +8b186df Thu May 28 02:30:26 2015 +0000 darwin/amd64
Cross-compiled to linux/amd64.
unexpected fault address 0xc2126257a0
fatal error: fault
[signal 0xb code=0x2 addr=0xc2126257a0 pc=0xc2126257a0]
goroutine 31 [running]:
runtime.throw(0xad7840, 0x5)
/s/go/src/runtime/panic.go:527 +0x96 fp=0xc20f3eb8c0 sp=0xc20f3eb8a8
runtime.sigpanic()
/s/go/src/runtime/sigpanic_unix.go:27 +0x2ae fp=0xc20f3eb910 sp=0xc20f3eb8c0
created by realzeit.io/rtb/decision-engine/server.NewCampaign
/go/src/realzeit.io/rtb/decision-engine/server/campaign.go:40 +0x15e
goroutine 1 [select, 1 minutes]:
main.main()
/go/src/realzeit.io/rtb/one/main.go:117 +0x10e0
...
The relevant code:
28 func NewCampaign(de *bidding.DecisionEngine) *campaign {
29 c := campaign{
30 de: de,
31 requests: make(chan crequest),
32 updCamp: make(chan rzcampaign.Config),
33 updBrain: make(chan rzcampaign.BrainConfig),
34 debugStats: make(chan chan DebugStats),
35 }
36 c.wg.Add(1)
37 go func() {
38 c.loop()
39 c.wg.Done()
40 }()
41 return &c
42 }