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: TestSplice hangs on old versions of linux #25486

Closed
benburkert opened this issue May 22, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@benburkert
Copy link
Contributor

commented May 22, 2018

Please answer these questions before submitting your issue. Thanks!

What did you do?

go test -run TestSplice net

What did you expect to see?

The tests to run successfully.

What did you see instead?

The tests hang.

System details

go version go1.10.2 linux/386
GOARCH="386"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="386"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_386"
GCCGO="gccgo"
GO386="sse2"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m32 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build202917466=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.10.2 linux/386
GOROOT/bin/go tool compile -V: compile version go1.10.2
uname -sr: Linux 2.6.24-16-server
Distributor ID:	Ubuntu
Description:	Ubuntu 8.04
Release:	8.04
Codename:	hardy
@benburkert

This comment has been minimized.

Copy link
Contributor Author

commented May 22, 2018

The splice syscall is buggy on older versions of linux. Instead of returning 0 when reading from a closed TCP socket, it returns-EAGAIN. This causes poll.Splice() to loop forever because the EAGAIN is interpreted as the socket being not ready to read.

@gopherbot

This comment has been minimized.

Copy link

commented May 22, 2018

Change https://golang.org/cl/113999 mentions this issue: internal/poll: disable splice on old linux versions

@gopherbot gopherbot closed this in 92bdfab May 23, 2018

@golang golang locked and limited conversation to collaborators May 23, 2019

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.