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: benchmarks leak goroutines #10845

Closed
josharian opened this issue May 14, 2015 · 6 comments
Closed

net: benchmarks leak goroutines #10845

josharian opened this issue May 14, 2015 · 6 comments
Milestone

Comments

@josharian
Copy link
Contributor

$ go test -benchtime=10ms -run=NONE -bench=. net
PASS
BenchmarkGoLookupIP                            1      40965233 ns/op
BenchmarkGoLookupIPNoSuchHost                  1      19965162 ns/op
BenchmarkGoLookupIPWithBrokenNameServer        1    5018456515 ns/op
BenchmarkDNSName                           20000           527 ns/op
BenchmarkInterfaces                          500         22694 ns/op
BenchmarkInterfaceByIndex                   2000          8077 ns/op
BenchmarkInterfaceByName                    1000         23937 ns/op
BenchmarkInterfaceAddrs                      500         25500 ns/op
BenchmarkInterfacesAndAddrs                 2000          9571 ns/op
BenchmarkInterfacesAndMulticastAddrs        1000         16570 ns/op
BenchmarkParseIP                            5000          2782 ns/op
BenchmarkIPString                          10000          1979 ns/op
BenchmarkIPMaskString                      30000           518 ns/op
BenchmarkTCP4OneShot                         100        124088 ns/op
BenchmarkTCP4OneShotTimeout                  100        161610 ns/op
BenchmarkTCP4Persistent                      500         22614 ns/op
BenchmarkTCP4PersistentTimeout               500         22398 ns/op
BenchmarkTCP6OneShot                         100        191345 ns/op
BenchmarkTCP6OneShotTimeout                  100        185625 ns/op
BenchmarkTCP6Persistent                      500         23476 ns/op
BenchmarkTCP6PersistentTimeout               500         23658 ns/op
BenchmarkTCP4ConcurrentReadWrite            1000         16150 ns/op
BenchmarkTCP6ConcurrentReadWrite            1000         19477 ns/op
Leaked goroutines:
time.Sleep(0x12a05f200)
    /Users/jbleechersnyder/src/go/src/runtime/time.go:59 +0xfc
net.loadConfig.func1(0x12a05f200, 0x0, 0x32cb50, 0x10, 0xc20800e2e0)
    /Users/jbleechersnyder/src/go/src/net/dnsclient_unix.go:241 +0x36
created by net.loadConfig
    /Users/jbleechersnyder/src/go/src/net/dnsclient_unix.go:267 +0x17d

ok      net 5.498s

Possibly will be fixed by CL 9991. /cc @axaxs

@josharian josharian added this to the Go1.5 milestone May 14, 2015
@mikioh
Copy link
Contributor

mikioh commented May 14, 2015

FWIW, I changed the banner "Leaked goroutines:" to "Running goroutines:" in 3b38626. Because we need some persistent goroutines when we run IO completion cancellation mech. unsupported Windows kernels, as @alexbrainman suggested in the review.

@josharian
Copy link
Contributor Author

Can we remove it entirely, then? If it isn't informing the user that something is wrong, then it is just noise.

@bradfitz
Copy link
Contributor

Or be careful about which ones you complain about, like net/http's tests.

@mikioh
Copy link
Contributor

mikioh commented May 14, 2015

Yup, it's stole from net/http, behaving like net/http makes sense. I'll tweak it once change 9991 lands.

@gopherbot
Copy link

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

@gopherbot
Copy link

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

mikioh pushed a commit that referenced this issue May 23, 2015
Updates #10845.

Change-Id: I4cec670c7db88c50a6e5619e611744e161d73b3c
Reviewed-on: https://go-review.googlesource.com/10131
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@golang golang locked and limited conversation to collaborators Jun 25, 2016
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