fedora-llvm-team / llvm-snapshots

Everything to build LLVM snapshots
https://copr.fedorainfracloud.org/coprs/g/fedora-llvm-team/llvm-snapshots/
15 stars 8 forks source link

Snapshot for 20240813, v20.0.0, b1edac0 (big-merge) #644

Closed github-actions[bot] closed 1 month ago

github-actions[bot] commented 1 month ago

This issue exists to let you know that we are about to monitor the builds of the LLVM (v20.0.0, llvm/llvm-project@ b1edac0) snapshot for 20240813.

At certain intervals the CI system will update this very comment over time to reflect the progress of builds.
Log analysis
For example if a build of the llvm project fails on the fedora-rawhide-x86_64 platform, we'll analyze the build log (if any) to identify the cause of the failure. The cause can be any of ['srpm_build_issue', 'copr_timeout', 'network_issue', 'dependency_issue', 'test', 'downstream_patch_application', 'rpm__installed_but_unpackaged_files_found', 'rpm__directory_not_found', 'rpm__file_not_found', 'cmake_error', 'unknown']. For each cause we will list the packages and the relevant log excerpts.
Use of labels
Let's assume a unit test test in upstream LLVM was broken. We will then add these labels to this issue: error/test, build_failed_on/fedora-rawhide-x86_64, project/llvm. If you manually restart a build in Copr and can bring it to a successful state, we will automatically remove the aforementioned labels.

Last updated: 2024-08-15T23:21:14.877944

