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
Closed

net: TestSplice hangs on old versions of linux #25486

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

Comments

@benburkert
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link

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

@golang golang locked and limited conversation to collaborators May 23, 2019
@dmitshur dmitshur added this to the Go1.11 milestone Aug 17, 2022
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

3 participants