syscall: inconsistent error messages for syscall.ESTALE across architectures #71309
Open
Description
Go version
go 1.23.4
Output of go env
in your module/workspace:
go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/vipinydv_google_com/.cache/go-build'
GOENV='/home/vipinydv_google_com/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/vipinydv_google_com/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/vipinydv_google_com/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/vipinydv_google_com/go/pkg/mod/golang.org/[email protected]'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/vipinydv_google_com/go/pkg/mod/golang.org/[email protected]/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.23.4'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/vipinydv_google_com/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/vipinydv_google_com/gcsfuse/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build342134929=/tmp/go-build -gno-record-gcc-switches'
What did you do?
Steps to Reproduce:
- Write a Go program that returns the
syscall.ESTALE
error. - Run the program on an arm64 and amd64 machines and observe the error message.
FYI : This discrepancy is not limited to these two architectures and exists on other platforms as well.
What did you see happen?
When returning the syscall.ESTALE
error in a Go program, the error message displayed to the user varies depending on the machine's architecture. On arm64 machines, users see "stale file handle", while on amd64 machines, they see "stale NFS file handle". This inconsistency violates the principle of consistent error reporting and contradicts the Linux Manual Page, which states that ESTALE
applies to both NFS and other filesystems.
What did you expect to see?
The error message for syscall.ESTALE
should be "stale file handle" on all architectures.
If needed I can raise a PR for the same.
Metadata
Assignees
Labels
Type
Projects
Status
In Progress