coreos / pkg

a collection of go utility packages
Apache License 2.0
188 stars 70 forks source link

progressutil: added mutexes to make go's race detector happy #61

Closed cgonyeo closed 8 years ago

cgonyeo commented 8 years ago

docker2aci has some race conditions, and go's race detector found some race-y accesses in progressutil, so this commit wraps some variables shared between goroutines in mutexes.

cgonyeo commented 8 years ago

Let this run for an hour and a half with Go's race detector going:

$(exit 0); while [ $? -eq 0 ]; do ./bin/docker2aci docker://dgonyeo/test; done

Found another issue, fixed it. I think this is good now.

jonboulle commented 8 years ago

@dgonyeo to be clear, did you reproduce the issue(s) we were experiencing even without the race detector?

Derek Gonyeo notifications@github.com schrieb am Fr., 27. Mai 2016, 23:54:

Let this run for an hour and a half with Go's race detector going:

$(exit 0); while [ $? -eq 0 ]; do ./bin/docker2aci docker://dgonyeo/test; done

Found another issue, fixed it. I think this is good now.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/coreos/pkg/pull/61#issuecomment-222261808, or mute the thread https://github.com/notifications/unsubscribe/ACewN1lAcv4gSTmSKi1PxYgU92BqQL70ks5qF2gsgaJpZM4Ioxr9 .

jonboulle commented 8 years ago

This doesn't address all the issues but it's a step forward

jonboulle commented 8 years ago

62