]> Cypherpunks repositories - gostls13.git/commit
net/http: fix Transport races & deadlocks
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 26 Nov 2012 21:31:02 +0000 (13:31 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 26 Nov 2012 21:31:02 +0000 (13:31 -0800)
commit127d2bf78595c6e07d59fd91ea97ca0bb516ed73
tree1a711bca175739f60f2319ef532f7e7af1cab4a3
parent5188c0b59cfb9f904ece4ee7e8f69d56ab15fbbd
net/http: fix Transport races & deadlocks

Thanks to Dustin Sallings for exposing the most frustrating
bug ever, and for providing repro cases (which formed the
basis of the new tests in this CL), and to Dave Cheney and
Dmitry Vyukov for help debugging and fixing.

This CL depends on submited pollster CLs ffd1e075c260 (Unix)
and 14b544194509 (Windows), as well as unsubmitted 6852085.
Some operating systems (OpenBSD, NetBSD, ?) may still require
more pollster work, fixing races (Issue 4434 and
http://goo.gl/JXB6W).

Tested on linux-amd64 and darwin-amd64, both with GOMAXPROCS 1
and 4 (all combinations of which previously failed differently)

Fixes #4191
Update #4434 (related fallout from this bug)

R=dave, bradfitz, dsallings, rsc, fullung
CC=golang-dev
https://golang.org/cl/6851061
src/pkg/net/http/export_test.go
src/pkg/net/http/server.go
src/pkg/net/http/transport.go
src/pkg/net/http/transport_test.go