Project

General

Profile

Actions

Bug #64572

open

workunits/fsx.sh failure

Added by Venky Shankar 2 months ago. Updated about 2 months ago.

Status:
Fix Under Review
Priority:
Normal
Assignee:
Category:
Testing
Target version:
% Done:

0%

Source:
Tags:
Backport:
squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
qa, qa-failure
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

https://pulpito.ceph.com/vshankar-2024-02-26_05:44:42-fs:workload-wip-vshankar-testing-20240216.060239-testing-default-smithi/7573412/

2024-02-26T06:30:06.061 INFO:tasks.workunit.client.0.smithi045.stdout:    [CC]    t_access_root
2024-02-26T06:30:06.091 INFO:journalctl@ceph.mon.a.smithi045.stdout:Feb 26 06:30:05 smithi045 ceph-mon[32074]: pgmap v51: 129 pgs: 129 active+clean; 68 MiB data, 522 MiB used, 1.0 TiB / 1.0 TiB avail; 890 KiB/s rd, 1.6 MiB/s wr, 320 op/s
2024-02-26T06:30:06.106 INFO:tasks.workunit.client.0.smithi045.stderr:alloc.c: In function 'main':
2024-02-26T06:30:06.106 INFO:tasks.workunit.client.0.smithi045.stderr:alloc.c:154:1: error: 'bozo' undeclared (first use in this function)
2024-02-26T06:30:06.106 INFO:tasks.workunit.client.0.smithi045.stderr:  154 | bozo!
2024-02-26T06:30:06.106 INFO:tasks.workunit.client.0.smithi045.stderr:      | ^~~~
2024-02-26T06:30:06.106 INFO:tasks.workunit.client.0.smithi045.stderr:alloc.c:154:1: note: each undeclared identifier is reported only once for each function it appears in
2024-02-26T06:30:06.106 INFO:tasks.workunit.client.0.smithi045.stderr:alloc.c:154:5: error: expected ';' before '!' token
2024-02-26T06:30:06.106 INFO:tasks.workunit.client.0.smithi045.stderr:  154 | bozo!
2024-02-26T06:30:06.106 INFO:tasks.workunit.client.0.smithi045.stderr:      |     ^
2024-02-26T06:30:06.107 INFO:tasks.workunit.client.0.smithi045.stderr:      |     ;
2024-02-26T06:30:06.107 INFO:tasks.workunit.client.0.smithi045.stderr:alloc.c:184:25: error: 'rflag' undeclared (first use in this function); did you mean 'nflag'?
2024-02-26T06:30:06.107 INFO:tasks.workunit.client.0.smithi045.stderr:  184 |                         rflag = 1;
2024-02-26T06:30:06.107 INFO:tasks.workunit.client.0.smithi045.stderr:      |                         ^~~~~
2024-02-26T06:30:06.107 INFO:tasks.workunit.client.0.smithi045.stderr:      |                         nflag
2024-02-26T06:30:06.107 INFO:tasks.workunit.client.0.smithi045.stderr:alloc.c:320:5: error: expected ';' before '!' token
2024-02-26T06:30:06.108 INFO:tasks.workunit.client.0.smithi045.stderr:  320 | bozo!
2024-02-26T06:30:06.108 INFO:tasks.workunit.client.0.smithi045.stderr:      |     ^
2024-02-26T06:30:06.108 INFO:tasks.workunit.client.0.smithi045.stderr:      |     ;

Compile error during tests likely due to centos9.stream switch.


Related issues 1 (0 open1 closed)

Has duplicate CephFS - Bug #65605: fsx.sh workload fails with status 2 due to a makefile errorDuplicate

Actions
Actions #1

Updated by Venky Shankar about 2 months ago

Venky Shankar wrote:

https://pulpito.ceph.com/vshankar-2024-02-26_05:44:42-fs:workload-wip-vshankar-testing-20240216.060239-testing-default-smithi/7573412/

[...]

Compile error during tests likely due to centos9.stream switch.

Patrick mentioned that it could be due to a new version of the tool itself. Possible!

Actions #2

Updated by Venky Shankar about 2 months ago

  • Status changed from New to Triaged
Actions #3

Updated by Venky Shankar about 2 months ago

  • Assignee set to Xiubo Li

I looked at this closely, at it seems that the compilation failure is deliberately triggered from the xfstest code when none of the ifdef directives are found. Sample:

        /* Assume that if we have FREESP64 then we have the rest */
#ifdef XFS_IOC_FREESP64
#define USE_XFSCTL
        static int      optab[] = { XFS_IOC_FREESP64,
                                    XFS_IOC_ALLOCSP64,
                                    XFS_IOC_UNRESVSP64,
                                    XFS_IOC_RESVSP64 };
#else
#ifdef F_FREESP64
#define USE_FCNTL
        static int      optab[] = { F_FREESP64,
                                    F_ALLOCSP64,
                                    F_UNRESVSP64,
                                    F_RESVSP64 };
#else
bozo!
#endif

So, neither XFS_IOC_FREESP64 nor F_FREESP64 were defined (possibly during ./conmfigure step). Xiubo, please have a look. This could be related to the switch to centos9.

Actions #4

Updated by Xiubo Li about 2 months ago

