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

cmd/go/internal/work: data race in builder.Showcmd #64010

Closed
gopherbot opened this issue Nov 8, 2023 · 3 comments
Closed

cmd/go/internal/work: data race in builder.Showcmd #64010

gopherbot opened this issue Nov 8, 2023 · 3 comments
Labels
GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@gopherbot
Copy link

gopherbot commented Nov 8, 2023

#!watchflakes
post <- pkg == "cmd/go" && `WARNING: DATA RACE` && `cmd/go/internal/work\.\(\*Builder\)\.(Showcmd|fmtcmd)\(\)` && date < "2023-10-20"

Issue created automatically to collect these failures.

Example (log):

vcs-test.golang.org rerouted to http://127.0.0.1:38791
https://vcs-test.golang.org rerouted to https://127.0.0.1:35389
go test proxy running at GOPROXY=http://127.0.0.1:35115/mod
--- FAIL: TestFilepathUnderCwdFormat (1.71s)
    go_test.go:2753: running testgo [test -x -cover log]
    go_test.go:2753: standard output:
    go_test.go:2753: ok  	log	0.004s	coverage: 67.9% of statements

    go_test.go:2753: standard error:
    go_test.go:2753: WORK=/workdir/tmp/cmd-go-test-1884624049/go-build4256024540
...
        modinfo "0w\xaf\f\x92t\b\x02A\xe1\xc1\a\xe6\xd6\x18\xe6\xf92C1\x86\x18 r\x00\x82B\x10A\x16\xd8\xf2"
        EOF
        cd .
        /workdir/go/pkg/tool/linux_amd64/link -o $WORK/b001/log.test -importcfg $WORK/b001/importcfg.link -s -w -X=runtime.godebugDefault=httplaxcontentlength=1,httpmuxgo121=1,panicnil=1 -buildmode=exe -buildid=mMnnWe2tZXTgbWkPpSSd/Uc0KleGu1eOuVUMi60dH/RJQObtPwbnNFPWvcsEmY/mMnnWe2tZXTgbWkPpSSd -X testing.testBinary=1 -extld=gcc $WORK/b001/_pkg_.a
        mkdir -p $WORK/b001/gocoverdir
        $WORK/b001/log.test -test.testlogfile=$WORK/b001/testlog.txt -test.paniconexit0 -test.gocoverdir=$WORK/b001/gocoverdir -test.timeout=10m0s
        rm -r $WORK/b001/
        Found 1 data race(s)

    go_test.go:2753: go [test -x -cover log] failed unexpectedly in /workdir/go/src/cmd/go: exit status 66

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 8, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "cmd/go" && test == "TestFilepathUnderCwdFormat"
2023-10-18 16:32 linux-amd64-race go@070c1fcb cmd/go.TestFilepathUnderCwdFormat (log)
vcs-test.golang.org rerouted to http://127.0.0.1:38791
https://vcs-test.golang.org rerouted to https://127.0.0.1:35389
go test proxy running at GOPROXY=http://127.0.0.1:35115/mod
--- FAIL: TestFilepathUnderCwdFormat (1.71s)
    go_test.go:2753: running testgo [test -x -cover log]
    go_test.go:2753: standard output:
    go_test.go:2753: ok  	log	0.004s	coverage: 67.9% of statements

    go_test.go:2753: standard error:
    go_test.go:2753: WORK=/workdir/tmp/cmd-go-test-1884624049/go-build4256024540
...
        modinfo "0w\xaf\f\x92t\b\x02A\xe1\xc1\a\xe6\xd6\x18\xe6\xf92C1\x86\x18 r\x00\x82B\x10A\x16\xd8\xf2"
        EOF
        cd .
        /workdir/go/pkg/tool/linux_amd64/link -o $WORK/b001/log.test -importcfg $WORK/b001/importcfg.link -s -w -X=runtime.godebugDefault=httplaxcontentlength=1,httpmuxgo121=1,panicnil=1 -buildmode=exe -buildid=mMnnWe2tZXTgbWkPpSSd/Uc0KleGu1eOuVUMi60dH/RJQObtPwbnNFPWvcsEmY/mMnnWe2tZXTgbWkPpSSd -X testing.testBinary=1 -extld=gcc $WORK/b001/_pkg_.a
        mkdir -p $WORK/b001/gocoverdir
        $WORK/b001/log.test -test.testlogfile=$WORK/b001/testlog.txt -test.paniconexit0 -test.gocoverdir=$WORK/b001/gocoverdir -test.timeout=10m0s
        rm -r $WORK/b001/
        Found 1 data race(s)

    go_test.go:2753: go [test -x -cover log] failed unexpectedly in /workdir/go/src/cmd/go: exit status 66
