Skip to content

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

Closed
@gopherbot

Description

@gopherbot

by [email protected]:

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions