Bug 30111 - support_descriptors_list fails after 2038 on 32 bits systems
Summary: support_descriptors_list fails after 2038 on 32 bits systems
Status: UNCONFIRMED
Alias: None
Product: glibc
Classification: Unclassified
Component: time (show other bugs)
Version: 2.35
: P2 normal
Target Milestone: 2.38
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-10 09:44 UTC by LEMOUZY Benjamin
Modified: 2024-03-13 09:15 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
strace before 2038 (1.40 KB, text/plain)
2023-02-10 09:45 UTC, LEMOUZY Benjamin
Details
strace after 2038 (1.60 KB, text/plain)
2023-02-10 09:45 UTC, LEMOUZY Benjamin
Details
Strace with backported changes in 2.35 before 2038 (41.62 KB, text/plain)
2024-03-12 07:35 UTC, LEMOUZY Benjamin
Details
Strace with backported changes in 2.35 after 2038 (1.66 KB, text/plain)
2024-03-12 07:35 UTC, LEMOUZY Benjamin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LEMOUZY Benjamin 2023-02-10 09:44:37 UTC
Environment
===========

- i.MX6 32 bits CPU
- Yocto Kirkstone (kirkstone-4.0.6)
- Linux 5.10.109
- glibc 2.35 (8d125a1f9145ad90c94e438858d6b5b7578686f2)
- RFS built with "-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64" flags
- System date set after 011903142038 (2038 Jan 19 03:14:00)

Description
===========

tst-lchmod-time64 returns after 2038:

    error: support_descriptors.c:103: readdir: fstat64 (0) failed: Value too large for defined data type
    error: 1 test failures

tst-lchmod-time64 returns before 2038:

    info: testing lchmod
    info: testing fchmodat with AT_FDCWD
    info: testing fchmodat with relative path
    info: re-running tests (after trying to empty /proc)
    info: testing lchmod
    info: testing fchmodat with AT_FDCWD
    info: testing fchmodat with relative path

Please find associated strace attached.
Comment 1 LEMOUZY Benjamin 2023-02-10 09:45:07 UTC
Created attachment 14672 [details]
strace before 2038
Comment 2 LEMOUZY Benjamin 2023-02-10 09:45:34 UTC
Created attachment 14673 [details]
strace after 2038
Comment 3 Andreas Schwab 2023-02-23 12:31:44 UTC
The failure is unrelated to lchmod, it occurs in support_descriptors_list.
Comment 4 Andreas Schwab 2023-03-02 12:06:49 UTC
Fixed in 2.38.
Comment 5 LEMOUZY Benjamin 2024-03-12 07:34:09 UTC
Hello,

As https://sourceware.org/git/?p=glibc.git;a=commit;h=3bfdc4e2bceb601b90c81a9baa73c1904db58b2f has not been backported to release/2.35/master, I did it myself.

But I still have the issue:

  # date
  Tue Mar 12 06:53:05 UTC 2024
  # /usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-lchmod-time64
  info: testing lchmod
  info: testing fchmodat with AT_FDCWD
  info: testing fchmodat with relative path
  info: re-running tests (after trying to empty /proc)
  info: testing lchmod
  info: testing fchmodat with AT_FDCWD
  info: testing fchmodat with relative path


  # date
  Thu Jan 19 03:14:02 UTC 2040
  # /usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-lchmod-time64
  error: support_descriptors.c:103: readdir: fstat64 (0) failed: Value too large for defined data type
  error: 1 test failures

Do I also need to backport another commits to fix it in 2.35?
(new strace outputs attached)
Comment 6 LEMOUZY Benjamin 2024-03-12 07:35:16 UTC
Created attachment 15396 [details]
Strace with backported changes in 2.35 before 2038
Comment 7 LEMOUZY Benjamin 2024-03-12 07:35:34 UTC
Created attachment 15397 [details]
Strace with backported changes in 2.35 after 2038
Comment 8 Adhemerval Zanella 2024-03-12 19:33:24 UTC
It requires 3bfdc4e2bceb601b90c81a9baa73c1904db58b2f to fully use 64 bits on libsupport. I have backported it on 2.35, 2.36, and 2.37.
Comment 9 LEMOUZY Benjamin 2024-03-13 09:15:26 UTC
(In reply to Adhemerval Zanella from comment #8)
> I have backported it on 2.35, 2.36, and 2.37.
I just tested a24adf3572ad23fc5098d4cc62ff821cff1ef3c5 on release/2.35/master and the test successfully pass.
Thanks for that!