2023-10-18 18:05 linux-amd64-race go@d580460f cmd/go.TestFilepathUnderCwdFormat (log)
vcs-test.golang.org rerouted to http://127.0.0.1:42399
https://vcs-test.golang.org rerouted to https://127.0.0.1:38491
go test proxy running at GOPROXY=http://127.0.0.1:37785/mod
2023/10/18 18:10:09 http: TLS handshake error from 127.0.0.1:57484: EOF
2023/10/18 18:10:09 http: TLS handshake error from 127.0.0.1:57492: EOF
--- FAIL: TestFilepathUnderCwdFormat (1.55s)
    go_test.go:2753: running testgo [test -x -cover log]
    go_test.go:2753: standard output:
    go_test.go:2753: ok  	log	0.004s	coverage: 67.9% of statements

...
        modinfo "0w\xaf\f\x92t\b\x02A\xe1\xc1\a\xe6\xd6\x18\xe6\xf92C1\x86\x18 r\x00\x82B\x10A\x16\xd8\xf2"
        EOF
        cd .
        /workdir/go/pkg/tool/linux_amd64/link -o $WORK/b001/log.test -importcfg $WORK/b001/importcfg.link -s -w -X=runtime.godebugDefault=httplaxcontentlength=1,httpmuxgo121=1,panicnil=1 -buildmode=exe -buildid=8gOSpyVe55mOEXk3T6o0/SelmBCce4DZtQtt5hBJv/R3N9fGP8Ry6OHNGtdN2G/8gOSpyVe55mOEXk3T6o0 -X testing.testBinary=1 -extld=gcc $WORK/b001/_pkg_.a
        mkdir -p $WORK/b001/gocoverdir
        $WORK/b001/log.test -test.testlogfile=$WORK/b001/testlog.txt -test.paniconexit0 -test.gocoverdir=$WORK/b001/gocoverdir -test.timeout=10m0s
        rm -r $WORK/b001/
        Found 1 data race(s)

    go_test.go:2753: go [test -x -cover log] failed unexpectedly in /workdir/go/src/cmd/go: exit status 66

watchflakes

@bcmills
Copy link
Contributor

bcmills commented Nov 8, 2023

I believe this was fixed by https://go.dev/cl/536376.

@bcmills bcmills added the GoCommand cmd/go label Nov 8, 2023
@bcmills bcmills closed this as completed Nov 8, 2023
@bcmills bcmills added this to the Go1.22 milestone Nov 8, 2023
@bcmills bcmills changed the title cmd/go: TestFilepathUnderCwdFormat failures cmd/go/internal/work: data race in builder.Showcmd Nov 8, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "cmd/go" && `WARNING: DATA RACE` && `cmd/go/internal/work\.\(\*Builder\)\.(Showcmd|fmtcmd)\(\)` && date < "2023-10-20"
2023-10-18 14:06 linux-amd64-longtest-race go@7ee99801 cmd/go.TestScript (log)
vcs-test.golang.org rerouted to http://127.0.0.1:45511
https://vcs-test.golang.org rerouted to https://127.0.0.1:45059
go test proxy running at GOPROXY=http://127.0.0.1:44069/mod
2023/10/18 16:18:22 http: TLS handshake error from 127.0.0.1:53828: EOF
2023/10/18 16:18:22 http: TLS handshake error from 127.0.0.1:53806: EOF
2023/10/18 16:18:22 http: TLS handshake error from 127.0.0.1:53816: EOF
--- FAIL: TestScript (1.16s)
    --- FAIL: TestScript/cover_statements (1.92s)
        script_test.go:132: 2023-10-18T16:17:09Z
        script_test.go:134: $WORK=/workdir/tmp/cmd-go-test-543877386/tmpdir1700415720/cover_statements2557630880
...
    --- FAIL: TestScript/cover_pkgall_imports (3.44s)
        script_test.go:132: 2023-10-18T16:17:20Z
        script_test.go:134: $WORK=/workdir/tmp/cmd-go-test-543877386/tmpdir1700415720/cover_pkgall_imports1955944323
        script_test.go:156: 
            # This test checks that -coverpkg=all can be used
            # when the package pattern includes packages
            # which only have tests.
            # Verifies golang.org/issue/27333, golang.org/issue/43242. (3.433s)
            > [short] skip
            [condition not met]
...
                  /workdir/go/src/cmd/go/main.go:176 +0xac4
              cmd/go.Main()
                  /workdir/go/src/cmd/go/export_test.go:7 +0x1f5e
              cmd/go_test.TestMain()
                  /workdir/go/src/cmd/go/go_test.go:160 +0x1f59
              main.main()
                  _testmain.go:185 +0x2d4
            ==================
            Found 2 data race(s)
        script_test.go:156: FAIL: testdata/script/cover_atomic_pkgall.txt:5: go test -coverpkg=all -covermode=atomic x: exit status 66
