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: TestServeFileMimeType failure #4021

Closed
alberts opened this issue Aug 30, 2012 · 9 comments
Closed

net/http: TestServeFileMimeType failure #4021

alberts opened this issue Aug 30, 2012 · 9 comments
Milestone

Comments

@alberts
Copy link
Contributor

alberts commented Aug 30, 2012

This looks pretty new. Haven't seen this particular failure before.

What steps will reproduce the problem?

run net/http tests in a loop

What do you see instead?

=== RUN TestServeFileMimeType-65
--- FAIL: TestServeFileMimeType-65 (0.00 seconds)
fs_test.go:338:     Content-Type mismatch: got "text/plain; charset=utf-8", want
"text/css; charset=utf-8"

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

6g

Which operating system are you using?

linux

Which version are you using?  (run 'go version')

8afe25accb81
@alberts
Copy link
Contributor Author

alberts commented Aug 31, 2012

Comment 1:

you might need a dual E5-2670 to see this.

@alberts
Copy link
Contributor Author

alberts commented Sep 1, 2012

Comment 2:

Another one:
=== RUN TestSetsRemoteAddr-48
--- FAIL: TestSetsRemoteAddr-48 (0.00 seconds)
serve_test.go:469:  Get error: Get /?n=10: stopped after 10 redirects

@alberts
Copy link
Contributor Author

alberts commented Sep 4, 2012

Comment 3:

=== RUN TestDirectoryIfNotModified-60
--- FAIL: TestDirectoryIfNotModified-60 (0.00 seconds)
fs_test.go:496: Got body "User-agent: go\nDisallow: /something/"; want "I am a fake
index.html file"

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 4:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 5:

Labels changed: added go1.1.

@alberts
Copy link
Contributor Author

alberts commented Nov 23, 2012

Comment 6:

Still seeing this stuff. Here's another one:
--- FAIL: TestIdentityResponse-46 (0.00 seconds)
serve_test.go:350: for http://127.0.0.1:39895/?te= expected res.ContentLength of 3; got
-1
serve_test.go:353: for http://127.0.0.1:39895/?te= expected Content-Length header of
"3"; got ""
serve_test.go:357: for http://127.0.0.1:39895/?te= expected len(res.TransferEncoding) of
0; got 1 ([chunked])
serve_test.go:350: for http://127.0.0.1:39895/?te=identity expected res.ContentLength of
3; got -1
serve_test.go:353: for http://127.0.0.1:39895/?te=identity expected Content-Length
header of "3"; got ""
serve_test.go:357: for http://127.0.0.1:39895/?te=identity expected
len(res.TransferEncoding) of 0; got 1 ([chunked])
FAIL
It helps to disable TestStressSurpriseServerCloses (because it takes a while) and then
run:
#!/bin/bash
set -xe
go test -c net/http
while true; do
GOMAXPROCS=$[ 1 + $[ RANDOM % 1024 ]] ./http.test -test.v
done
Also, I've found that TestStressSurpriseServerCloses deadlocks from time to time. It
seems related to some kind of error condition that arises when the system has too many
sockets in the TIME_WAIT state. Running TestStressSurpriseServerCloses in a loop for
about 10 to 20 iterations produces this situation.

@bradfitz
Copy link
Contributor

bradfitz commented Nov 26, 2012

Comment 7:

Sorry, I didn't realize this was the same issue when I filed the dup issue #4436.
If you believe this isn't the same issue, feel free to reopen this one.

Status changed to Duplicate.

Merged into issue #4436.

@alberts
Copy link
Contributor Author

alberts commented Nov 26, 2012

Comment 8:

I think there are two bugs here:
1. TestStressSurpriseServerCloses was hanging, which prevents any of the other failures
from being reproduced
2. whatever is causing the other tests to fail.
I'll retest and report back.

@bradfitz
Copy link
Contributor

bradfitz commented Nov 26, 2012

Comment 9:

TestStressSurpriseServerCloses hanging (I've never seen that, but could believe it?) is
probably related to issue #4191 which has a fix but is waiting on related issue #4434.
I think (2) was already fixed by my httptest change
http://code.google.com/p/go/source/detail?r=cd3ad880

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 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