Debian Bug report logs - #1026235
tar: ftbfs with recent glibc

version graph

Package: src:libc6; Maintainer for src:libc6 is GNU Libc Maintainers <[email protected]>;

Affects: tar

Reported by: John David Anglin <[email protected]>

Date: Fri, 16 Dec 2022 20:48:01 UTC

Severity: normal

Tags: lfs

Found in version libc6/2.36-6

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], [email protected]:
Bug#1026235; Package src:libc6. (Fri, 16 Dec 2022 20:48:03 GMT) (full text, mbox, link).


Acknowledgement sent to John David Anglin <[email protected]>:
New Bug report received and forwarded. Copy sent to [email protected]. (Fri, 16 Dec 2022 20:48:03 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: John David Anglin <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: tar: ftbfs with recent glibc
Date: Fri, 16 Dec 2022 20:45:19 +0000
Source: libc6
Version: 2.36-6
Severity: normal

Dear Maintainer,

See the following BZ for tar:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026204

__USE_TIME_BITS64 now needs to be defined on most 32-bit
architectures to build tar even when _FILE_OFFSET_BITS=64
is selected. The folowing error occurs from glibc:
+tar: dir/f2038-01-19T03\:14\:08.9: Cannot stat: Value too large for defined data type

The following two commits changed the handling of file times:

commit dd4131c8322891a0ad7cfb661efa41aecc02b581
Author: Aurelien Jarno <[email protected]>
Date:   Tue Nov 1 20:43:55 2022 +0100

    linux: Fix fstatat on MIPSn64 (BZ #29730)

    Commit 6e8a0aac2f883 ("time: Fix overflow itimer tests on 32-bit
    systems") changed in_time_t_range to assume a 32-bit time_t. This broke
    fstatat on MIPSn64 that was using it with a 64-bit time_t due to
    difference between stat and stat64. This commit fix that by adding a
    MIPSn64 specific version, which bypasses the EOVERFLOW tests.

    Resolves: BZ #29730

    Reviewed-by: Adhemerval Zanella  <[email protected]>
    (cherry picked from commit 7457b7eef8dfe8cc48e55b9f9837df6dd397b80d)

commit 7b7dfbb0cbdffebf0233c650627a4861212fbb60
Author: Adhemerval Zanella <[email protected]>
Date:   Wed Oct 19 19:14:04 2022 -0300

    linux: Fix generic struct_stat for 64 bit time (BZ# 29657)

    The generic Linux struct_stat misses the conditionals to use
    bits/struct_stat_time64_helper.h in the __USE_TIME_BITS64 for
    architecture that uses __TIMESIZE == 32 (currently csky and nios2).

    Since newer ports should not support 32 bit time_t, the generic
    implementation should be used as default.

    For arm, hppa, and sh a copy of default struct_stat is added,
    while for csky and nios a new one based on generic is used, along
    with conditionals to use bits/struct_stat_time64_helper.h.

    The default struct_stat is also replaced with the generic one.

    Checked on aarch64-linux-gnu and arm-linux-gnueabihf.

    (cherry picked from commit 7a6ca82f8007ddbd43e2b8fce806ba7101ee47f5)

I think __USE_TIME_BITS64 should be defined when _FILE_OFFSET_BITS==64
This would avoid the overflow converting tv_sec from 64 to 32 bits.

Regards,
Dave

-- System Information:
Debian Release: bookworm/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable')
Architecture: hppa (parisc64)

Kernel: Linux 6.0.12 (SMP w/4 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

-- debconf information excluded



Information forwarded to [email protected], [email protected]:
Bug#1026235; Package src:libc6. (Fri, 16 Dec 2022 21:33:02 GMT) (full text, mbox, link).


Acknowledgement sent to Florian Weimer <[email protected]>:
Extra info received and forwarded to list. Copy sent to [email protected]. (Fri, 16 Dec 2022 21:33:03 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Florian Weimer <[email protected]>
To: John David Anglin <[email protected]>
Cc: [email protected]
Subject: Re: Bug#1026235: tar: ftbfs with recent glibc
Date: Fri, 16 Dec 2022 22:24:29 +0100
* John David Anglin:

> I think __USE_TIME_BITS64 should be defined when _FILE_OFFSET_BITS==64
> This would avoid the overflow converting tv_sec from 64 to 32 bits.

It's an ABI break.  You probably can enable it in the tar build safely
because it's not a library.  But doing it by default across the
distribution is difficult because it changes the meaning of time_t in
header files.

Thanks,
Florian




Information forwarded to [email protected], [email protected]:
Bug#1026235; Package src:libc6. (Fri, 16 Dec 2022 21:45:07 GMT) (full text, mbox, link).


Acknowledgement sent to John David Anglin <[email protected]>:
Extra info received and forwarded to list. Copy sent to [email protected]. (Fri, 16 Dec 2022 21:45:07 GMT) (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: John David Anglin <[email protected]>
To: Florian Weimer <[email protected]>
Cc: [email protected]
Subject: Re: Bug#1026235: tar: ftbfs with recent glibc
Date: Fri, 16 Dec 2022 16:38:01 -0500
On 2022-12-16 4:24 p.m., Florian Weimer wrote:
> * John David Anglin:
>
>> I think __USE_TIME_BITS64 should be defined when _FILE_OFFSET_BITS==64
>> This would avoid the overflow converting tv_sec from 64 to 32 bits.
> It's an ABI break.  You probably can enable it in the tar build safely
> because it's not a library.  But doing it by default across the
> distribution is difficult because it changes the meaning of time_t in
> header files.
But it seems we already have an ABI break since tar built before the recent glibc changes.

Regards,
Dave

-- 
John David Anglin  [email protected]




Information forwarded to [email protected], [email protected]:
Bug#1026235; Package src:libc6. (Fri, 16 Dec 2022 22:36:03 GMT) (full text, mbox, link).


Acknowledgement sent to Florian Weimer <[email protected]>:
Extra info received and forwarded to list. Copy sent to [email protected]. (Fri, 16 Dec 2022 22:36:03 GMT) (full text, mbox, link).


Message #20 received at [email protected] (full text, mbox, reply):

From: Florian Weimer <[email protected]>
To: John David Anglin <[email protected]>
Cc: [email protected]
Subject: Re: Bug#1026235: tar: ftbfs with recent glibc
Date: Fri, 16 Dec 2022 23:33:43 +0100
* John David Anglin:

> On 2022-12-16 4:24 p.m., Florian Weimer wrote:
>> * John David Anglin:
>>
>>> I think __USE_TIME_BITS64 should be defined when _FILE_OFFSET_BITS==64
>>> This would avoid the overflow converting tv_sec from 64 to 32 bits.
>> It's an ABI break.  You probably can enable it in the tar build safely
>> because it's not a library.  But doing it by default across the
>> distribution is difficult because it changes the meaning of time_t in
>> header files.

> But it seems we already have an ABI break since tar built before the
> recent glibc changes.

No, not an ABI break.  A regression.  I suspect the glibc bugfix exposed
that the tar test was failing all along.

Thanks,
Florian




Information forwarded to [email protected], [email protected]:
Bug#1026235; Package src:libc6. (Fri, 16 Dec 2022 22:51:02 GMT) (full text, mbox, link).


Acknowledgement sent to John David Anglin <[email protected]>:
Extra info received and forwarded to list. Copy sent to [email protected]. (Fri, 16 Dec 2022 22:51:02 GMT) (full text, mbox, link).


Message #25 received at [email protected] (full text, mbox, reply):

From: John David Anglin <[email protected]>
To: Florian Weimer <[email protected]>
Cc: [email protected]
Subject: Re: Bug#1026235: tar: ftbfs with recent glibc
Date: Fri, 16 Dec 2022 17:42:49 -0500
On 2022-12-16 5:33 p.m., Florian Weimer wrote:
> * John David Anglin:
>
>> On 2022-12-16 4:24 p.m., Florian Weimer wrote:
>>> * John David Anglin:
>>>
>>>> I think __USE_TIME_BITS64 should be defined when _FILE_OFFSET_BITS==64
>>>> This would avoid the overflow converting tv_sec from 64 to 32 bits.
>>> It's an ABI break.  You probably can enable it in the tar build safely
>>> because it's not a library.  But doing it by default across the
>>> distribution is difficult because it changes the meaning of time_t in
>>> header files.
>> But it seems we already have an ABI break since tar built before the
>> recent glibc changes.
> No, not an ABI break.  A regression.  I suspect the glibc bugfix exposed
> that the tar test was failing all along.
If we are sure that the glibc bugfix just exposed the tar problem, then this issue can be closed.

Dave

-- 
John David Anglin  [email protected]




Added tag(s) lfs. Request was from Helge Deller <[email protected]> to [email protected]. (Sat, 17 Dec 2022 10:06:03 GMT) (full text, mbox, link).


Added indication that 1026235 affects tar Request was from Helge Deller <[email protected]> to [email protected]. (Sat, 17 Dec 2022 10:12:03 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 13:08:36 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.