Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: Server hangs and cannot receive any more requests when using ReverseProxy #20028
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
There might be a bug in Go, but it's not clear from this report that there is. This is a little high level and I don't have time at the moment to debug it.
Have you discussed this yet on the mailing lists or other forums?
Could you put your bug report in one self-contained file and put it on play.golang.org? (And remove anything unnecessary like graceful shutdown)
I see some missing error checks and data races, but those are probably not relevant.
Is the Windows cross-compiled part relevant?
What are the goroutine stacks of the parent and child process when things get wedged?
changed the title
HTTP Server hangs and cannot receive any more requests when using ReverseProxy
Apr 19, 2017
While I did mention that it was cross compiled, I did built it natively on windows (specifically windows 2012 server) and ran it. Same issue.
I also did build it with 1.8.1 but they was with the original application that I was working on. I will return it again with this stripped down version.
If I do it in 1 self contained source in play.golang.org, does it need to be able to execute? Just asking because it needs to spawn another process to receive the http reverseproxy as well as having an external tool to call the http endpoint.
referenced this issue
Apr 19, 2017
I compiled with go 1.8.1 on windows, and has the same issue
See my comment. Wire up SIGINT to do something like:
buf := make(byte, 1<<20) buf = buf[:runtime.Stack(buf, true)] println(string(buf))
On Linux you can just send SIGQUIT (Control-) to get a goroutine dump, but I don't think you can SIGQUIT on Windows, so you'll need to write that code above.
PS C:\Shares\HenryShare\tmp> .\singlesource.exe --port=7100
goroutine 1 [chan receive]:
goroutine 5 [syscall]:
goroutine 7 [IO wait]:
goroutine 8 [semacquire]:
goroutine 9 [semacquire]:
goroutine 10 [syscall, locked to thread]:
goroutine 11 [syscall, locked to thread]:
goroutine 16 [IO wait]:
goroutine 33 [select]:
2017/04/19 13:28:49 [plugin stdout] /opt/emc/apps/golang/go/src/net/tcpsock.go:209 +0x50