Skip to content

x/net/http2: data race on DebugGoroutines #15998

@mikioh

Description

@mikioh

This is an issue of http2 package-specific debug hook, so not critical.

go test -race golang.org/x/net/http2 -count 10

==================
WARNING: DATA RACE
Write at 0x000000705ee2 by goroutine 236:
  golang.org/x/net/http2.TestGoroutineLock()
      /swdev/src/golang.org/x/net/http2/gotrack_test.go:15 +0x82
  testing.tRunner()
      /go/src/testing/testing.go:610 +0xc9

Previous read at 0x000000705ee2 by goroutine 147:
  golang.org/x/net/http2.goroutineLock.check()
      /swdev/src/golang.org/x/net/http2/gotrack.go:32 +0x3e
  golang.org/x/net/http2.(*serverConn).stopShutdownTimer()
      /swdev/src/golang.org/x/net/http2/server.go:651 +0x58
  golang.org/x/net/http2.(*serverConn).serve()
      /swdev/src/golang.org/x/net/http2/server.go:722 +0x8c8
  golang.org/x/net/http2.(*Server).ServeConn()
      /swdev/src/golang.org/x/net/http2/server.go:339 +0xb70
  golang.org/x/net/http2.ConfigureServer.func1()
      /swdev/src/golang.org/x/net/http2/server.go:200 +0xe7
  net/http.(*conn).serve()
      /go/src/net/http/server.go:1493 +0x12ab

Goroutine 236 (running) created at:
  testing.(*T).Run()
      /go/src/testing/testing.go:646 +0x52f
  testing.RunTests.func1()
      /go/src/testing/testing.go:793 +0xb9
  testing.tRunner()
      /go/src/testing/testing.go:610 +0xc9
  testing.RunTests()
      /go/src/testing/testing.go:799 +0x4b5
  testing.(*M).Run()
      /go/src/testing/testing.go:743 +0x12f
  main.main()
      golang.org/x/net/http2/_test/_testmain.go:470 +0x1b4

Goroutine 147 (finished) created at:
  net/http.(*Server).Serve()
      /go/src/net/http/server.go:2240 +0x53e
  net/http/httptest.(*Server).goServe.func1()
      /go/src/net/http/httptest/server.go:235 +0xa2
==================
PASS

Metadata

Metadata

Assignees

No one assigned

    Labels

    TestingAn issue that has been verified to require only test changes, not just a test failure.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions