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

Add a test that can trigger a map race condition. #192

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ffilippopoulos
Copy link
Member

I can sporadically catch a data race which could result in the following error we've seen:

fatal error: concurrent map writes

goroutine 200159 [running]:
github.com/utilitywarehouse/semaphore-xds/xds.(*Snapshotter).updateNodeServiceSnapshotResources(0xc000140160, {0xc00a30e080, 0x31}, {0xc001fae040, 0x35}, {0xc002d00160?, 0x2, 0x2})
        /go/src/github.com/utilitywarehouse/semaphore-xds/xds/snapshotter.go:403 +0x178
github.com/utilitywarehouse/semaphore-xds/xds.(*Snapshotter).updateNodeSnapshot(0x2128fc0?, {0xc00a30e080, 0x31}, {0xc001fae040, 0x35}, {0xc002d00160, 0x2, 0x2})
        /go/src/github.com/utilitywarehouse/semaphore-xds/xds/snapshotter.go:463 +0x259

but the result is not reliable enough via go test -v -race ./... to try an effective solution.

I can sporadically catch a data race which could result in the
following error we've seen:
```
fatal error: concurrent map writes

goroutine 200159 [running]:
github.com/utilitywarehouse/semaphore-xds/xds.(*Snapshotter).updateNodeServiceSnapshotResources(0xc000140160, {0xc00a30e080, 0x31}, {0xc001fae040, 0x35}, {0xc002d00160?, 0x2, 0x2})
        /go/src/github.com/utilitywarehouse/semaphore-xds/xds/snapshotter.go:403 +0x178
github.com/utilitywarehouse/semaphore-xds/xds.(*Snapshotter).updateNodeSnapshot(0x2128fc0?, {0xc00a30e080, 0x31}, {0xc001fae040, 0x35}, {0xc002d00160, 0x2, 0x2})
        /go/src/github.com/utilitywarehouse/semaphore-xds/xds/snapshotter.go:463 +0x259
```
but the result is not reliable enough via `go test -v -race ./...` to
try an effective solution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant