-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version devel +e86c26789d Sat May 19 17:38:01 2018 +0000 darwin/amd64
Does this issue reproduce with the latest release?
Yes but you encounter #24438 first so thats why I'm using a devel version.
What operating system and processor architecture are you using (go env)?
macOS 10.13.4
What did you do?
package scratch
import (
"sync"
"testing"
)
func TestMeow(t *testing.T) {
var wg sync.WaitGroup
wg.Add(2)
go func() {
defer wg.Done()
t.Fatal("meow")
}()
go func() {
defer wg.Done()
t.Fatal("meow")
}()
wg.Wait()
}go test -race scratch_test.goWhat did you expect to see?
Two test failures with error message "meow".
What did you see instead?
Race condition report due to the two concurrent writes at
Line 589 in e86c267
| c.finished = true |
t.Fatal.
I think we should patch up this race. Its very similar to #24438 in that the test is racy, but not in an interesting way.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.