Skip to content

[rtsan] Add dl, rt, m, and log libraries as unit test dependencies, get rid of atomic #98264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

cjappl
Copy link
Contributor

@cjappl cjappl commented Jul 10, 2024

Fixing test failures in #98256

There are two issues being fixed here:

ld.lld: error: undefined symbol: dlvsym
ld.lld: error: undefined symbol: dlvsym

Fixed by linking dl

FAILED: ... -lstdc++ -no-pie -pthread -latomic -m64
/opt/rh/devtoolset-11/root/usr/lib/gcc/ppc64-redhat-linux/11/../../../../bin/ld: cannot find /usr/lib64/libatomic.so.1

Fixed by removing atomic from the dependencies, I don't think we were even using it.

I added in all of the dependencies used by the parent library in the tests, hopefully getting ahead of any other issues, adding rt and m, even if we haven't had issues with them yet

@llvmbot
Copy link
Member

llvmbot commented Jul 10, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Chris Apple (cjappl)

Changes

Fixing test failures in #98256

There are two issues being fixed here:

ld.lld: error: undefined symbol: dlvsym
ld.lld: error: undefined symbol: dlvsym

Fixed by linking dl

FAILED: ... -lstdc++ -no-pie -pthread -latomic -m64
/opt/rh/devtoolset-11/root/usr/lib/gcc/ppc64-redhat-linux/11/../../../../bin/ld: cannot find /usr/lib64/libatomic.so.1

Fixed by removing atomic from the dependencies, I don't think we were even using it.

I added in all of the dependencies used by the parent library in the tests, hopefully getting ahead of any other issues, adding rt and m, even if we haven't had issues with them yet


Full diff: https://github.com/llvm/llvm-project/pull/98264.diff

1 Files Affected:

  • (modified) compiler-rt/lib/rtsan/tests/CMakeLists.txt (+4-2)
diff --git a/compiler-rt/lib/rtsan/tests/CMakeLists.txt b/compiler-rt/lib/rtsan/tests/CMakeLists.txt
index a379e4029633e..9eda116541ae3 100644
--- a/compiler-rt/lib/rtsan/tests/CMakeLists.txt
+++ b/compiler-rt/lib/rtsan/tests/CMakeLists.txt
@@ -36,15 +36,17 @@ set(RTSAN_UNITTEST_LINK_FLAGS
   ${SANITIZER_TEST_CXX_LIBRARIES}
   -no-pie)
 
+append_list_if(COMPILER_RT_HAS_LIBDL -ldl RTSAN_UNITTEST_LINK_FLAGS)
+append_list_if(COMPILER_RT_HAS_LIBRT -lrt RTSAN_UNITTEST_LINK_FLAGS)
+append_list_if(COMPILER_RT_HAS_LIBM -lm RTSAN_UNITTEST_LINK_FLAGS)
 append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread RTSAN_UNITTEST_LINK_FLAGS)
+append_list_if(COMPILER_RT_HAS_LIBLOG -llog RTSAN_UNITTEST_LINK_FLAGS)
 
 if (APPLE)
   add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINK_FLAGS)
   list(APPEND RTSAN_UNITTEST_LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS})
   list(APPEND RTSAN_UNITTEST_LINK_FLAGS ${DARWIN_osx_LINK_FLAGS})
   list(APPEND RTSAN_UNITTEST_CFLAGS ${DARWIN_osx_CFLAGS})
-else()
-  list(APPEND RTSAN_UNITTEST_LINK_FLAGS -latomic)
 endif()
 
 set(COMPILER_RT_GOOGLETEST_SOURCES ${COMPILER_RT_GTEST_SOURCE} ${COMPILER_RT_GMOCK_SOURCE})

@cjappl
Copy link
Contributor Author

cjappl commented Jul 10, 2024

CC @vitalybuka

Really apologize for the churn. If there is a more deterministic way to do this other than "commit and see", please let me know. With some of these systems I'm at the mercy of the post-commit tests.

Thanks for your continued help

Copy link

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
Please turn off Keep my email addresses private setting in your account.
See LLVM Discourse for more information.

@vitalybuka vitalybuka merged commit 7b96d13 into llvm:main Jul 10, 2024
7 of 8 checks passed
@cjappl cjappl deleted the FixDlLinkerError branch July 10, 2024 02:31
@vitalybuka
Copy link
Collaborator

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off Keep my email addresses private setting in your account. See LLVM Discourse for more information.

Would be possible to fix this?
I guess you email is visible in git commits anyway.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 10, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-ppc64be-linux running on ppc64be-sanitizer while building compiler-rt at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/109/builds/785

Here is the relevant piece of the build log for the reference:

Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
    There are two issues being fixed here:
    
    ```
    ld.lld: error: undefined symbol: dlvsym
    ld.lld: error: undefined symbol: dlvsym
    ```
    
    Fixed by linking dl
    
    ```
    FAILED: ... -lstdc++ -no-pie -pthread -latomic -m64
    /opt/rh/devtoolset-11/root/usr/lib/gcc/ppc64-redhat-linux/11/../../../../bin/ld: cannot find /usr/lib64/libatomic.so.1
    ```
    
    Fixed by removing atomic from the dependencies, I don't think we were
    even using it.
    
    I added in all of the dependencies used by the parent library in the
    tests, hopefully getting ahead of any other issues, adding rt and m,
    even if we haven't had issues with them yet

+ LLVM=/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/llvm
+ build_and_test gcc ''
+ build gcc ''
+ local build_dir=build_gcc
+ echo '@@@BUILD_STEP build compiler-rt gcc@@@'
+ [[ ! -f build_gcc/delete_next_time ]]
+ mkdir -p build_gcc
@@@BUILD_STEP build compiler-rt gcc@@@
+ cmake -B build_gcc -DLLVM_APPEND_VC_REV=OFF -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_CCACHE_BUILD=ON -DLLVM_TARGETS_TO_BUILD=PowerPC -DLLVM_LIT_ARGS=-vj80 '-DLLVM_ENABLE_PROJECTS=clang;lld' '-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;compiler-rt;libunwind' -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/llvm
-- bolt project is disabled
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- cross-project-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- lld project is enabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) 
-- Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES) 
-- LLVM host triple: powerpc64-unknown-linux-gnu
-- Native target architecture is PowerPC
-- Threads enabled.
Step 9 (test compiler-rt gcc) failure: test compiler-rt gcc (failure)
...
UNSUPPORTED: AddressSanitizer-powerpc64-linux-dynamic :: TestCases/Windows/breakpoint.cpp (4699 of 4710)
UNSUPPORTED: SanitizerCommon-lsan-powerpc64-Linux :: NetBSD/faccessat.cpp (4700 of 4710)
UNSUPPORTED: SanitizerCommon-msan-powerpc64-Linux :: NetBSD/paccept.cpp (4701 of 4710)
UNSUPPORTED: ThreadSanitizer-powerpc64 :: Darwin/signals-blocked.cpp (4702 of 4710)
UNSUPPORTED: AddressSanitizer-powerpc64-linux-dynamic :: TestCases/Darwin/duplicate_os_log_reports.cpp (4703 of 4710)
UNSUPPORTED: SanitizerCommon-msan-powerpc64-Linux :: NetBSD/user_from_uid.cpp (4704 of 4710)
UNSUPPORTED: ThreadSanitizer-powerpc64 :: libdispatch/dispatch_main.c (4705 of 4710)
UNSUPPORTED: AddressSanitizer-powerpc64-linux-dynamic :: TestCases/Darwin/asan-symbolize-with-module-map.cpp (4706 of 4710)
UNSUPPORTED: AddressSanitizer-powerpc64-linux-dynamic :: TestCases/Windows/malloc_right_oob.cpp (4707 of 4710)
UNSUPPORTED: AddressSanitizer-powerpc64-linux :: TestCases/Windows/dll_malloc_left_oob.cpp (4708 of 4710)
FAIL: RealtimeSanitizer-Unit :: ./Rtsan-powerpc64-NoInstTest/failed_to_discover_tests_from_gtest (4709 of 4710)
******************** TEST 'RealtimeSanitizer-Unit :: ./Rtsan-powerpc64-NoInstTest/failed_to_discover_tests_from_gtest' FAILED ********************

