syscall: inconsistent error messages for syscall.ESTALE across architectures #71309
Labels
BugReport
Issues describing a possible bug in the Go implementation.
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go 1.23.4
Output of
go env
in your module/workspace:What did you do?
Steps to Reproduce:
syscall.ESTALE
error.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 thatESTALE
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.
The text was updated successfully, but these errors were encountered: