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

x/net/http2: data race on pipe #15999

Closed
mikioh opened this issue Jun 8, 2016 · 1 comment
Closed

x/net/http2: data race on pipe #15999

mikioh opened this issue Jun 8, 2016 · 1 comment
Milestone

Comments

@mikioh
Copy link
Contributor

mikioh commented Jun 8, 2016

git rev-parse HEAD 154d9f9ea81208afed560f4cf27b4860c8ed1904
Looks like it's a side effect of the fix for #15930.

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

==================
WARNING: DATA RACE
Write at 0x00c422482150 by goroutine 198:
  bytes.(*Buffer).Truncate()
      /go/src/bytes/buffer.go:76 +0xde
  bytes.(*Buffer).grow()
      /go/src/bytes/buffer.go:91 +0x518
  bytes.(*Buffer).Write()
      /go/src/bytes/buffer.go:134 +0x60
  golang.org/x/net/http2.(*pipe).Write()
      /swdev/src/golang.org/x/net/http2/pipe.go:72 +0x192
  golang.org/x/net/http2.(*clientConnReadLoop).processData()
      /swdev/src/golang.org/x/net/http2/transport.go:1532 +0x42e
  golang.org/x/net/http2.(*clientConnReadLoop).run()
      /swdev/src/golang.org/x/net/http2/transport.go:1220 +0x89d
  golang.org/x/net/http2.(*ClientConn).readLoop()
      /swdev/src/golang.org/x/net/http2/transport.go:1155 +0x127

Previous read at 0x00c422482150 by goroutine 201:
  bytes.(*Buffer).Len()
      /go/src/bytes/buffer.go:58 +0x3b
  golang.org/x/net/http2.transportResponseBody.Read()
      /swdev/src/golang.org/x/net/http2/transport.go:1465 +0x4d3
  golang.org/x/net/http2.TestTransportFlowControl()
      /swdev/src/golang.org/x/net/http2/transport_test.go:1996 +0x4ab
  testing.tRunner()
      /go/src/testing/testing.go:610 +0xc9

Goroutine 198 (running) created at:
  golang.org/x/net/http2.(*Transport).NewClientConn()
      /swdev/src/golang.org/x/net/http2/transport.go:490 +0x10c8
  golang.org/x/net/http2.(*Transport).dialClientConn()
      /swdev/src/golang.org/x/net/http2/transport.go:349 +0x1c6
  golang.org/x/net/http2.(*dialCall).dial()
      /swdev/src/golang.org/x/net/http2/client_conn_pool.go:98 +0x7e

Goroutine 201 (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
==================
PASS
@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Jun 8, 2017
c3mb0 pushed a commit to c3mb0/net that referenced this issue Apr 2, 2018
Fixes golang/go#15999.

Change-Id: I20793ce717c768557c4942ff6be4e77c23ab201c
Reviewed-on: https://go-review.googlesource.com/23880
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
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

2 participants