********************
PASS: ThreadSanitizer-powerpc64 :: restore_stack.cpp (4710 of 4710)

23 warning(s) in tests
Slowest Tests:
--------------------------------------------------------------------------
81.88s: ThreadSanitizer-powerpc64 :: restore_stack.cpp
44.27s: ThreadSanitizer-powerpc64 :: deadlock_detector_stress_test.cpp
44.06s: Profile-powerpc64 :: Posix/instrprof-value-prof-shared.test
42.77s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Test/AddressSanitizer/OOBRightTest
41.65s: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/ScudoReleaseTest/ReleaseFreeMemoryToOSAndroid
41.28s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Dynamic-Test/AddressSanitizer/OOBRightTest
41.21s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Test/AddressSanitizer/SimpleStackTest
40.69s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Dynamic-Test/AddressSanitizer/SimpleStackTest
39.73s: ThreadSanitizer-powerpc64 :: deep_stack1.cpp
39.63s: UBSan-AddressSanitizer-powerpc64 :: TestCases/ImplicitConversion/bitfield-conversion.c
39.60s: UBSan-ThreadSanitizer-powerpc64 :: TestCases/ImplicitConversion/bitfield-conversion.c
38.17s: UBSan-MemorySanitizer-powerpc64 :: TestCases/ImplicitConversion/bitfield-conversion.c
38.00s: AddressSanitizer-Unit :: ./Asan-powerpc64-calls-Dynamic-Test/AddressSanitizer/OOBRightTest
37.84s: AddressSanitizer-Unit :: ./Asan-powerpc64-calls-Test/AddressSanitizer/OOBRightTest
37.53s: AddressSanitizer-Unit :: ./Asan-powerpc64-calls-Test/AddressSanitizer/SimpleStackTest
36.50s: AddressSanitizer-Unit :: ./Asan-powerpc64-calls-Dynamic-Test/AddressSanitizer/SimpleStackTest
36.06s: UBSan-Standalone-powerpc64 :: TestCases/ImplicitConversion/bitfield-conversion.c
33.78s: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/ScudoReleaseTest/ReleaseFreeMemoryToOSDefault
25.45s: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/ScudoCombinedTestDisableMemInit_DefaultConfig/DisableMemInit
20.99s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Test/AddressSanitizer/memalign

Tests Times:
--------------------------------------------------------------------------
[    Range    ] :: [               Percentage               ] :: [  Count  ]
--------------------------------------------------------------------------
[80.0s,85.0s) :: [                                        ] :: [   1/3889]
[75.0s,80.0s) :: [                                        ] :: [   0/3889]
[70.0s,75.0s) :: [                                        ] :: [   0/3889]
[65.0s,70.0s) :: [                                        ] :: [   0/3889]
[60.0s,65.0s) :: [                                        ] :: [   0/3889]
Step 11 (test compiler-rt debug) failure: test compiler-rt debug (failure)
...
UNSUPPORTED: ORC-powerpc64-linux :: TestCases/Windows/x86-64/priority-static-initializer-three.c (2405 of 2423)
UNSUPPORTED: SanitizerCommon-msan-powerpc64-Linux :: NetBSD/uid_from_user.cpp (2406 of 2423)
UNSUPPORTED: ThreadSanitizer-powerpc64 :: libdispatch/sync-race.c (2407 of 2423)
UNSUPPORTED: ThreadSanitizer-powerpc64 :: Darwin/main_tid.mm (2408 of 2423)
UNSUPPORTED: ORC-powerpc64-linux :: TestCases/FreeBSD/x86-64/ehframe-default.cpp (2409 of 2423)
UNSUPPORTED: SanitizerCommon-msan-powerpc64-Linux :: NetBSD/netent.cpp (2410 of 2423)
UNSUPPORTED: ORC-powerpc64-linux :: TestCases/Linux/x86-64/trivial-cxa-atexit.S (2411 of 2423)
UNSUPPORTED: SanitizerCommon-lsan-powerpc64-Linux :: NetBSD/rmd160.cpp (2412 of 2423)
UNSUPPORTED: SanitizerCommon-tsan-powerpc64-Linux :: NetBSD/gid_from_group.cpp (2413 of 2423)
UNSUPPORTED: ThreadSanitizer-powerpc64 :: libdispatch/once.c (2414 of 2423)
FAIL: RealtimeSanitizer-Unit :: ./Rtsan-powerpc64-NoInstTest/failed_to_discover_tests_from_gtest (2415 of 2423)
******************** TEST 'RealtimeSanitizer-Unit :: ./Rtsan-powerpc64-NoInstTest/failed_to_discover_tests_from_gtest' FAILED ********************

********************
PASS: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/85/267 (2416 of 2423)
PASS: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/231/267 (2417 of 2423)
PASS: SanitizerCommon-tsan-powerpc64-Linux :: compress_stack_depot.cpp (2418 of 2423)
PASS: ThreadSanitizer-powerpc64 :: deep_stack1.cpp (2419 of 2423)
PASS: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/232/267 (2420 of 2423)
PASS: Profile-powerpc64 :: Posix/instrprof-value-prof-shared.test (2421 of 2423)
PASS: ThreadSanitizer-powerpc64 :: restore_stack.cpp (2422 of 2423)
PASS: ThreadSanitizer-powerpc64 :: deadlock_detector_stress_test.cpp (2423 of 2423)

23 warning(s) in tests
Slowest Tests:
--------------------------------------------------------------------------
303.15s: ThreadSanitizer-powerpc64 :: deadlock_detector_stress_test.cpp
112.89s: ThreadSanitizer-powerpc64 :: restore_stack.cpp
42.15s: Profile-powerpc64 :: Posix/instrprof-value-prof-shared.test
40.67s: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/ScudoReleaseTest/ReleaseFreeMemoryToOSAndroid
39.63s: ThreadSanitizer-powerpc64 :: deep_stack1.cpp
39.53s: SanitizerCommon-tsan-powerpc64-Linux :: compress_stack_depot.cpp
29.06s: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/ScudoReleaseTest/ReleaseFreeMemoryToOSDefault
20.48s: ThreadSanitizer-powerpc64 :: signal_reset.cpp
20.20s: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/ScudoCombinedTestDisableMemInit_DefaultConfig/DisableMemInit
17.74s: ThreadSanitizer-powerpc64 :: real_deadlock_detector_stress_test.cpp
17.14s: SanitizerCommon-tsan-powerpc64-Linux :: Linux/signal_segv_handler.cpp
16.68s: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/ScudoCombinedTestDisableMemInit_AndroidConfig/DisableMemInit
15.97s: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/ScudoCombinedTestDisableMemInit_TestConditionVariableConfig/DisableMemInit
15.72s: MemorySanitizer-POWERPC64 :: poison_in_signal.cpp
15.67s: SanitizerCommon-msan-powerpc64-Linux :: Linux/signal_segv_handler.cpp
14.27s: MemorySanitizer-POWERPC64 :: vararg_shadow.cpp
13.22s: SanitizerCommon-lsan-powerpc64-Linux :: Linux/signal_segv_handler.cpp
12.74s: ThreadSanitizer-powerpc64 :: stress.cpp
12.35s: SanitizerCommon-msan-powerpc64-Linux :: Linux/soft_rss_limit_mb_test.cpp
12.27s: Profile-powerpc64 :: instrprof-value-prof.test

