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: test fails with "Too many goroutines running" after benchmarks #9033

Closed
jbardin opened this issue Oct 31, 2014 · 4 comments
Closed
Milestone

Comments

@jbardin
Copy link
Contributor

jbardin commented Oct 31, 2014

What does 'go version' print?

go1.4beta1

What steps reproduce the problem?

from net/http run:

    $ go test -run NONE -bench ClientServerParallel

What happened?

Test failure with:

Too many goroutines running after net/http test(s).
1 instances of:
net/http.(*persistConn).writeLoop(0xc2085738c0)
    /home/pretzel/go/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
    /home/pretzel/go/src/net/http/transport.go:661 +0xcbc1 instances of:
net/http.(*persistConn).writeLoop(0xc208601ef0)
    /home/pretzel/go/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
[...]

Please provide any additional information below.

On linux/amd64 the goroutines all seem to be in *persistConn.writeLoop, while on
darwin/amd64 they all over the place in various goroutines.
@ianlancetaylor
Copy link
Contributor

Comment 1:

Happens for me too on GNU/Linux.
> go test -run NONE -bench ClientServerParallel net/http
PASS
BenchmarkClientServerParallel4     20000         89747 ns/op        4600 B/op         62 allocs/op
BenchmarkClientServerParallel64    20000         90859 ns/op        4427 B/op         62
allocs/op
BenchmarkClientServerParallelTLS4      20000        105482 ns/op        4780 B/op         78
allocs/op
BenchmarkClientServerParallelTLS64     10000        145782 ns/op        5652 B/op         95
allocs/op
Too many goroutines running after net/http test(s).
1 instances of:
net/http.(*persistConn).writeLoop(0xc2085c36b0)
    /home/iant/go/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
    /home/iant/go/src/net/http/transport.go:661 +0xcbc1 instances of:
net/http.(*persistConn).writeLoop(0xc20862c4d0)
    /home/iant/go/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
    /home/iant/go/src/net/http/transport.go:661 +0xcbc1 instances of:
net/http.(*persistConn).writeLoop(0xc208060580)
    /home/iant/go/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
    /home/iant/go/src/net/http/transport.go:661 +0xcbc1 instances of:
net/http.(*persistConn).writeLoop(0xc208060dc0)
    /home/iant/go/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
    /home/iant/go/src/net/http/transport.go:661 +0xcbc1 instances of:
net/http.(*persistConn).writeLoop(0xc208061a20)
    /home/iant/go/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
    /home/iant/go/src/net/http/transport.go:661 +0xcbc1 instances of:
net/http.(*persistConn).writeLoop(0xc2085c3290)
    /home/iant/go/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
    /home/iant/go/src/net/http/transport.go:661 +0xcbc1 instances of:
net/http.(*persistConn).writeLoop(0xc20862cfd0)
    /home/iant/go/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
    /home/iant/go/src/net/http/transport.go:661 +0xcbc1 instances of:
net/http.(*persistConn).writeLoop(0xc208060630)
    /home/iant/go/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
etc.

Labels changed: added repo-main, release-go1.4.

Status changed to Accepted.

@bradfitz
Copy link
Contributor

bradfitz commented Nov 8, 2014

Comment 3:

Owner changed to @bradfitz.

Status changed to Started.

@gopherbot
Copy link

Comment 4:

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

@bradfitz
Copy link
Contributor

bradfitz commented Nov 8, 2014

Comment 5:

This issue was closed by revision cf105e2.

Status changed to Fixed.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
New detection because of net/http now using TestMain.

Fixes golang#9033

LGTM=iant
R=golang-codereviews, iant
CC=adg, golang-codereviews, rsc
https://golang.org/cl/170210043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 26, 2018
New detection because of net/http now using TestMain.

Fixes golang#9033

LGTM=iant
R=golang-codereviews, iant
CC=adg, golang-codereviews, rsc
https://golang.org/cl/170210043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
New detection because of net/http now using TestMain.

Fixes golang#9033

LGTM=iant
R=golang-codereviews, iant
CC=adg, golang-codereviews, rsc
https://golang.org/cl/170210043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 20, 2018
New detection because of net/http now using TestMain.

Fixes golang#9033

LGTM=iant
R=golang-codereviews, iant
CC=adg, golang-codereviews, rsc
https://golang.org/cl/170210043
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018
New detection because of net/http now using TestMain.

Fixes golang#9033

LGTM=iant
R=golang-codereviews, iant
CC=adg, golang-codereviews, rsc
https://golang.org/cl/170210043
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

5 participants