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

runtime/race: TestRaceChanCloseSend failed once #14079

Closed
rsc opened this issue Jan 24, 2016 · 4 comments
Closed

runtime/race: TestRaceChanCloseSend failed once #14079

rsc opened this issue Jan 24, 2016 · 4 comments

Comments

@rsc
Copy link
Contributor

rsc commented Jan 24, 2016

Seen during an unrelated trybot run on linux-amd64-race builder.
https://storage.googleapis.com/go-build-log/51c1aa35/linux-amd64-race_e41788ba.log

/cc @dvyukov

    === RUN   TestRaceChanCloseSend
    ==================
    WARNING: DATA RACE
    Read by goroutine 60:
      runtime.chansend()
          /tmp/workdir/go/src/runtime/chan.go:115 +0x0
      command-line-arguments_test.TestRaceChanCloseSend()
          /tmp/workdir/go/src/runtime/race/testdata/chan_test.go:577 +0xbe
      testing.tRunner()
          /tmp/workdir/go/src/testing/testing.go:473 +0xdc

    Previous write by goroutine 59:
      runtime.closechan()
          /tmp/workdir/go/src/runtime/chan.go:292 +0x0
      command-line-arguments_test.TestRaceChanCloseSend.func1()
          /tmp/workdir/go/src/runtime/race/testdata/chan_test.go:574 +0x2e

    Goroutine 60 (running) created at:
      testing.RunTests()
          /tmp/workdir/go/src/testing/testing.go:582 +0xae2
      testing.(*M).Run()
          /tmp/workdir/go/src/testing/testing.go:515 +0x11d
      main.main()
          command-line-arguments/_test/_testmain.go:736 +0x210

    Goroutine 59 (running) created at:
      command-line-arguments_test.TestRaceChanCloseSend()
          /tmp/workdir/go/src/runtime/race/testdata/chan_test.go:576 +0x91
      testing.tRunner()
          /tmp/workdir/go/src/testing/testing.go:473 +0xdc
    ==================
    --- FAIL: TestRaceChanCloseSend (0.00s)
@mikioh
Copy link
Contributor

mikioh commented Jan 27, 2016

On freebsd-amd64-race builder: http://build.golang.org/log/70e1fc51b96bbac00e875f6c8ca3305dc1c39c12

@gopherbot
Copy link

CL https://golang.org/cl/18968 mentions this issue.

@rsc
Copy link
Contributor Author

rsc commented Jan 27, 2016

Reopening because that CL can only explain false negatives. This is a false positive.

@rsc rsc reopened this Jan 27, 2016
@dvyukov
Copy link
Member

dvyukov commented Jan 27, 2016

This test sends on a closed chan. The intention is that only the race is reported but no panic happens, but in this case it actually paniced. It is a legit outcome. Again due to unexpected scheduling order.

@dvyukov dvyukov closed this as completed Jan 27, 2016
@golang golang locked and limited conversation to collaborators Feb 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants