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
Make OutputState pass the -race
detector
#11248
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changelog[uncommitted] (2022-11-03) |
iwahbe
added
the
impact/no-changelog-required
This issue doesn't require a CHANGELOG update
label
Nov 3, 2022
Frassle
approved these changes
Nov 3, 2022
bors r+ |
bors bot
added a commit
that referenced
this pull request
Nov 3, 2022
11248: Make OutputState pass the `-race` detector r=iwahbe a=iwahbe This is the last step necessary to allow pulumi-yaml to run a subset of its tests with `-race=true`. The race is is between `ApplyT` and `fulfillValue` on copying a slice. Both me (`@iwahbe)` and `@t0yv0` have independently confirmed that the race is not hiding a deeper issue. Further discussion of the issue is at #11186. A stack trace from the `-race` flag that this issue fixes: ``` WARNING: DATA RACE Write at 0x00c000422ec0 by goroutine 463: github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).fulfillValue() /Users/ianwahbe/go/src/github.com/pulumi/pulumi/sdk/go/pulumi/types.go:198 +0x590 github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).ApplyTWithContext.func1() /Users/ianwahbe/go/src/github.com/pulumi/pulumi/sdk/go/pulumi/types.go:516 +0x8a5 Previous read at 0x00c000422ec0 by goroutine 306: github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).dependencies() /Users/ianwahbe/go/src/github.com/pulumi/pulumi/sdk/go/pulumi/types.go:136 +0x406 github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).ApplyTWithContext() /Users/ianwahbe/go/src/github.com/pulumi/pulumi/sdk/go/pulumi/types.go:492 +0x14a github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).ApplyT() /Users/ianwahbe/go/src/github.com/pulumi/pulumi/sdk/go/pulumi/types.go:440 +0xb8 github.com/pulumi/pulumi/sdk/v3/go/pulumi.AnyOutput.ApplyT() <autogenerated>:1 +0x49 github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.TestSplit.func1.1() /Users/ianwahbe/go/src/github.com/pulumi/pulumi-yaml/pkg/pulumiyaml/run_test.go:890 +0x1d3 github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.testTemplateDiags.func2() /Users/ianwahbe/go/src/github.com/pulumi/pulumi-yaml/pkg/pulumiyaml/run_test.go:286 +0x516 github.com/pulumi/pulumi/sdk/v3/go/pulumi.RunWithContext() /Users/ianwahbe/go/src/github.com/pulumi/pulumi/sdk/go/pulumi/run.go:120 +0x258 github.com/pulumi/pulumi/sdk/v3/go/pulumi.runErrInner() /Users/ianwahbe/go/src/github.com/pulumi/pulumi/sdk/go/pulumi/run.go:96 +0x4b1 github.com/pulumi/pulumi/sdk/v3/go/pulumi.RunErr() /Users/ianwahbe/go/src/github.com/pulumi/pulumi/sdk/go/pulumi/run.go:63 +0x23a github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.testTemplateDiags() /Users/ianwahbe/go/src/github.com/pulumi/pulumi-yaml/pkg/pulumiyaml/run_test.go:274 +0x2e github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.testTemplate() /Users/ianwahbe/go/src/github.com/pulumi/pulumi-yaml/pkg/pulumiyaml/run_test.go:335 +0x44 github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.TestSplit.func1() /Users/ianwahbe/go/src/github.com/pulumi/pulumi-yaml/pkg/pulumiyaml/run_test.go:886 +0x2f5 testing.tRunner() /usr/local/Cellar/go/1.19.2/libexec/src/testing/testing.go:1446 +0x216 testing.(*T).Run.func1() /usr/local/Cellar/go/1.19.2/libexec/src/testing/testing.go:1493 +0x47 ``` Co-authored-by: Ian Wahbe <ian@wahbe.com>
Build failed: |
bors retry |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the last step necessary to allow pulumi-yaml to run a subset of its tests with
-race=true
.The race is is between
ApplyT
andfulfillValue
on copying a slice.Both me (@iwahbe) and @t0yv0 have independently confirmed that the race is not hiding a deeper issue. Further discussion of the issue is at #11186.
A stack trace from the
-race
flag that this issue fixes: