golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.37k stars 17.71k forks source link

runtime/race:race: TestOutput failures #69257

Open gopherbot opened 2 months ago

gopherbot commented 2 months ago
#!watchflakes
default <- pkg == "runtime/race:race" && test == "TestOutput"

Issue created automatically to collect these failures.

Example (log):

=== RUN   TestOutput
    output_test.go:83: failed test case wrappersym, expect:
        ==================
        WARNING: DATA RACE
        Write at 0x[0-9,a-f]+ by goroutine [0-9]:
          main\.T\.f\(\)
              .*/main.go:15 \+0x[0-9,a-f]+
          main\.\(\*T\)\.f\(\)
              <autogenerated>:1 \+0x[0-9,a-f]+
          main\.main\.gowrap1\(\)
...
          main.main.gowrap1()
              /home/swarming/.swarming/w/ir/x/t/TestOutput26943986/013/main.go:9 +0x68

        Goroutine 6 (finished) created at:
          main.main()
              /home/swarming/.swarming/w/ir/x/t/TestOutput26943986/013/main.go:9 +0x98
        ==================
        Found 1 data race(s)
        exit status 66
--- FAIL: TestOutput (8.52s)

watchflakes

gopherbot commented 2 months ago

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "runtime/race:race" && test == "TestOutput"
2024-09-04 04:56 gotip-linux-ppc64le_power8 go@1b5ae451 runtime/race:race.TestOutput (log) === RUN TestOutput output_test.go:83: failed test case wrappersym, expect: ================== WARNING: DATA RACE Write at 0x[0-9,a-f]+ by goroutine [0-9]: main\.T\.f\(\) .*/main.go:15 \+0x[0-9,a-f]+ main\.\(\*T\)\.f\(\) :1 \+0x[0-9,a-f]+ main\.main\.gowrap1\(\) ... main.main.gowrap1() /home/swarming/.swarming/w/ir/x/t/TestOutput26943986/013/main.go:9 +0x68 Goroutine 6 (finished) created at: main.main() /home/swarming/.swarming/w/ir/x/t/TestOutput26943986/013/main.go:9 +0x98 ================== Found 1 data race(s) exit status 66 --- FAIL: TestOutput (8.52s)

watchflakes

prattmic commented 2 months ago

Looks like the regexp expects the line 9 case first and line 10 second, but got it in the opposite order. Maybe the test is fragile? Can it actually control the order of the writes?

ianlancetaylor commented 2 months ago

The failing test was added by @aclements in May, 2023 in https://go.dev/cl/497235. For purposes of the issue (#60245) I suspect we can simply the regexp to just look for the wrapper symbol. Or, we could do what some of the other tests do and add a time.Sleep to make the expected ordering even more likely than it already is.

gopherbot commented 1 week ago

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "runtime/race:race" && test == "TestOutput"
2024-11-18 18:43 gotip-linux-amd64-boringcrypto go@5a0f2a7a runtime/race:race.TestOutput (log) === RUN TestOutput output_test.go:83: failed test case wrappersym, expect: ================== WARNING: DATA RACE Write at 0x[0-9,a-f]+ by goroutine [0-9]: main\.T\.f\(\) .*/main.go:15 \+0x[0-9,a-f]+ main\.\(\*T\)\.f\(\) :1 \+0x[0-9,a-f]+ main\.main\.gowrap1\(\) ... main.main.gowrap1() /home/swarming/.swarming/w/ir/x/t/TestOutput1629240431/013/main.go:9 +0x3a Goroutine 6 (finished) created at: main.main() /home/swarming/.swarming/w/ir/x/t/TestOutput1629240431/013/main.go:9 +0x8d ================== Found 1 data race(s) exit status 66 --- FAIL: TestOutput (9.24s)

watchflakes

gopherbot commented 1 week ago

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "runtime/race:race" && test == "TestOutput"
2024-11-19 22:30 gotip-linux-amd64 go@8c2a04f1 runtime/race:race.TestOutput (log) === RUN TestOutput output_test.go:83: failed test case wrappersym, expect: ================== WARNING: DATA RACE Write at 0x[0-9,a-f]+ by goroutine [0-9]: main\.T\.f\(\) .*/main.go:15 \+0x[0-9,a-f]+ main\.\(\*T\)\.f\(\) :1 \+0x[0-9,a-f]+ main\.main\.gowrap1\(\) ... main.main.gowrap1() /home/swarming/.swarming/w/ir/x/t/TestOutput2470865229/013/main.go:9 +0x3a Goroutine 6 (finished) created at: main.main() /home/swarming/.swarming/w/ir/x/t/TestOutput2470865229/013/main.go:9 +0x8d ================== Found 1 data race(s) exit status 66 --- FAIL: TestOutput (11.87s)

watchflakes