-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TestMetricChanPush panics on 386 and arm #2784
Comments
Thanks for reaching out to us and creating the PR. Reviewing the I think we need to update type metricChan struct {
paused *int64
ch chan metric
}
func newMetricChan(size int) metricChan {
return metricChan{
paused: new(int),
ch: make(chan metric, size),
}
}
func (ch *metricChan) Pause() {
atomic.StoreInt64(ch.paused, pausedEnum)
}
func (ch *metricChan) Continue() {
atomic.StoreInt64(ch.paused, runningEnum)
}
func (ch *metricChan) IsPaused() bool {
v := atomic.LoadInt64(ch.paused)
return v == pausedEnum
} |
Thank you so much for explaining to me the root of the issue and for showing me the proper way to fix it. I have just force pushed a new commit to #2785, which is essentially what you showed me in the code above. Many thanks! |
This ensures correct atomic operations and fixes test errors on 32-bit platforms like 386 and arm. Fixes #2784
Version of AWS SDK for Go?
1.16.18, 1.21.6 and master
Version of Go (
go version
)?What issue did you see?
Ubuntu’s autopkgtest detects a regression on 386 (i386) and arm (armhf) when trying to upgrading golang-github-aws-aws-go from 1.4.22 to 1.16.18 or to 1.21.6, see https://autopkgtest.ubuntu.com/packages/golang-github-aws-aws-sdk-go
386:
arm:
The text was updated successfully, but these errors were encountered: