benjojo / sping

Split ping, see what direction the loss or latency is on
MIT License
308 stars 19 forks source link

fatal error: concurrent map writes #8

Closed tamihiro closed 3 years ago

tamihiro commented 3 years ago

Hi, thanks for sharing the code. I often get a runtime error after running sping for sometime. Please check the output in this link. I have PR'ed #7 which I think should be a fix for this problem, treating timeSyncs as a struct with sync.Mutex as its member field. With this fix I have been running it for several hours now.

benjojo commented 3 years ago

Looks like the NTP calibration is a little broken. I'll take a look

On Mon, 8 Mar 2021, 08:22 ТАМИХИРО ЛЕЕ, notifications@github.com wrote:

Hi, thanks for sharing the code. I often get a runtime error after running sping for sometime. Please check the output in this link https://github.com/benjojo/sping/files/6099816/sping.log. I have PR'ed #7 https://github.com/benjojo/sping/pull/7 which I think should be a fix for this problem, treating timeSyncs as a struct with sync.Mutex as its member field. With this fix I have been running it for several hours now.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/benjojo/sping/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALPK4TGH7F2KCCKAMRJ363TCSCLXANCNFSM4YY6DSVQ .

benjojo commented 3 years ago

Merged your PR, thanks