smira / go-statsd

Go statsd client library with zero allocation overhead, great performance and reconnects
MIT License
109 stars 18 forks source link

Panic in reportLoop when built with GOARCH=386 #30

Closed jeremycw closed 3 years ago

jeremycw commented 3 years ago

When build with GOARCH=386 I get this whenever reportLoop ticks:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8049fcc]
goroutine 8 [running]:
runtime/internal/atomic.Xchg64(0xa8794e4, 0x0, 0x0, 0x1, 0x1)
    /usr/local/go/src/runtime/internal/atomic/asm_386.s:151 +0xc
github.com/smira/go-statsd.(*transport).reportLoop(0xa8794a0, 0xf8475800, 0xd, 0x85bf3f0, 0xa8568d0)
    /usr/src/app/vendor/github.com/smira/go-statsd/loops.go:161 +0x111
created by github.com/smira/go-statsd.NewClient
    /usr/src/app/vendor/github.com/smira/go-statsd/client.go:112 +0x3f7

Fortunately I can just switch to amd64 and it works