public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/31186] New: Some dirent/io tests don't work on xfs
@ 2023-12-22 16:18 hjl.tools at gmail dot com
  2023-12-29 13:29 ` [Bug libc/31186] " adhemerval.zanella at linaro dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: hjl.tools at gmail dot com @ 2023-12-22 16:18 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

            Bug ID: 31186
           Summary: Some dirent/io tests don't work on xfs
           Product: glibc
           Version: 2.39
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

When I was building and testing i686 glibc on xfs, I got

FAIL: dirent/list
FAIL: dirent/tst-readdir64-compat
FAIL: io/bug-ftw2
FAIL: io/ftwtest
FAIL: io/tst-ftw-lnk

i686 dirent/list gave

.
.       file number 46282493
..      file number 2187265413
config.log      file number 46282494
readdir: Value too large for defined data type

x86-64 dirent/list gave:

.
.       file number 46282493
..      file number 2187265413
config.log      file number 46282494
sunrpc  file number 4366544490

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/31186] Some dirent/io tests don't work on xfs
  2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
@ 2023-12-29 13:29 ` adhemerval.zanella at linaro dot org
  2023-12-29 15:49 ` hjl.tools at gmail dot com
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2023-12-29 13:29 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
I think this a duplicate of B#23960, afaik XFS uses a similar strategy EXT4
uses to define inodes as a 64b-bit hash nad it might overflow depending of the
underling FS contents.  Could you check if
https://patchwork.sourceware.org/project/glibc/list/?series=18052 improves
this?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/31186] Some dirent/io tests don't work on xfs
  2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
  2023-12-29 13:29 ` [Bug libc/31186] " adhemerval.zanella at linaro dot org
@ 2023-12-29 15:49 ` hjl.tools at gmail dot com
  2023-12-29 18:32 ` adhemerval.zanella at linaro dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: hjl.tools at gmail dot com @ 2023-12-29 15:49 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Adhemerval Zanella from comment #1)
> I think this a duplicate of B#23960, afaik XFS uses a similar strategy EXT4
> uses to define inodes as a 64b-bit hash nad it might overflow depending of
> the underling FS contents.  Could you check if
> https://patchwork.sourceware.org/project/glibc/list/?series=18052 improves
> this?

It doesn't help:

[hjl@gnu-icx-1 build-i686-linux]$ ./dirent/list 
.
readdir: Value too large for defined data type
[hjl@gnu-icx-1 build-i686-linux]$

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/31186] Some dirent/io tests don't work on xfs
  2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
  2023-12-29 13:29 ` [Bug libc/31186] " adhemerval.zanella at linaro dot org
  2023-12-29 15:49 ` hjl.tools at gmail dot com
@ 2023-12-29 18:32 ` adhemerval.zanella at linaro dot org
  2023-12-29 18:56 ` hjl.tools at gmail dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2023-12-29 18:32 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

--- Comment #3 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to H.J. Lu from comment #2)
> (In reply to Adhemerval Zanella from comment #1)
> > I think this a duplicate of B#23960, afaik XFS uses a similar strategy EXT4
> > uses to define inodes as a 64b-bit hash nad it might overflow depending of
> > the underling FS contents.  Could you check if
> > https://patchwork.sourceware.org/project/glibc/list/?series=18052 improves
> > this?
> 
> It doesn't help:
> 
> [hjl@gnu-icx-1 build-i686-linux]$ ./dirent/list 
> .
> readdir: Value too large for defined data type
> [hjl@gnu-icx-1 build-i686-linux]$

Hum, is the entry d_ino entry grom getdents also larger than 32-bit in this
environment?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/31186] Some dirent/io tests don't work on xfs
  2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2023-12-29 18:32 ` adhemerval.zanella at linaro dot org
@ 2023-12-29 18:56 ` hjl.tools at gmail dot com
  2023-12-29 19:25 ` adhemerval.zanella at linaro dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: hjl.tools at gmail dot com @ 2023-12-29 18:56 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
From the first __getdents64 call:

Breakpoint 2, __readdir_unlocked (dirp=dirp@entry=0x5655a5b0)
    at ../sysdeps/unix/sysv/linux/readdir.c:32
32      {
(gdb) next
33        int saved_errno = errno;
(gdb) 
37            if (dirp->offset >= dirp->size)
(gdb) 
39                ssize_t bytes = __getdents64 (dirp->fd, dirp->data,
(gdb) 
41                if (bytes <= 0)
(gdb) 
51                dirp->size = bytes;
(gdb) 
54                dirp->offset = 0;
(gdb) 
78            if (!in_ino_t_range (inp->dp64.d_ino))
(gdb) 
88                __set_errno (EOVERFLOW);
(gdb) p inp->dp64.d_ino
$1 = 6442498605
(gdb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/31186] Some dirent/io tests don't work on xfs
  2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2023-12-29 18:56 ` hjl.tools at gmail dot com
@ 2023-12-29 19:25 ` adhemerval.zanella at linaro dot org
  2023-12-29 19:42 ` adhemerval.zanella at linaro dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2023-12-29 19:25 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

--- Comment #5 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Right, so XFS essentially does not support non-LFS calls. I am not sure which
is the best way to handle it, with my patchset I can also clamp d_ino and not
advertise EOVERFLOW.  I am not fully sure about the implications.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/31186] Some dirent/io tests don't work on xfs
  2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2023-12-29 19:25 ` adhemerval.zanella at linaro dot org
@ 2023-12-29 19:42 ` adhemerval.zanella at linaro dot org
  2023-12-29 20:00 ` adhemerval.zanella at linaro dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2023-12-29 19:42 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

--- Comment #6 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Adhemerval Zanella from comment #5)
> Right, so XFS essentially does not support non-LFS calls. I am not sure
> which is the best way to handle it, with my patchset I can also clamp d_ino
> and not advertise EOVERFLOW.  I am not fully sure about the implications.

Scratch that, I just recalled that we always use getdents64 syscall even for
non-LFS.  As fair I recall, EXT4 will clamp the values anyway so I think glibc
will either need to do something similar or revert to use non-LFS getdents
syscall (which I would like to avoid...).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/31186] Some dirent/io tests don't work on xfs
  2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2023-12-29 19:42 ` adhemerval.zanella at linaro dot org
@ 2023-12-29 20:00 ` adhemerval.zanella at linaro dot org
  2023-12-29 21:53 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2023-12-29 20:00 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

--- Comment #7 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Could you check if
https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/azanella/bz23960-dirent
helps?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/31186] Some dirent/io tests don't work on xfs
  2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2023-12-29 20:00 ` adhemerval.zanella at linaro dot org
@ 2023-12-29 21:53 ` hjl.tools at gmail dot com
  2023-12-29 23:52 ` sam at gentoo dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: hjl.tools at gmail dot com @ 2023-12-29 21:53 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Adhemerval Zanella from comment #7)
> Could you check if
> https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/azanella/
> bz23960-dirent helps?

It works better.  But I still got

FAIL: dirent/tst-readdir64-compat
FAIL: io/bug-ftw2
FAIL: io/ftwtest
FAIL: io/tst-ftw-lnk

[hjl@gnu-icx-1 build-i686-linux]$ io/tst-ftw-lnk
error: tst-ftw-lnk.c:217: symlink link1-bad failed
error: 1 test failures
[hjl@gnu-icx-1 build-i686-linux]$ io/ftwtest
...
nftw: Value too large for defined data type
[hjl@gnu-icx-1 build-i686-linux]$

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/31186] Some dirent/io tests don't work on xfs
  2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
                   ` (7 preceding siblings ...)
  2023-12-29 21:53 ` hjl.tools at gmail dot com
@ 2023-12-29 23:52 ` sam at gentoo dot org
  2023-12-30 12:29 ` fw at deneb dot enyo.de
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: sam at gentoo dot org @ 2023-12-29 23:52 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=23960,
                   |                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=24050

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/31186] Some dirent/io tests don't work on xfs
  2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
                   ` (8 preceding siblings ...)
  2023-12-29 23:52 ` sam at gentoo dot org
@ 2023-12-30 12:29 ` fw at deneb dot enyo.de
  2024-01-02 18:06 ` adhemerval.zanella at linaro dot org
  2024-01-05  8:33 ` sam at gentoo dot org
  11 siblings, 0 replies; 13+ messages in thread
From: fw at deneb dot enyo.de @ 2023-12-30 12:29 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

Florian Weimer <fw at deneb dot enyo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fw at deneb dot enyo.de

--- Comment #9 from Florian Weimer <fw at deneb dot enyo.de> ---
32-bit compatibility on XFS requires using the inode32 option:
https://www.man7.org/linux/man-pages/man5/xfs.5.html

(No such option exists with btrfs, by the way, and you need to reformat if you
exceed the 32-bit inode space.)

So I think this bug is different from the d_off issue and invalid from a glibc
perspective.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/31186] Some dirent/io tests don't work on xfs
  2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
                   ` (9 preceding siblings ...)
  2023-12-30 12:29 ` fw at deneb dot enyo.de
@ 2024-01-02 18:06 ` adhemerval.zanella at linaro dot org
  2024-01-05  8:33 ` sam at gentoo dot org
  11 siblings, 0 replies; 13+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2024-01-02 18:06 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|1                           |0
             Status|NEW                         |UNCONFIRMED

--- Comment #10 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Florian Weimer from comment #9)
> 32-bit compatibility on XFS requires using the inode32 option:
> https://www.man7.org/linux/man-pages/man5/xfs.5.html
> 
> (No such option exists with btrfs, by the way, and you need to reformat if
> you exceed the 32-bit inode space.)
> 
> So I think this bug is different from the d_off issue and invalid from a
> glibc perspective.

The dirent/list failure is related, since on my BZ#28824 proposed fix I did not
consider that d_ino might overflow.  But the rest of the failures do seem to be
related to the XFS inode64, where symlink (io/tst-ftw-lnk) and stat
(io/ftwtest) are failing due FS overflow values.

Should we mark this as WONTFIX/NOTABUG?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug libc/31186] Some dirent/io tests don't work on xfs
  2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
                   ` (10 preceding siblings ...)
  2024-01-02 18:06 ` adhemerval.zanella at linaro dot org
@ 2024-01-05  8:33 ` sam at gentoo dot org
  11 siblings, 0 replies; 13+ messages in thread
From: sam at gentoo dot org @ 2024-01-05  8:33 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31186

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=31212

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-01-05  8:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-22 16:18 [Bug libc/31186] New: Some dirent/io tests don't work on xfs hjl.tools at gmail dot com
2023-12-29 13:29 ` [Bug libc/31186] " adhemerval.zanella at linaro dot org
2023-12-29 15:49 ` hjl.tools at gmail dot com
2023-12-29 18:32 ` adhemerval.zanella at linaro dot org
2023-12-29 18:56 ` hjl.tools at gmail dot com
2023-12-29 19:25 ` adhemerval.zanella at linaro dot org
2023-12-29 19:42 ` adhemerval.zanella at linaro dot org
2023-12-29 20:00 ` adhemerval.zanella at linaro dot org
2023-12-29 21:53 ` hjl.tools at gmail dot com
2023-12-29 23:52 ` sam at gentoo dot org
2023-12-30 12:29 ` fw at deneb dot enyo.de
2024-01-02 18:06 ` adhemerval.zanella at linaro dot org
2024-01-05  8:33 ` sam at gentoo dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).