The XFS_IOC_FREESP64 and XFS_IOC_ALLOCSP64 macros are from /usr/include/xfs/xfs_fs.h, which is from xfsprogs-devel rpm packages.

While upstream Linux has removed ALLOCSP/FREESP ioctls by commit:

commit 4d1b97f9ce7c0d2af2bb85b12d48e6902172a28e
Author: Darrick J. Wong <djwong@kernel.org>
Date:   Fri Jan 7 17:45:51 2022 -0800

    xfs: kill the XFS_IOC_{ALLOC,FREE}SP* ioctls

    According to the glibc compat header for Irix 4, these ioctls originated
    in April 1991 as a (somewhat clunky) way to preallocate space at the end
    of a file on an EFS filesystem.  XFS, which was released in Irix 5.3 in
    December 1993, picked up these ioctls to maintain compatibility and they
    were ported to Linux in the early 2000s.

    Recently it was pointed out to me they still lurk in the kernel, even
    though the Linux fallocate syscall supplanted the functionality a long
    time ago.  fstests doesn't seem to include any real functional or stress
    tests for these ioctls, which means that the code quality is ... very
    questionable.  Most notably, it was a stale disk block exposure vector
    for 21 years and nobody noticed or complained.  As mature programmers
    say, "If you're not testing it, it's broken." 

    Given all that, let's withdraw these ioctls from the XFS userspace API.
    Normally we'd set a long deprecation process, but I estimate that there
    aren't any real users, so let's trigger a warning in dmesg and return
    -ENOTTY.

    See: CVE-2021-4155

    Augments: 983d8e60f508 ("xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate")
    Signed-off-by: Darrick J. Wong <djwong@kernel.org>
    Reviewed-by: Eric Sandeen <sandeen@redhat.com>
    Reviewed-by: Dave Chinner <dchinner@redhat.com>

And the xfsprogs-devel package also removed them. And then the xfstests-devel pacakge too:

commit ab47e281b70faa797485714802474af8d3d4a2b1
Author: Zorro Lang <zlang@redhat.com>
Date:   Tue Apr 26 14:24:11 2022 +0800

    fsstress: remove ALLOCSP and FREESP operations entirely

    Due to upstream linux has removed ALLOCSP/FREESP ioctls by commit:
    4d1b97f9ce7c0 ("xfs: kill the XFS_IOC_{ALLOC,FREE}SP* ioctls"), so
    let's remove ALLOCSP/FREESP testing from fsstress, to avoid more
    mismatch problems.

    Due to g/070 specified "-f allocsp" and "-f freesp=0", so remove
    these two lines too.

    Signed-off-by: Zorro Lang <zlang@redhat.com>
    Reviewed-by: Darrick J. Wong <djwong@kernel.org>
    Signed-off-by: Zorro Lang <zlang@kernel.org>

The centos stream 9 in this test installed xfsprogs-devel-6.3.0-1.el9.x86_64.rpm, and this version has included the above commit. While our qa/workunits/suites/fsx.sh is using old sha1 to do the test:

$ cat qa/workunits/suites/fsx.sh
#!/bin/sh -x

set -e

git clone https://git.ceph.com/xfstests-dev.git
cd xfstests-dev
git checkout 12973fc04fd10d4af086901e10ffa8e48866b735
make -j4
cd ..
cp xfstests-dev/ltp/fsx .

OPTIONS="-z"  # don't use zero range calls; not supported by cephfs

./fsx $OPTIONS  1MB -N 50000 -p 10000 -l 1048576
./fsx $OPTIONS  10MB -N 50000 -p 10000 -l 10485760
./fsx $OPTIONS 100MB -N 50000 -p 10000 -l 104857600

And the 12973fc04fd10d4af086901e10ffa8e48866b735 is old and still trying to use the stale XFS_IOC_{ALLOC,FREE}SP macros.

We should fix qa/workunits/suites/fsx.sh and use a proper sha1.

Actions #5

Updated by Venky Shankar about 2 months ago

Xiubo Li wrote:

The XFS_IOC_FREESP64 and XFS_IOC_ALLOCSP64 macros are from /usr/include/xfs/xfs_fs.h, which is from xfsprogs-devel rpm packages.

While upstream Linux has removed ALLOCSP/FREESP ioctls by commit:
[...]

And the xfsprogs-devel package also removed them. And then the xfstests-devel pacakge too:

[...]

The centos stream 9 in this test installed xfsprogs-devel-6.3.0-1.el9.x86_64.rpm, and this version has included the above commit. While our qa/workunits/suites/fsx.sh is using old sha1 to do the test:

[...]

And the 12973fc04fd10d4af086901e10ffa8e48866b735 is old and still trying to use the stale XFS_IOC_{ALLOC,FREE}SP macros.

We should fix qa/workunits/suites/fsx.sh and use a proper sha1.

Makes sense +1

Actions #6

Updated by Xiubo Li about 2 months ago

  • Status changed from Triaged to Fix Under Review
  • Pull request ID set to 55983
Actions #7

Updated by Leonid Usov 11 days ago

  • Has duplicate Bug #65605: fsx.sh workload fails with status 2 due to a makefile error added
Actions

Also available in: Atom PDF