2023-10-18 14:06 linux-amd64-longtest-race go@045ce51b cmd/go.TestScript (log)
vcs-test.golang.org rerouted to http://127.0.0.1:34907
https://vcs-test.golang.org rerouted to https://127.0.0.1:35347
go test proxy running at GOPROXY=http://127.0.0.1:46299/mod
2023/10/18 15:11:51 http: TLS handshake error from 127.0.0.1:33576: read tcp 127.0.0.1:35347->127.0.0.1:33576: read: connection reset by peer
--- FAIL: TestScript (1.14s)
    --- FAIL: TestScript/cover_pkgall_multiple_mains (6.41s)
        script_test.go:132: 2023-10-18T15:08:12Z
        script_test.go:134: $WORK=/workdir/tmp/cmd-go-test-3998045271/tmpdir880220218/cover_pkgall_multiple_mains2257269960
        script_test.go:156: 
            # This test checks that multiple main packages can be tested
...
    --- FAIL: TestScript/cover_pkgall_runtime (45.72s)
        script_test.go:132: 2023-10-18T15:08:13Z
        script_test.go:134: $WORK=/workdir/tmp/cmd-go-test-3998045271/tmpdir880220218/cover_pkgall_runtime3659525386
        script_test.go:156: 
            > env GO111MODULE=off
            # Issue 23882 (45.715s)
            > [short] skip
            [condition not met]
            > go test -coverpkg=all x
            [stdout]
...
                  /workdir/go/src/cmd/go/main.go:176 +0xac4
              cmd/go.Main()
                  /workdir/go/src/cmd/go/export_test.go:7 +0x1f5e
              cmd/go_test.TestMain()
                  /workdir/go/src/cmd/go/go_test.go:160 +0x1f59
              main.main()
                  _testmain.go:185 +0x2d4
            ==================
            Found 2 data race(s)
        script_test.go:156: FAIL: testdata/script/cover_atomic_pkgall.txt:5: go test -coverpkg=all -covermode=atomic x: exit status 66
2023-10-18 14:46 linux-amd64-longtest-race go@1ec427e7 cmd/go.TestScript (log)
vcs-test.golang.org rerouted to http://127.0.0.1:33555
https://vcs-test.golang.org rerouted to https://127.0.0.1:43809
go test proxy running at GOPROXY=http://127.0.0.1:41287/mod
2023/10/18 15:48:47 http: TLS handshake error from 127.0.0.1:36310: read tcp 127.0.0.1:43809->127.0.0.1:36310: read: connection reset by peer
2023/10/18 15:48:47 http: TLS handshake error from 127.0.0.1:36272: read tcp 127.0.0.1:43809->127.0.0.1:36272: read: connection reset by peer
2023/10/18 15:48:52 http: TLS handshake error from 127.0.0.1:56512: EOF
--- FAIL: TestScript (1.15s)
    --- FAIL: TestScript/cover_coverprofile_multipkg (2.60s)
        script_test.go:132: 2023-10-18T15:52:14Z
        script_test.go:134: $WORK=/workdir/tmp/cmd-go-test-1834335683/tmpdir4105536463/cover_coverprofile_multipkg1891900430
...
    --- FAIL: TestScript/cover_coverpkg_partial (3.12s)
        script_test.go:132: 2023-10-18T15:52:16Z
        script_test.go:134: $WORK=/workdir/tmp/cmd-go-test-1834335683/tmpdir4105536463/cover_coverpkg_partial760821532
        script_test.go:156: 
            # Testcase related to #58770 and #24570. This is intended to ensure
            # that coverage collection works in situations where we're testing a
            # collection of packages and supplying a -coverpkg pattern that
            # matches some but not all of the collection. In addition, some of the
            # packages have Go code but no tests, and other packages have tests
            # but no Go code. Package breakdown:
...
                  /workdir/go/src/cmd/go/main.go:176 +0xac4
              cmd/go.Main()
                  /workdir/go/src/cmd/go/export_test.go:7 +0x1f5e
              cmd/go_test.TestMain()
                  /workdir/go/src/cmd/go/go_test.go:160 +0x1f59
              main.main()
                  _testmain.go:185 +0x2d4
            ==================
            Found 2 data race(s)
        script_test.go:156: FAIL: testdata/script/cover_atomic_pkgall.txt:5: go test -coverpkg=all -covermode=atomic x: exit status 66

watchflakes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: Done
Development

No branches or pull requests

2 participants