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

x/playground: httptest NewTLSServer example reports deadlock #45855

Open
aprice2704 opened this issue Apr 29, 2021 · 2 comments
Open

x/playground: httptest NewTLSServer example reports deadlock #45855

aprice2704 opened this issue Apr 29, 2021 · 2 comments

Comments

@aprice2704
Copy link

@aprice2704 aprice2704 commented Apr 29, 2021

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

https://golang.org/pkg/net/http/httptest/#example_NewTLSServer

Does this issue reproduce with the latest release?

yes

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

https://golang.org/pkg/net/http/httptest/#example_NewTLSServer

What did you do?

Go to https://golang.org/pkg/net/http/httptest/#example_NewTLSServer, hit 'Run' button

What did you expect to see?

Hello, client

What did you see instead?

fatal error: all goroutines are asleep - deadlock!

goroutine 1 [select]:
net/http.(*Transport).getConn(0xc0000e83c0, 0xc0000bc2c0, 0x0, 0xc0000c80c0, 0x5, 0xc0000b6c30, 0xf, 0x0, 0x0, 0x0, ...)
/usr/local/go-faketime/src/net/http/transport.go:1368 +0x589
net/http.(*Transport).roundTrip(0xc0000e83c0, 0xc0001aa000, 0x30, 0x6f8920, 0x7fe47d80d500)
/usr/local/go-faketime/src/net/http/transport.go:579 +0x7eb
net/http.(*Transport).RoundTrip(0xc0000e83c0, 0xc0001aa000, 0xc0000e83c0, 0x0, 0x0)
/usr/local/go-faketime/src/net/http/roundtrip.go:17 +0x35
net/http.send(0xc0001aa000, 0x76c860, 0xc0000e83c0, 0x0, 0x0, 0x0, 0xc0000b8058, 0x417ed7, 0x1, 0x0)
/usr/local/go-faketime/src/net/http/client.go:251 +0x454
net/http.(*Client).send(0xc0000a0d20, 0xc0001aa000, 0x0, 0x0, 0x0, 0xc0000b8058, 0x0, 0x1, 0xc0001aa000)
/usr/local/go-faketime/src/net/http/client.go:175 +0xff
net/http.(*Client).do(0xc0000a0d20, 0xc0001aa000, 0x0, 0x0, 0x0)
/usr/local/go-faketime/src/net/http/client.go:717 +0x45f
net/http.(*Client).Do(...)
/usr/local/go-faketime/src/net/http/client.go:585
net/http.(*Client).Get(0xc0000a0d20, 0xc0000c80c0, 0x17, 0x7fe4a4463888, 0x1, 0x10100c000052058)
/usr/local/go-faketime/src/net/http/client.go:474 +0xbe
main.main()
/tmp/sandbox886861863/prog.go:18 +0x9b

goroutine 18 [IO wait]:
internal/ .........................

@seankhliao seankhliao changed the title httptest NewTLSServer example reports deadlock x/playground: httptest NewTLSServer example reports deadlock Apr 29, 2021
@gopherbot gopherbot added this to the Unreleased milestone Apr 29, 2021
@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Apr 29, 2021

probably due to networking being disabled in playground

can we detect this and return a better error?

cc @toothrot

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Apr 30, 2021

#9679 may be related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants