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

Comments

Projects
None yet
4 participants
@josharian
Copy link
Contributor

commented May 14, 2015

$ 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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

commented May 14, 2015

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

@bradfitz

This comment has been minimized.

Copy link
Member

commented May 14, 2015

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

@mikioh

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

commented May 14, 2015

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

@gopherbot

This comment has been minimized.

Copy link

commented May 15, 2015

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

@bradfitz bradfitz closed this in ef7e108 May 15, 2015

mikioh pushed a commit that referenced this issue May 23, 2015

Mikio Hara
net: don't show verbose information when -test.v=false
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.
You can’t perform that action at this time.