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

Comments

Projects
None yet
4 participants
@bradfitz
Copy link
Member

commented Nov 21, 2016

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

This comment has been minimized.

Copy link

commented Nov 21, 2016

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

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

net/http: maybe fix TestLinuxSendfile on mips64
Updates #18008

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

This comment has been minimized.

Copy link
Contributor

commented Nov 21, 2016

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

This comment has been minimized.

Copy link
Member Author

commented Nov 21, 2016

Good theory.

@bradfitz

This comment has been minimized.

Copy link
Member Author

commented Nov 21, 2016

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

This comment has been minimized.

Copy link
Contributor

commented Nov 22, 2016

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

net/http: skip TestLinuxSendfile on mips64 for now
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

@vstefanovic

This comment has been minimized.

Copy link
Member

commented Nov 22, 2016

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 label May 24, 2017

@bradfitz

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link
Member

commented Jun 6, 2017

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

@gopherbot

This comment has been minimized.

Copy link

commented Jun 6, 2017

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

@gopherbot gopherbot closed this in fab47f7 Jun 8, 2017

@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.
You can’t perform that action at this time.