Build Matrix | |llvm| |:---|:---:| |fedora-39-aarch64
:white_check_mark: tests passed|[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903492)| |fedora-39-i386|[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903493)| |fedora-39-ppc64le
:white_check_mark: tests passed :lock: |[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903494)| |fedora-39-s390x
:white_check_mark: tests passed :lock: |[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903495)| |fedora-39-x86_64
:white_check_mark: tests passed|[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903496)| |fedora-40-aarch64
:white_check_mark: tests passed|[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903497)| |fedora-40-i386|[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903498)| |fedora-40-ppc64le
:white_check_mark: tests passed :lock: |[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903499)| |fedora-40-s390x
:white_check_mark: tests passed :lock: |[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903500)| |fedora-40-x86_64
:white_check_mark: tests passed|[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903501)| |fedora-rawhide-aarch64
:x: Copr build(s) failed|[:x:](https://copr.fedorainfracloud.org/coprs/build/7903502)| |fedora-rawhide-i386|[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903503)| |fedora-rawhide-ppc64le
:warning: pipeline error|[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903504)| |fedora-rawhide-s390x
:warning: pipeline error|[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903505)| |fedora-rawhide-x86_64
:white_check_mark: tests passed|[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903506)| |rhel-8-aarch64
:x: tests failed :lock: |[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903507)| |rhel-8-s390x
:white_check_mark: tests passed :lock: |[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903508)| |rhel-8-x86_64
:white_check_mark: tests passed :lock: |[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903509)| |rhel-9-aarch64
:white_check_mark: tests passed :lock: |[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903510)| |rhel-9-s390x
:white_check_mark: tests passed :lock: |[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903511)| |rhel-9-x86_64
:white_check_mark: tests passed :lock: |[:white_check_mark:](https://copr.fedorainfracloud.org/coprs/build/7903512)|
Build status legend
  • :o: : canceled
  • :x: : failed
  • :ballot_box_with_check: : forked
  • :inbox_tray: : importing
  • :soon: : pending
  • :running: : running
  • :no_entry_sign: : skipped
  • :star: : starting
  • :white_check_mark: : succeeded
  • :hourglass: : waiting
  • :grey_question: : unknown
  • :warning: : pipeline error (only relevant to testing-farm)
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-39-aarch64` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-39-i386` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-39-ppc64le` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-39-s390x` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-39-x86_64` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-40-aarch64` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-40-i386` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-40-ppc64le` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-40-s390x` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-40-x86_64` chroot.
github-actions[bot] commented 1 month ago

Errors found in Copr builds on fedora-rawhide-aarch64

github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-rawhide-i386` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-rawhide-ppc64le` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-rawhide-s390x` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `fedora-rawhide-x86_64` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `rhel-8-aarch64` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `rhel-8-s390x` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `rhel-8-x86_64` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `rhel-9-aarch64` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `rhel-9-s390x` chroot.
github-actions[bot] commented 1 month ago
This is a placeholder for any errors that might happen for the `rhel-9-x86_64` chroot.
nikic commented 1 month ago

RHEL 8 aarch64 tmt fails with:


******************** TEST 'LLVM regression suite :: lto_and_cross_dso_cfi.c' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: rm -rf /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp.dir
+ rm -rf /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp.dir
RUN: at line 3: mkdir /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp.dir
+ mkdir /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp.dir
RUN: at line 4: /usr/bin/clang -UMAIN -flto -fsanitize=cfi -fsanitize-cfi-cross-dso -fvisibility=default -fuse-ld=lld /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/tests/lto_and_cross_dso_cfi.c -shared -o /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp.dir/liblocalcrossdso.so
+ /usr/bin/clang -UMAIN -flto -fsanitize=cfi -fsanitize-cfi-cross-dso -fvisibility=default -fuse-ld=lld /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/tests/lto_and_cross_dso_cfi.c -shared -o /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp.dir/liblocalcrossdso.so
RUN: at line 5: /usr/bin/clang -DMAIN -flto -fsanitize=cfi -fsanitize-cfi-cross-dso -fvisibility=default -fuse-ld=lld /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/tests/lto_and_cross_dso_cfi.c -o /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp -L/tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp.dir -llocalcrossdso
+ /usr/bin/clang -DMAIN -flto -fsanitize=cfi -fsanitize-cfi-cross-dso -fvisibility=default -fuse-ld=lld /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/tests/lto_and_cross_dso_cfi.c -o /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp -L/tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp.dir -llocalcrossdso
RUN: at line 6: LD_LIBRARY_PATH=/tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp.dir /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp
+ LD_LIBRARY_PATH=/tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp.dir
+ /tmp/tmp.ZWblntBCCg/llvm-toolchain-integration-test-suite/_build/tests/Output/lto_and_cross_dso_cfi.c.tmp
CFI: CHECK failed: cfi.cpp:199 "((4096)) == ((GetPageSizeCached()))" (0x1000, 0x10000) (tid=15648)
nikic commented 1 month ago

RHEL 8 uses 64K pages on aarch64, so this failure looks legitimate. @jchecahi Any idea why we don't usually see this as a gating failure?

jchecahi commented 1 month ago

RHEL 8 uses 64K pages on aarch64, so this failure looks legitimate. @jchecahi Any idea why we don't usually see this as a gating failure?

@nikic I have no idea, honestly. It definitely seems a genuine issue in libclang_rt.cfi.a but I don't see why we don't see it in older LLVM releases. I did some checks to at least make sure that the one to blame is the static library:

  1. Get a fresh RHEL 8.10 VM, install llvm packages provided from AppStream (llvm 17), clone the testsuite.
  2. Configure the testsuite: cmake .. -DENABLE_LIBCXX=OFF -DENABLE_STATIC_LIBCXX=OFF -DENABLE_LIBUNWIND=OFF
  3. Run the test with compiler-rt-17: test succeeds:
    
    # rpm -q compiler-rt
    compiler-rt-17.0.6-1.module+el8.10.0+20808+e12784c0.aarch64
    # lit -v --filter lto_and_cross tests
    -- Testing: 1 of 51 tests, 1 workers --
    PASS: LLVM regression suite :: lto_and_cross_dso_cfi.c (1 of 1)

Testing Time: 0.45s Excluded: 50 Passed : 1

5. Enable this copr (` dnf copr enable @fedora-llvm-team/llvm-snapshots-big-merge-20240813 rhel-8-aarch64`) and update to LLVM20 (`dnf update clang llvm compiler-rt`)
7. Run the test again -> It fails:

rpm -q compiler-rt

compiler-rt-20.0.0~pre20240813.gb1edac0496f473-1.el8.aarch64

lit -v --filter lto_and_cross tests

-- Testing: 1 of 51 tests, 1 workers -- FAIL: LLVM regression suite :: lto_and_cross_dso_cfi.c (1 of 1) [[ cut output, no need to show it again :) ]]



Failed Tests (1): LLVM regression suite :: lto_and_cross_dso_cfi.c

Testing Time: 0.76s Excluded: 50 Failed : 1


To verify that the issue is in fact is `libclang_rt.cfi.a`, I downloaded the rpms for compiler-rt 17 and 20, extracted the files and replaced the library, and the test again passes:

mv ~/rpms/17/usr/lib/clang/17/lib/aarch64-redhat-linux-gnu/libclang_rt.cfi.a /usr/lib/clang/20/lib/aarch64-redhat-linux-gnu/libclang_rt.cfi.a

mv: overwrite '/usr/lib/clang/20/lib/aarch64-redhat-linux-gnu/libclang_rt.cfi.a'? y

lit -v --filter lto_and_cross tests

-- Testing: 1 of 51 tests, 1 workers -- PASS: LLVM regression suite :: lto_and_cross_dso_cfi.c (1 of 1)

Testing Time: 0.42s Excluded: 50 Passed : 1



Doing it the other way around (putting compiler-rt-20 library into an LLVM 17 installation) makes the test fail.
nikic commented 1 month ago

The reason why it works turned out to be very simple: We have a RHEL 8 only patch for this: https://gitlab.com/redhat/centos-stream/rpms/compiler-rt/-/blob/stream-llvm-toolset-rhel-next-rhel-8.10.0/0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch?ref_type=heads

nikic commented 1 month ago

Fix: https://src.fedoraproject.org/rpms/llvm/pull-request/276

nikic commented 1 month ago

Confirmed fixed in https://github.com/fedora-llvm-team/llvm-snapshots/issues/646.