Subject: bug#64123: "stat -f -c '%T' ." on alpha fails with EOVERFLOW with NFS

From: Pádraig Brady <[email-masked]>
Date: Sat, 17 Jun 2023 18:30:40 +0100

On 17/06/2023 00:55, matoro via GNU coreutils Bug Reports wrote:
> Hi, when running the command "stat -f -c '%T' ." on an alpha while being
> on an NFS filesystem, the command fails with EOVERFLOW.
> 
> $ stat -f -c "%T" .
> stat: cannot read file system information for '.': Value too large for
> defined data type
> 
> The command does NOT fail when targeting any other filesystem type.
> 
> $ stat -f -c "%T" /
> ext2/ext3
> 
> I am aware that EOVERFLOW is typically associated with 32-bit systems
> failing to hold 64-bit inodes and such.  However, alpha is a pure 64-bit
> system; there does not even exist a 32-bit version.
> 
> This is the only platform on which I have observed this behavior.  I
> also checked on all other platforms, including x86, arm, ppc, riscv,
> mips, sparc, hppa, and ia64.  No other platform exhibited this error.
> 
> I am using kernel 6.3, glibc 2.37, and coreutils 9.3.  If anybody would
> mind taking a look at this bug, I can provide direct shell access to the
> machine in question, with strace etc installed.  Thank you!

Output from strace would be helpful,
though I suspect the issue is in glibc or the kernel.

I see that s390 and alpha are the only 64 bit architectures
that have a 32-bit ino_t for example, which may cause issues within glibc?

If you're compiling coreutils yourself, a copy of lib/config.h
would also be helpful.

cheers,
Pádraig