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

net/http: data race on countReader.n #4220

Closed
dvyukov opened this issue Oct 9, 2012 · 1 comment
Closed

net/http: data race on countReader.n #4220

dvyukov opened this issue Oct 9, 2012 · 1 comment
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Oct 9, 2012

14574:2c2052f38c3c

On net/http tests ThreadSanitizer says:

WARNING: DATA RACE at 0x000040784820
Write by goroutine 183:
  net/http_test.countReader.Read()
      src/pkg/net/http/serve_test.go:1070 +0x8c
  net/http_test.(*countReader).Read()
      src/pkg/net/http/client_test.go:0 +0xa2
  io.(*LimitedReader).Read()
      src/pkg/io/io.go:406 +0x161
  io/ioutil.(*nopCloser).Read()
      src/pkg/io/ioutil/blackhole_race.go:1 +0x5b
  io.(*multiReader).Read()
      src/pkg/io/multi.go:13 +0x94
  io.Copy()
      src/pkg/io/io.go:360 +0x1bd
  net/http.(*transferWriter).WriteBody()
      src/pkg/net/http/transfer.go:194 +0x1e0
  net/http.(*Request).write()
      src/pkg/net/http/request.go:371 +0xa77
  net/http.(*persistConn).writeLoop()
      src/pkg/net/http/transport.go:660 +0x227

Previous read by goroutine 99:
  net/http_test.TestRequestBodyLimit()
      src/pkg/net/http/serve_test.go:1102 +0x292
  testing.tRunner()
      src/pkg/testing/testing.go:301 +0x86

Goroutine 183 (running) created at:
  net/http.(*Transport).getConn()
      src/pkg/net/http/transport.go:408 +0x7d8
  net/http.(*Transport).RoundTrip()
      src/pkg/net/http/transport.go:157 +0x372
  net/http.send()
      src/pkg/net/http/client.go:141 +0x526
  net/http.(*Client).Do()
      src/pkg/net/http/client.go:109 +0x10d
  net/http_test.TestRequestBodyLimit()
      src/pkg/net/http/serve_test.go:1100 +0x280
  testing.tRunner()
      src/pkg/testing/testing.go:301 +0x86

Goroutine 99 (finished) created at:
  testing.RunTests()
      src/pkg/testing/testing.go:377 +0xa3e
  testing.Main()
      src/pkg/testing/testing.go:313 +0xad
  main.main()
      net/http/_test/_testmain.go:301 +0x95
  runtime.main()
      src/pkg/runtime/proc.c:247 +0x91

Not particularly harmful, but still.
@davecheney
Copy link
Contributor

Comment 1:

This issue was closed by revision a14f87c.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
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