Closed sajal closed 7 years ago
Panic caused at : https://github.com/turbobytes/geoipdb/blob/c20a6ca6a6f3b33301955d03a02bba07d2390edf/cache.go#L73
I see that map operation is wrapped in a lock, but maybe something else started writing to it at the same time without locking?
crashlog snippet: https://gist.github.com/sajal/a567bd6d5f168e12cda67dc737cc21d9
The problem is with sync.Mutex . It really needs to be a pointer
sync.Mutex
https://gist.github.com/sajal/50e173fcd3fa043f46e1e5084512d5de
go run buggy.go 2>&1 | less
Panic caused at : https://github.com/turbobytes/geoipdb/blob/c20a6ca6a6f3b33301955d03a02bba07d2390edf/cache.go#L73
I see that map operation is wrapped in a lock, but maybe something else started writing to it at the same time without locking?
crashlog snippet: https://gist.github.com/sajal/a567bd6d5f168e12cda67dc737cc21d9