Skip to content

cmd/go: 1.21 regression in test times with -race #61852

@howardjohn

Description

@howardjohn

What version of Go are you using (go version)?

$ go version
go version go1.21.0 linux/amd64

Does this issue reproduce with the latest release?

Yes

What did you do?

Setup mostly empty project:

$ go mod init fake
$ cat <<EOF>test_test.go
package main

import "testing"

func TestNothing(t *testing.T) {
}
EOF

Now test combinations of -race and 1.20 and 1.21:

$ go1.21.0 test -c -race .; time ./fake.test
real    1.009
$ go1.21.0 test -c .; time ./fake.test
real    0.004
$ go1.20 test -c -race .; time ./fake.test
real    0.022
$ go1.20 test -c .; time ./fake.test
real    0.004

You can see 1.21 + -race hangs for exactly 1s after all tests complete

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.RaceDetector

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions