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: TestLinuxSendfile failing on mips64 #18008

Closed
bradfitz opened this issue Nov 21, 2016 · 9 comments
Closed

net/http: TestLinuxSendfile failing on mips64 #18008

bradfitz opened this issue Nov 21, 2016 · 9 comments
Labels
FrozenDueToAge help wanted Suggested Issues that may be good for new contributors looking for work to do. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@bradfitz
Copy link
Contributor

TestLinuxSendfile is failing on mips64 (but not mips64le) with:

--- FAIL: TestLinuxSendfile (0.25s)
	fs_test.go:1122: no sendfile system call found in:
		[pid  2578] +++ exited with 0 +++
		[pid  2577] +++ exited with 0 +++
		[pid  2576] +++ exited with 0 +++
		+++ exited with 0 +++
FAIL
FAIL	net/http	96.972s

Not sure why.

@bradfitz bradfitz added this to the Go1.8 milestone Nov 21, 2016
@gopherbot
Copy link

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

gopherbot pushed a commit that referenced this issue Nov 21, 2016
Updates #18008

Change-Id: I8fde0d71d15b416db4d262f6db8ef32a209a192f
Reviewed-on: https://go-review.googlesource.com/33426
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@cherrymui
Copy link
Member

One possibility is that strace on the machine is either too old or not fully compatible with MIPS64 ABI. On some distros strace by default uses a different ABI, even the kernel is 64-bit. Not sure trace=n64_sendfile works or not.

@bradfitz
Copy link
Contributor Author

Good theory.

@bradfitz
Copy link
Contributor Author

That last CL didn't help. New output is:

--- FAIL: TestLinuxSendfile (0.16s)
	fs_test.go:1126: no sendfile system call found in:
		execve("/tmp/go-build627887128/net/http/_test/http.test", ["/tmp/go-build627887128/net/http/"..., "-test.run=TestLinuxSendfileChild"], [/* 33 vars */]) = 0
		[pid 20665] +++ exited with 0 +++
		[pid 20664] +++ exited with 0 +++
		[pid 20663] +++ exited with 0 +++
		+++ exited with 0 +++

@cherrymui
Copy link
Member

I tried to trace n64_sendfile on linux-mips64 gomote machine. Now it sees the syscall,

=== RUN   TestLinuxSendfile
--- FAIL: TestLinuxSendfile (0.22s)
	fs_test.go:1122: no sendfile system call found in:
		[pid  4003] n64_sendfile()              = 22
		[pid  4006] +++ exited with 0 +++
		[pid  4005] +++ exited with 0 +++
		[pid  4004] +++ exited with 0 +++
		+++ exited with 0 +++

but it fails to get the arguments as it uses different ABI, so the regexp match later in the test function fails.

Also changing to trace n64_sendfile would break systems on which strace is using the 64-nit ABI (because the syscall is named sendfile there...). (One possible way is to try both...)

gopherbot pushed a commit that referenced this issue Nov 22, 2016
See issues for details. We can expand this test during the Go 1.9
cycle.

Updates #18008

Change-Id: I78b6b7e8dede414769be97898e29f969bc2a9651
Reviewed-on: https://go-review.googlesource.com/33430
Reviewed-by: Cherry Zhang <cherryyz@google.com>
@bradfitz bradfitz modified the milestones: Go1.9, Go1.8 Nov 22, 2016
@bradfitz bradfitz added help wanted Suggested Issues that may be good for new contributors looking for work to do. labels Nov 22, 2016
@vstefanovic
Copy link
Member

This test is passing on a 64bit rootfs. We might want to setup mips64 buildbot to run on a 64bit rootfs (especially because of cgo), rather than adapting this test for 32bit rootfs.

@bradfitz bradfitz added the Testing An issue that has been verified to require only test changes, not just a test failure. label May 24, 2017
@bradfitz
Copy link
Contributor Author

bradfitz commented Jun 5, 2017

@vstefanovic, what's the latest here? Can the test be re-enabled or be made robust to whichever environment it's running in?

@vstefanovic
Copy link
Member

Yes, mips64 builder has a 64bit rootfs now, the test can be re-enabled.

@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Jun 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted Suggested Issues that may be good for new contributors looking for work to do. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

4 participants