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

Closed
aprice2704 opened this issue Apr 29, 2021 · 5 comments
Closed

x/playground: httptest NewTLSServer example reports deadlock #45855

aprice2704 opened this issue Apr 29, 2021 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@aprice2704
Copy link

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
Member

probably due to networking being disabled in playground

can we detect this and return a better error?

cc @toothrot

@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 30, 2021
@cherrymui
Copy link
Member

#9679 may be related.

@yaronf
Copy link

yaronf commented Feb 11, 2022

Networking is not disabled. Examples that use httptest.NewServer sometimes succeed in the Playground, sometimes deadlock, and sometimes fail with an I/O timeout.

@toothrot
Copy link
Contributor

I haven't had a chance to look too deeply, but it could be a bug in the faketime patch, which we could consider removing.

@seankhliao
Copy link
Member

Duplicate of #48394

@seankhliao seankhliao marked this as a duplicate of #48394 Jul 3, 2022
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2022
@golang golang locked and limited conversation to collaborators Jul 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants