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: TestRetryIdempotentRequestsOnError flake #18205

Closed
bradfitz opened this issue Dec 6, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@bradfitz
Copy link
Member

commented Dec 6, 2016

freebsd-amd64-race at 8adff32
https://build.golang.org/log/30e8693dc4f6f4a974cd3fe10b56a03cfc54536d

--- FAIL: TestRetryIdempotentRequestsOnError (0.28s)
	transport_test.go:2610: did not trigger any retries
FAIL
FAIL	net/http	7.277s

@bradfitz bradfitz added the Testing label Dec 6, 2016

@bradfitz bradfitz added this to the Go1.8Maybe milestone Dec 6, 2016

@bradfitz bradfitz self-assigned this Dec 6, 2016

@vcabbage

This comment has been minimized.

Copy link
Member

commented Jan 8, 2017

I can somewhat reliably reproduce this on darwin/amd64 with the -race flag.

# go test -race -c
# while ./http.test -test.run=TestRetryIdempotentRequestsOnError -test.v; do; done
=== RUN   TestRetryIdempotentRequestsOnError
finished after 34 runs
--- PASS: TestRetryIdempotentRequestsOnError (0.09s)
PASS
=== RUN   TestRetryIdempotentRequestsOnError
finished after 90 runs
--- PASS: TestRetryIdempotentRequestsOnError (0.20s)
PASS
=== RUN   TestRetryIdempotentRequestsOnError
finished after 98 runs
--- PASS: TestRetryIdempotentRequestsOnError (0.20s)
PASS
=== RUN   TestRetryIdempotentRequestsOnError
--- FAIL: TestRetryIdempotentRequestsOnError (0.21s)
	transport_test.go:2623: did not trigger any retries
FAIL

After limiting GOMAXPROCS to 1 for the duration of the test (defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))), the test consistently triggered a retry on the first loop (ran ~100 test runs with same result).

Should I go ahead and open a CL with the change?

@bradfitz

This comment has been minimized.

Copy link
Member Author

commented Jan 9, 2017

@vcabbage, changing GOMAXPROCS is a bit of a hack. I'd rather rewrite that whole test to be more fine-grained and thus faster and more reliable in the process.

@vcabbage

This comment has been minimized.

Copy link
Member

commented Jan 9, 2017

@bradfitz Makes sense. FWIW, I ran across this when testing one of my CLs. Tripped me up because I thought I had introduced a bug.

@gopherbot

This comment has been minimized.

Copy link

commented Jan 10, 2017

CL https://golang.org/cl/35107 mentions this issue.

@gopherbot gopherbot closed this in ac05542 Jan 11, 2017

@golang golang locked and limited conversation to collaborators Jan 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.