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, testing: Too many goroutines running after net/http test(s) with -run=Detect #20810

Closed
odeke-em opened this issue Jun 27, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@odeke-em
Copy link
Member

commented Jun 27, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version devel +952ecbe Wed Jun 14 21:44:01 2017 +0000 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN="/Users/emmanuelodeke/go/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/emmanuelodeke/go"
GORACE=""
GOROOT="/Users/emmanuelodeke/go/src/go.googlesource.com/go"
GOTOOLDIR="/Users/emmanuelodeke/go/src/go.googlesource.com/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/v3/7z434qpx5v3bw0wh8h2myfpw0000gn/T/go-build090089524=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

While writing the code and tests implementing #20808, I ran

$ go test -v -run=Detect

What did you expect to see?

=== RUN   TestHTTPSClientDetectsHTTPServer
--- PASS: TestHTTPSClientDetectsHTTPServer (0.00s)
=== RUN   TestDetectContentType
--- PASS: TestDetectContentType (0.00s)
PASS

What did you see instead?

=== RUN   TestHTTPSClientDetectsHTTPServer
--- PASS: TestHTTPSClientDetectsHTTPServer (0.00s)
=== RUN   TestDetectContentType
--- PASS: TestDetectContentType (0.00s)
PASS
Too many goroutines running after net/http test(s).
1 instances of:
os/signal.signal_recv(0x0)
	/Users/emmanuelodeke/go/src/go.googlesource.com/go/src/runtime/sigqueue.go:116 +0xa7
os/signal.loop()
	/Users/emmanuelodeke/go/src/go.googlesource.com/go/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
	/Users/emmanuelodeke/go/src/go.googlesource.com/go/src/os/signal/signal_unix.go:28 +0x41
1 instances of:
testing.(*M).before.func1(0xc420070180)
	/Users/emmanuelodeke/go/src/go.googlesource.com/go/src/testing/testing.go:1111 +0x38
created by testing.(*M).before
	/Users/emmanuelodeke/go/src/go.googlesource.com/go/src/testing/testing.go:1110 +0x191
exit status 1
FAIL	net/http	0.540s

I haven't performed a git bissection or an investigation but one can easily check that this problem doesn't exist on Go1.8 but it does on Go1.9Beta1, Go1.9Beta2

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jun 27, 2017

Weird. I thought I already marked that goroutine as a non-net/http goroutine in a9fc249

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jun 27, 2017

Oh, you're 18 commits before that.

Sync to head and it should go away. Reopen if not.

@bradfitz bradfitz closed this Jun 27, 2017

@odeke-em

This comment has been minimized.

Copy link
Member Author

commented Jun 27, 2017

Still exists on latest tip 81ed9ca. Before filling the bug report, I had just git reverted a bunch of commits trying to quickly find out what had tripped out

$ go version
go version devel +81ed9ca Tue Jun 27 19:00:52 2017 +0000 darwin/amd64
 go test -v -run=Detect
=== RUN   TestHTTPSClientDetectsHTTPServer
--- PASS: TestHTTPSClientDetectsHTTPServer (0.00s)
=== RUN   TestDetectContentType
--- PASS: TestDetectContentType (0.00s)
PASS
Too many goroutines running after net/http test(s).
1 instances of:
testing.(*M).before.func1(0xc420064180)
	/Users/emmanuelodeke/go/src/go.googlesource.com/go/src/testing/testing.go:1111 +0x38
created by testing.(*M).before
	/Users/emmanuelodeke/go/src/go.googlesource.com/go/src/testing/testing.go:1110 +0x191
exit status 1
FAIL	net/http	0.540s

@odeke-em odeke-em reopened this Jun 27, 2017

@gopherbot

This comment has been minimized.

Copy link

commented Jun 27, 2017

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

@gopherbot gopherbot closed this in 33b3cc1 Jun 27, 2017

@golang golang locked and limited conversation to collaborators Jun 27, 2018

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.