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: test failures due to ServeHTTP timeouts #43624

Closed
bcmills opened this issue Jan 11, 2021 · 1 comment
Closed

net/http/cgi: test failures due to ServeHTTP timeouts #43624

bcmills opened this issue Jan 11, 2021 · 1 comment
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Jan 11, 2021

--- FAIL: TestKillChildAfterCopyError (5.01s)
    integration_test.go:127: timeout. ServeHTTP hung and didn't kill the child process?
    integration_test.go:131: killed process
2021/01/08 15:34:26 cgi: no headers
2021/01/08 15:34:34 cgi: no headers
2021/01/08 15:34:34 cgi: missing required Content-Type in headers
2021/01/08 15:34:35 cgi: no headers
FAIL
FAIL	net/http/cgi	15.282s

2021-01-08T22:55:41-59bfc18/windows-arm-zx2c4
2020-05-01T21:57:29-be08e10/plan9-amd64-9front

It looks like the test hard-codes a 5-second timeout for this operation, ignoring the actual timeout for the test:

case <-time.After(5 * time.Second):
t.Errorf("timeout. ServeHTTP hung and didn't kill the child process?")

It isn't clear to me why this test is using its own timeout logic at all — if the test deadlocks for some reason, it seems more useful to get a stack dump instead of a killed process message. Probably this timeout code should just be removed, and the call to h.ServeHTTP should be performed synchronously in the test function (instead of in a separate goroutine).

CC @zx2c4 @golang/release

@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Jan 11, 2021
@bcmills bcmills added this to the Backlog milestone Jan 11, 2021
@gopherbot
Copy link

Change https://golang.org/cl/284778 mentions this issue: net/http/cgi: Remove hard-coded ServeHTTP timeout

@dmitshur dmitshur modified the milestones: Backlog, Go1.17 Apr 21, 2021
@golang golang locked and limited conversation to collaborators Apr 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants