Skip to content
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

sync/atomic: data races in tests #8389

Closed
dvyukov opened this issue Jul 18, 2014 · 2 comments
Closed

sync/atomic: data races in tests #8389

dvyukov opened this issue Jul 18, 2014 · 2 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Jul 18, 2014

Discovered with experimental support for detecting races between atomic and non-atomic
accesses:

WARNING: DATA RACE
Read by goroutine 20:
  sync/atomic_test.hammerCompareAndSwapInt64()
      src/pkg/sync/atomic/atomic_test.go:1042 +0x51
  sync/atomic_test.func·005()
      src/pkg/sync/atomic/atomic_test.go:1111 +0x114

Previous write by goroutine 19:
  sync/atomic.CompareAndSwapInt64()
      src/pkg/runtime/race_amd64.s:285 +0xa
  sync/atomic_test.hammerCompareAndSwapInt64()
      src/pkg/sync/atomic/atomic_test.go:1043 +0x6e
  sync/atomic_test.func·005()
      src/pkg/sync/atomic/atomic_test.go:1111 +0x114

Goroutine 20 (running) created at:
  sync/atomic_test.TestHammer64()
      src/pkg/sync/atomic/atomic_test.go:1112 +0x43d
  testing.tRunner()
      src/pkg/testing/testing.go:427 +0x10b

Goroutine 19 (running) created at:
  sync/atomic_test.TestHammer64()
      src/pkg/sync/atomic/atomic_test.go:1112 +0x43d
  testing.tRunner()
      src/pkg/testing/testing.go:427 +0x10b
@gopherbot
Copy link

Comment 1:

CL https://golang.org/cl/111320044 mentions this issue.

@dvyukov
Copy link
Member Author

dvyukov commented Jul 20, 2014

Comment 2:

This issue was closed by revision 1a116c7.

Status changed to Fixed.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
Fixes golang#8389.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/111320044
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
Fixes golang#8389.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/111320044
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants