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/cgi: CGI requests leak processes on output failure #7196

Closed
gopherbot opened this issue Jan 23, 2014 · 6 comments
Closed

net/http/cgi: CGI requests leak processes on output failure #7196

gopherbot opened this issue Jan 23, 2014 · 6 comments
Milestone

Comments

@gopherbot
Copy link

by steven.hartland@multiplay.co.uk:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. create a app which uses a long running CGI process
2. disconnect while receiving the output from the CGI request

What is the expected output?
The CGI process should be aborted


What do you see instead?
The CGI process is still running


Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
FreeBSD 8.3-RELEASE

Which version are you using?  (run 'go version')
go version go1.2 freebsd/amd64

Please provide any additional information below.
Patch attached which fixes the issue for us. Its quite harsh in that it uses Kill but I
believe its the only 100% safe way to avoid leaking processes as just calling .Cost on
the process io streams may not have the desired effect.

Attachments:

  1. cgi-proc-leak.patch (599 bytes)
@bradfitz
Copy link
Contributor

Comment 1:

We don't attach patches to the bug tracker.  Our development and code review workflow is
documented at:
http://golang.org/doc/contribute.html
Be sure to submit a CLA as well:
http://golang.org/doc/contribute.html#copyright

@davecheney
Copy link
Contributor

Comment 2:

Please submit your patch via the CLA process outlined in comment number 1.

Status changed to WaitingForReply.

@rsc
Copy link
Contributor

rsc commented Mar 3, 2014

Comment 3:

This is a one-line fix. Someone please just recreate the CL.

Labels changed: added release-go1.3.

Status changed to Accepted.

@gopherbot
Copy link
Author

Comment 4 by mail@nicolasdavies.com.au:

I applied the patch as CL 72030043

@bradfitz
Copy link
Contributor

bradfitz commented Mar 6, 2014

Comment 5:

Re comment #4, that's not just the fix... that's also the whole comment for which we
don't have a CLA on file.  I know it's trivial, but I like to keep lawyers happy.
I've fixed it myself, and included a test in https://golang.org/cl/69970052

Owner changed to @bradfitz.

Status changed to Started.

@bradfitz
Copy link
Contributor

bradfitz commented Mar 6, 2014

Comment 6:

This issue was closed by revision 5db255f.

Status changed to Fixed.

@rsc rsc added this to the Go1.3 milestone Apr 14, 2015
@rsc rsc removed the release-go1.3 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants