GNU bug report logs - #64123
"stat -f -c '%T' ." on alpha fails with EOVERFLOW with NFS

Previous Next

Package: coreutils;

Reported by: matoro <matoro_mailinglist_bug-coreutils <at> matoro.tk>

Date: Sat, 17 Jun 2023 08:23:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 64123 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: matoro <matoro_mailinglist_bug-coreutils <at> matoro.tk>,
 Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 64123 <at> debbugs.gnu.org
Subject: Re: bug#64123: "stat -f -c '%T' ." on alpha fails with EOVERFLOW with
 NFS
Date: Sat, 17 Jun 2023 23:19:20 +0100
On 17/06/2023 20:53, matoro wrote:
> On 2023-06-17 15:23, Paul Eggert wrote:
>> On 2023-06-17 10:30, Pádraig Brady wrote:
>>> 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?
>>
>> Weird.
>>
>> What happens if you compile with -D_FILE_OFFSET_BITS=64? Does this
>> cause alpha to have a 64-bit ino_t? (How does that work, exactly?) If
>> so, then AC_SYS_LARGEFILE should check for this and should arrange for
>> "#define _FILE_OFFSET_BITS 64".
>>
>> Matoro, what happens if you compile the following C program?
>>
>>
>> #include <sys/stat.h>
>> #include <stdio.h>
>>
>> int
>> main (void)
>> {
>>    int n = sizeof (ino_t);
>>    printf ("%d\n", n);
>> }
>>
>>
>> Compile and run it like this:
>>
>> gcc ino.c
>> ./a.out
>> gcc -D_FILE_OFFSET_BITS=64 ino.c
>> ./a.out
>>
>> If the former prints "4" and the latter "8" then we can fix Autoconf
>> and Gnulib AC_SYS_LARGEFILE to do the right thing.
>>
>> Also, as Pádraig suggests, the output of the following shell command
>> would be useful:
>>
>> strace stat -f -c '%T' .
>>
>> Also please see
>> <https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1899582>.
>> Although it's about s390x I expect there are similar issues on alpha,
>> which may not be fixed and if so it's not a coreutils issue per se.
> 
> This indeed seems to be the issue, thank you.  Compiling with
> -D_FILE_OFFSET_BITS=64 fixes the problem.
> 
> For reference, here is the additional requested information.
> 
> strace:  https://paste.matoro.tk/o1te2ek
> config.h:  https://paste.matoro.tk/93xerfg
> 
> Thank you for your help!

In case it's useful, I noticed this thread from 2014 about ino_t
and consequences of using -D_FILE_OFFSET_BITS=64
https://sourceware.org/pipermail/libc-alpha/2014-March/thread.html#49675

cheers,
Pádraig




This bug report was last modified 1 year and 341 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.