Tests Times:
--------------------------------------------------------------------------
Step 14 (test compiler-rt default) failure: test compiler-rt default (failure)
...
UNSUPPORTED: SanitizerCommon-asan-powerpc64-Linux :: NetBSD/sysctlgetmibinfo.cpp (4698 of 4710)
UNSUPPORTED: AddressSanitizer-powerpc64-linux :: TestCases/Darwin/dyld_insert_libraries_reexec.cpp (4699 of 4710)
UNSUPPORTED: SanitizerCommon-asan-powerpc64-Linux :: NetBSD/md4.cpp (4700 of 4710)
UNSUPPORTED: AddressSanitizer-powerpc64-linux-dynamic :: TestCases/Windows/stack_array_right_oob.cpp (4701 of 4710)
UNSUPPORTED: SanitizerCommon-asan-powerpc64-Linux :: NetBSD/protoent.cpp (4702 of 4710)
UNSUPPORTED: SanitizerCommon-lsan-powerpc64-Linux :: NetBSD/group_from_gid.cpp (4703 of 4710)
UNSUPPORTED: SanitizerCommon-lsan-powerpc64-Linux :: NetBSD/asysctl.cpp (4704 of 4710)
UNSUPPORTED: SanitizerCommon-msan-powerpc64-Linux :: NetBSD/asysctl.cpp (4705 of 4710)
UNSUPPORTED: ThreadSanitizer-powerpc64 :: libdispatch/source-registration.c (4706 of 4710)
UNSUPPORTED: ThreadSanitizer-powerpc64 :: Darwin/libcxx-shared-ptr.mm (4707 of 4710)
FAIL: RealtimeSanitizer-Unit :: ./Rtsan-powerpc64-NoInstTest/failed_to_discover_tests_from_gtest (4708 of 4710)
******************** TEST 'RealtimeSanitizer-Unit :: ./Rtsan-powerpc64-NoInstTest/failed_to_discover_tests_from_gtest' FAILED ********************

********************
UNSUPPORTED: UBSan-MemorySanitizer-powerpc64 :: TestCases/TypeCheck/Function/function.cpp (4709 of 4710)
PASS: ThreadSanitizer-powerpc64 :: restore_stack.cpp (4710 of 4710)

23 warning(s) in tests
Slowest Tests:
--------------------------------------------------------------------------
111.87s: ThreadSanitizer-powerpc64 :: restore_stack.cpp
52.31s: ThreadSanitizer-powerpc64 :: deadlock_detector_stress_test.cpp
51.43s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Dynamic-Test/AddressSanitizer/OOBRightTest
51.02s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Test/AddressSanitizer/OOBRightTest
48.45s: Profile-powerpc64 :: Posix/instrprof-value-prof-shared.test
48.31s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Test/AddressSanitizer/SimpleStackTest
47.02s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Dynamic-Test/AddressSanitizer/SimpleStackTest
44.81s: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/ScudoReleaseTest/ReleaseFreeMemoryToOSAndroid
44.58s: AddressSanitizer-Unit :: ./Asan-powerpc64-calls-Dynamic-Test/AddressSanitizer/OOBRightTest
43.29s: AddressSanitizer-Unit :: ./Asan-powerpc64-calls-Test/AddressSanitizer/OOBRightTest
42.33s: ThreadSanitizer-powerpc64 :: deep_stack1.cpp
42.01s: AddressSanitizer-Unit :: ./Asan-powerpc64-calls-Test/AddressSanitizer/SimpleStackTest
41.63s: UBSan-MemorySanitizer-powerpc64 :: TestCases/ImplicitConversion/bitfield-conversion.c
41.23s: UBSan-ThreadSanitizer-powerpc64 :: TestCases/ImplicitConversion/bitfield-conversion.c
39.98s: UBSan-AddressSanitizer-powerpc64 :: TestCases/ImplicitConversion/bitfield-conversion.c
39.72s: AddressSanitizer-Unit :: ./Asan-powerpc64-calls-Dynamic-Test/AddressSanitizer/SimpleStackTest
37.66s: UBSan-Standalone-powerpc64 :: TestCases/ImplicitConversion/bitfield-conversion.c
33.76s: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/ScudoReleaseTest/ReleaseFreeMemoryToOSDefault
26.10s: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/ScudoCombinedTestDisableMemInit_DefaultConfig/DisableMemInit
23.24s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Test/AddressSanitizer/memalign

Tests Times:
--------------------------------------------------------------------------
[   Range   ] :: [               Percentage               ] :: [  Count  ]
--------------------------------------------------------------------------
[110s,120s) :: [                                        ] :: [   1/3911]
[100s,110s) :: [                                        ] :: [   0/3911]
[ 90s,100s) :: [                                        ] :: [   0/3911]
[ 80s, 90s) :: [                                        ] :: [   0/3911]
Step 16 (test standalone compiler-rt) failure: test standalone compiler-rt (failure)
...
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/powerpc64-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/bin/clang', '--target=powerpc64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/lib/clang/19/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/powerpc64-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/bin/clang', '--target=powerpc64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/lib/clang/19/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/llvm/utils/lit/lit/discovery.py:276: warning: input '/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/test/rtsan/POWERPC64LinuxConfig' contained no tests
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/llvm/utils/lit/lit/formats/googletest.py:38: warning: unable to discover google-tests in '/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/rtsan/tests/./Rtsan-powerpc64-NoInstTest': Command '['/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/rtsan/tests/./Rtsan-powerpc64-NoInstTest', '--gtest_list_tests', '--gtest_filter=-*DISABLED_*']' died with <Signals.SIGSEGV: 11>.. Process output: b''
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/powerpc64-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/bin/clang', '--target=powerpc64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/lib/clang/19/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/powerpc64-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/bin/clang', '--target=powerpc64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/lib/clang/19/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/powerpc64-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/bin/clang', '--target=powerpc64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/lib/clang/19/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/powerpc64-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/bin/clang', '--target=powerpc64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/lib/clang/19/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/powerpc64-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/bin/clang', '--target=powerpc64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/build_default/lib/clang/19/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64be-sanitizer/sanitizer-ppc64be/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
Testing:  0.. 10.. 20.. 30.. 40.. 
FAIL: RealtimeSanitizer-Unit :: ./Rtsan-powerpc64-NoInstTest/failed_to_discover_tests_from_gtest (2565 of 4931)
******************** TEST 'RealtimeSanitizer-Unit :: ./Rtsan-powerpc64-NoInstTest/failed_to_discover_tests_from_gtest' FAILED ********************

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

25 warning(s) in tests
Slowest Tests:
--------------------------------------------------------------------------
61.74s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Dynamic-Test/AddressSanitizer/OOBRightTest
60.64s: ThreadSanitizer-powerpc64 :: restore_stack.cpp
59.11s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Test/AddressSanitizer/SimpleStackTest
58.99s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Test/AddressSanitizer/OOBRightTest
58.91s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Dynamic-Test/AddressSanitizer/SimpleStackTest
58.66s: AddressSanitizer-Unit :: ./Asan-powerpc64-calls-Dynamic-Test/AddressSanitizer/OOBRightTest
58.50s: AddressSanitizer-Unit :: ./Asan-powerpc64-calls-Test/AddressSanitizer/OOBRightTest
56.24s: AddressSanitizer-Unit :: ./Asan-powerpc64-calls-Dynamic-Test/AddressSanitizer/SimpleStackTest
56.22s: AddressSanitizer-Unit :: ./Asan-powerpc64-calls-Test/AddressSanitizer/SimpleStackTest
55.54s: Profile-powerpc64 :: Posix/instrprof-value-prof-shared.test
49.51s: AddressSanitizer-powerpc64-linux :: TestCases/Posix/current_allocated_bytes.cpp
49.39s: AddressSanitizer-powerpc64-linux :: TestCases/Linux/uar_signals.cpp
42.65s: AddressSanitizer-powerpc64-linux-dynamic :: TestCases/Posix/current_allocated_bytes.cpp
42.12s: AddressSanitizer-powerpc64-linux-dynamic :: TestCases/Linux/uar_signals.cpp
39.43s: ThreadSanitizer-powerpc64 :: deadlock_detector_stress_test.cpp
38.60s: LeakSanitizer-AddressSanitizer-powerpc64 :: TestCases/many_threads_detach.cpp
36.62s: ScudoStandalone-Unit :: ./ScudoUnitTest-powerpc64-Test/ScudoReleaseTest/ReleaseFreeMemoryToOSAndroid
34.62s: Builtins-powerpc64-linux :: udivmodti4_test.c
34.21s: ThreadSanitizer-powerpc64 :: deep_stack1.cpp
33.09s: AddressSanitizer-Unit :: ./Asan-powerpc64-inline-Noinst-Test/AddressSanitizer/ThreadedQuarantineTest

Tests Times:
--------------------------------------------------------------------------
[    Range    ] :: [               Percentage               ] :: [  Count  ]
--------------------------------------------------------------------------
[60.0s,65.0s) :: [                                        ] :: [   7/4140]
[55.0s,60.0s) :: [                                        ] :: [   3/4140]
[50.0s,55.0s) :: [                                        ] :: [   2/4140]
[45.0s,50.0s) :: [                                        ] :: [   0/4140]
[40.0s,45.0s) :: [                                        ] :: [   4/4140]

@cjappl
Copy link
Contributor Author

cjappl commented Jul 10, 2024

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off Keep my email addresses private setting in your account. See LLVM Discourse for more information.

Would be possible to fix this? I guess you email is visible in git commits anyway.

Fixed in my local gitconfig. I thought i just needed it in the git commits. Thanks for bringing attention to it

@cjappl
Copy link
Contributor Author

cjappl commented Jul 10, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-ppc64be-linux running on ppc64be-sanitizer while building compiler-rt at step 2 "annotate".

Trying to fix this. I am considering disabling Android as well as PPC arch to go "back basics" then add the rest in later. Will start a new review with those changes. I want to get to some semblance of stability ASAP

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 10, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64be-linux-test-suite running on ppc64be-clang-test-suite while building compiler-rt at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/176/builds/880

Here is the relevant piece of the build log for the reference:

Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'RealtimeSanitizer-Unit :: ./Rtsan-powerpc64-NoInstTest/failed_to_discover_tests_from_gtest' FAILED ********************

********************

Step 7 (test-build-unified-tree-check-runtimes) failure: test (failure)
******************** TEST 'RealtimeSanitizer-Unit :: ./Rtsan-powerpc64-NoInstTest/failed_to_discover_tests_from_gtest' FAILED ********************

********************


vitalybuka pushed a commit that referenced this pull request Jul 10, 2024
Follow on to #92460 (reporting old android builds failing) and #98264
(powerpc failing to discover gtests).

Getting back to stability by getting back down to a very basic set of
supported arches and OS's. In the future if there is demand we can build
it back up. Especially when I understand how to test these systems, or
have people who want to do the work on them.

---------

Co-authored-by: David Trevelyan <[email protected]>
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
…et rid of atomic (llvm#98264)

Fixing test failures in llvm#98256 

There are two issues being fixed here:

```
ld.lld: error: undefined symbol: dlvsym
ld.lld: error: undefined symbol: dlvsym
```

Fixed by linking dl

```
FAILED: ... -lstdc++ -no-pie -pthread -latomic -m64
/opt/rh/devtoolset-11/root/usr/lib/gcc/ppc64-redhat-linux/11/../../../../bin/ld: cannot find /usr/lib64/libatomic.so.1
```

Fixed by removing atomic from the dependencies, I don't think we were
even using it.

I added in all of the dependencies used by the parent library in the
tests, hopefully getting ahead of any other issues, adding rt and m,
even if we haven't had issues with them yet
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
Follow on to llvm#92460 (reporting old android builds failing) and llvm#98264
(powerpc failing to discover gtests).

Getting back to stability by getting back down to a very basic set of
supported arches and OS's. In the future if there is demand we can build
it back up. Especially when I understand how to test these systems, or
have people who want to do the work on them.

---------

Co-authored-by: David Trevelyan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants