llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.08k stars 11.99k forks source link

[clang] 18.1.0-rc2: Test failures on AIX #82720

Open azhan92 opened 8 months ago

azhan92 commented 8 months ago

There are numerous test failures occurring on AIX during Phase 3 check-all similar to the following:

FAIL: Clang :: ClangScanDeps/modules-context-hash-outputs.c (2216 of 73547)
******************** TEST 'Clang :: ClangScanDeps/modules-context-hash-outputs.c' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp
+ rm -rf /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp
RUN: at line 5: split-file /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/llvm-project/clang/test/ClangScanDeps/modules-context-hash-outputs.c /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp
+ split-file /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/llvm-project/clang/test/ClangScanDeps/modules-context-hash-outputs.c /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp
RUN: at line 6: sed "s|DIR|/home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp|g" /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp/cdb.json.template > /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp/cdb.json
+ sed 's|DIR|/home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp|g' /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp/cdb.json.template
RUN: at line 8: /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/bin/clang-scan-deps -compilation-database /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp/cdb.json -j 1  -format experimental-full > /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp/deps.json
+ /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/bin/clang-scan-deps -compilation-database /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp/cdb.json -j 1 -format experimental-full
Error while scanning dependencies for /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp/tu1.c:
/home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp/tu1.c:1:10: fatal error: could not build module 'Mod'
Error while scanning dependencies for /home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp/tu2.c:
/home/jenkinsWorker/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test/ClangScanDeps/Output/modules-context-hash-outputs.c.tmp/tu2.c:1:10: fatal error: could not build module 'Mod'

--

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

Commit 2cac95b appears to be responsible since the tests pass after reverting it.

azhan92 commented 8 months ago
Failed Tests (231):
  Clang :: ClangScanDeps/Wsystem-headers-in-module.c
  Clang :: ClangScanDeps/diagnostic-pragmas.c
  Clang :: ClangScanDeps/diagnostics.c
  Clang :: ClangScanDeps/error.cpp
  Clang :: ClangScanDeps/generate-modules-path-args.c
  Clang :: ClangScanDeps/header-search-case-sensitivity.c
  Clang :: ClangScanDeps/header-search-pruning-transitive.c
  Clang :: ClangScanDeps/header-search-pruning.cpp
  Clang :: ClangScanDeps/header_stat_before_open.m
  Clang :: ClangScanDeps/headerwithdirname.cpp
  Clang :: ClangScanDeps/modulemap-via-vfs.m
  Clang :: ClangScanDeps/modules-canononical-module-map-case.c
  Clang :: ClangScanDeps/modules-cc1.cpp
  Clang :: ClangScanDeps/modules-context-hash-ignore-macros.c
  Clang :: ClangScanDeps/modules-context-hash-module-map-path.c
  Clang :: ClangScanDeps/modules-context-hash-outputs.c
  Clang :: ClangScanDeps/modules-context-hash-warnings.c
  Clang :: ClangScanDeps/modules-context-hash.c
  Clang :: ClangScanDeps/modules-dep-args.c
  Clang :: ClangScanDeps/modules-disable-free.c
  Clang :: ClangScanDeps/modules-excluded-header.m
  Clang :: ClangScanDeps/modules-extern-submodule.c
  Clang :: ClangScanDeps/modules-extern-unrelated.m
  Clang :: ClangScanDeps/modules-file-name-as-requested.m
  Clang :: ClangScanDeps/modules-file-path-isolation.c
  Clang :: ClangScanDeps/modules-fmodule-name-no-module-built.m
  Clang :: ClangScanDeps/modules-full-by-mod-name.c
  Clang :: ClangScanDeps/modules-full.cpp
  Clang :: ClangScanDeps/modules-has-include-umbrella-header.c
  Clang :: ClangScanDeps/modules-header-sharing.m
  Clang :: ClangScanDeps/modules-implementation-private.m
  Clang :: ClangScanDeps/modules-implementation-vfs.m
  Clang :: ClangScanDeps/modules-implicit-dot-private.m
  Clang :: ClangScanDeps/modules-implied-args.c
  Clang :: ClangScanDeps/modules-incomplete-umbrella.c
  Clang :: ClangScanDeps/modules-inferred.m
  Clang :: ClangScanDeps/modules-module-map-order.m
  Clang :: ClangScanDeps/modules-pch-imports.c
  Clang :: ClangScanDeps/modules-priv-fw-from-pub.m
  Clang :: ClangScanDeps/modules-redefinition.m
  Clang :: ClangScanDeps/modules-symlink-dir-from-module.c
  Clang :: ClangScanDeps/modules-symlink-dir-vfs.c
  Clang :: ClangScanDeps/modules-symlink-dir.c
  Clang :: ClangScanDeps/modules-transitive.c
  Clang :: ClangScanDeps/modules.cpp
  Clang :: ClangScanDeps/multiple-commands.c
  Clang :: ClangScanDeps/no-werror.cpp
  Clang :: ClangScanDeps/optimize-system-warnings.m
  Clang :: ClangScanDeps/preprocess_minimized_pragmas.cpp
  Clang :: ClangScanDeps/removed-args.c
  Clang :: ClangScanDeps/resource_directory.c
  Clang :: ClangScanDeps/response-file.c
  Clang :: ClangScanDeps/strip-codegen-args.m
  Clang :: ClangScanDeps/strip-input-args.m
  Clang :: ClangScanDeps/strip-llvm-args.m
  Clang :: ClangScanDeps/strip-visibility.c
  Clang :: ClangScanDeps/submodule-order.c
  Clang :: ClangScanDeps/symlink.cpp
  Clang :: ClangScanDeps/working-dir.m
  Clang :: CodeCompletion/macros-in-modules.c
  Clang :: CodeCompletion/pch-and-module.m
  Clang :: Headers/xmmintrin.c
  Clang :: Index/annotate-comments-objc.m
  Clang :: Index/annotate-module.m
  Clang :: Index/annotate-tokens-pp.c
  Clang :: Index/c-index-getCursor-pp.c
  Clang :: Index/complete-module-undef.m
  Clang :: Index/complete-modules.m
  Clang :: Index/coroutines.cpp
  Clang :: Index/crash-recovery-modules.m
  Clang :: Index/hidden-redecls.m
  Clang :: Index/index-module-with-vfs.m
  Clang :: Index/index-module.m
  Clang :: Index/keep-going-include-cycle.c
  Clang :: Index/keep-going-template-instantiations.cpp
  Clang :: Index/keep-going.cpp
  Clang :: Index/missing_vfs.c
  Clang :: Index/modules-objc-categories.m
  Clang :: Index/pch-with-errors.c
  Clang :: Index/pch-with-module.m
  Clang :: Index/preamble-reparse-chained.c
  Clang :: Index/preamble-reparse-changed-module.m
  Clang :: Index/preamble-with-implicit-import.m
  Clang :: Index/preamble.c
  Clang :: Index/redeclarations.cpp
  Clang :: Index/retain-comments-from-system-headers.c
  Clang :: Modules/ASTSignature.c
  Clang :: Modules/Rmodule-build.m
  Clang :: Modules/Rmodule-import.m
  Clang :: Modules/Wsystem-headers-in-module.c
  Clang :: Modules/add-remove-irrelevant-module-map.m
  Clang :: Modules/anon-namespace.cpp
  Clang :: Modules/at-import-in-framework-header.m
  Clang :: Modules/auto-module-import.m
  Clang :: Modules/build-fail-notes.m
  Clang :: Modules/builtin-headers.mm
  Clang :: Modules/builtin-import.mm
  Clang :: Modules/class-extension-protocol.m
  Clang :: Modules/compare-objc-nonisolated-methods.m
  Clang :: Modules/compare-objc-protocol.m
  Clang :: Modules/compiler_builtins_aarch64.m
  Clang :: Modules/compiler_builtins_arm.m
  Clang :: Modules/crash-vfs-umbrella-frameworks.m
  Clang :: Modules/cstd.m
  Clang :: Modules/cxx-dtor.cpp
  Clang :: Modules/cxx-lookup.cpp
  Clang :: Modules/cxx-templates.cpp
  Clang :: Modules/cycles.c
  Clang :: Modules/deferred-lookup.cpp
  Clang :: Modules/dependency-dump-dependent-module.m
  Clang :: Modules/dependent-module-different-location.m
  Clang :: Modules/double-quotes.m
  Clang :: Modules/epic-fail.m
  Clang :: Modules/extern_c.cpp
  Clang :: Modules/fatal-module-loader-error.m
  Clang :: Modules/framework-public-includes-private.m
  Clang :: Modules/global_index.m
  Clang :: Modules/implementation-of-module.m
  Clang :: Modules/implicit-invalidate-chain.c
  Clang :: Modules/implicit-invalidate-common.c
  Clang :: Modules/implicit-modules-use-lock.m
  Clang :: Modules/import-once.m
  Clang :: Modules/import-textual.mm
  Clang :: Modules/include_next.c
  Clang :: Modules/invalidate-identifiers.c
  Clang :: Modules/lambda-in-variable.cpp
  Clang :: Modules/libc-libcxx.cpp
  Clang :: Modules/load-after-failure.m
  Clang :: Modules/load-module-with-errors.m
  Clang :: Modules/localsubmodulevis.m
  Clang :: Modules/macro-hiding.cpp
  Clang :: Modules/macro-reexport.cpp
  Clang :: Modules/macros.c
  Clang :: Modules/merge-anon-in-template.cpp
  Clang :: Modules/merge-decl-order.cpp
  Clang :: Modules/merge-dependent-friends.cpp
  Clang :: Modules/merge-friends.cpp
  Clang :: Modules/merge-implicit-special-members.cpp
  Clang :: Modules/merge-lifetime-extended-temporary.cpp
  Clang :: Modules/merge-name-for-linkage.cpp
  Clang :: Modules/merge-nested-templates.cpp
  Clang :: Modules/merge-template-members-parent.cpp
  Clang :: Modules/merge-template-members.cpp
  Clang :: Modules/merge-template-specializations.cpp
  Clang :: Modules/merge-typedefs.cpp
  Clang :: Modules/merge-var-template-def.cpp
  Clang :: Modules/method_pool_transitive.m
  Clang :: Modules/method_pool_write.m
  Clang :: Modules/missing-framework-header.cpp
  Clang :: Modules/modify-module.m
  Clang :: Modules/modulemap-locations.m
  Clang :: Modules/modules-cache-path-canonicalization.m
  Clang :: Modules/modules-with-same-name.m
  Clang :: Modules/ms-enums.cpp
  Clang :: Modules/multiple-include.cpp
  Clang :: Modules/namespaces.cpp
  Clang :: Modules/no-check-relocated-fw-private-sub.c
  Clang :: Modules/no-check-relocated-fw-private.c
  Clang :: Modules/no-stale-modtime.m
  Clang :: Modules/no-undeclared-includes-builtins.cpp
  Clang :: Modules/normal-module-map.cpp
  Clang :: Modules/objc-hidden.m
  Clang :: Modules/odr_hash-Friend.cpp
  Clang :: Modules/odr_hash-Unresolved.cpp
  Clang :: Modules/outofdate-rebuild.m
  Clang :: Modules/pch-with-module-name.m
  Clang :: Modules/pr19692.cpp
  Clang :: Modules/pr20399.cpp
  Clang :: Modules/pr20786.cpp
  Clang :: Modules/pr21687.cpp
  Clang :: Modules/pr24954.cpp
  Clang :: Modules/pr25501.cpp
  Clang :: Modules/pr26014.cpp
  Clang :: Modules/pr26179.cpp
  Clang :: Modules/pr27041.cpp
  Clang :: Modules/pr27186.cpp
  Clang :: Modules/pr27513.cpp
  Clang :: Modules/pr27739.cpp
  Clang :: Modules/pr27754.cpp
  Clang :: Modules/pr28332.cpp
  Clang :: Modules/preprocess-build-diamond.m
  Clang :: Modules/preprocess.m
  Clang :: Modules/private1.cpp
  Clang :: Modules/protocol-redefinition.m
  Clang :: Modules/prune.m
  Clang :: Modules/recursive.c
  Clang :: Modules/recursive_visibility.mm
  Clang :: Modules/redecl-add-after-load.cpp
  Clang :: Modules/redecl-found-building-chains.cpp
  Clang :: Modules/redecl-merge.m
  Clang :: Modules/redecl-merge2.m
  Clang :: Modules/relative-import-path.c
  Clang :: Modules/require-modular-includes.m
  Clang :: Modules/resolution-change.m
  Clang :: Modules/self-import-header.m
  Clang :: Modules/set-pure-crash.cpp
  Clang :: Modules/shadowed-submodule.m
  Clang :: Modules/stddef.c
  Clang :: Modules/stddef.m
  Clang :: Modules/structural-equivalent-recursive-types.c
  Clang :: Modules/subframeworks.m
  Clang :: Modules/submodule-visibility.cpp
  Clang :: Modules/system-Rmodule-build.m
  Clang :: Modules/system-out-of-date-test.m
  Clang :: Modules/templates.mm
  Clang :: Modules/thread-safety.cpp
  Clang :: Modules/umbrella-header-include-builtin.mm
  Clang :: Modules/update-exception-spec.cpp
  Clang :: Modules/using-decl-redecl.cpp
  Clang :: Modules/va_list.cpp
  Clang :: Modules/va_list.m
  Clang :: Modules/wildcard-submodule-exports.cpp
  Clang :: VFS/module-map-path.m
  Clang :: VFS/subframework-symlink.m
  Clang-Unit :: Serialization/./SerializationTests/ModuleCacheTest/CachedModuleNewPath
  Clang-Unit :: Serialization/./SerializationTests/ModuleCacheTest/CachedModuleNewPathAllowErrors
  LLVM :: LTO/Resolution/X86/cache-dso-local.ll
  LLVM :: LTO/Resolution/X86/cache-dso-local2.ll
  LLVM :: LTO/Resolution/X86/cache-prevailing.ll
  LLVM :: ThinLTO/X86/cache-config.ll
  LLVM :: ThinLTO/X86/cache-decoupled-from-filenames.ll
  LLVM :: ThinLTO/X86/cache-decoupled-from-order.ll
  LLVM :: ThinLTO/X86/cache-icall.ll
  LLVM :: ThinLTO/X86/cache-import-lists.ll
  LLVM :: ThinLTO/X86/cache-typeid-resolutions.ll
  LLVM :: ThinLTO/X86/cache.ll
  LLVM :: ThinLTO/X86/empty_module_with_cache.ll
  LLVM :: ThinLTO/X86/index-const-prop-cache.ll
  LLVM :: ThinLTO/X86/save_objects.ll
  LLVM :: tools/llvm-cov/multithreaded-report.test
  LLVM :: tools/llvm-cov/threads.c

Testing Time: 849.29s

Total Discovered Tests: 93764
  Skipped          :   101 (0.11%)
  Unsupported      :  3608 (3.85%)
  Passed           : 89604 (95.56%)
  Expectedly Failed:   220 (0.23%)
  Failed           :   231 (0.25%)
FAILED: CMakeFiles/check-all /scratch/jenkins/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/CMakeFiles/check-all 
cd /scratch/jenkins/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj && /opt/freeware/bin/python3.9 /scratch/jenkins/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/./bin/llvm-lit -j 80 -v --param USE_Z3_SOLVER=0 /scratch/jenkins/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/utils/mlgo-utils /scratch/jenkins/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/tools/clang/test @/scratch/jenkins/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/runtimes/runtimes-bins/lit.tests /scratch/jenkins/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/utils/lit /scratch/jenkins/llvm/clang18.1.0-2/rc2/Phase3/Release/llvmCore-18.1.0-rc2.obj/test
ninja: build stopped: cannot make progress due to previous errors.
tstellar commented 8 months ago

@qiongsiwu What do you think about reverting this?

qiongsiwu commented 8 months ago

Thanks for the ping @tstellar! I will try to provide some update today - it should be OK reverting this, but that may cause thread pools on AIX to have only a size of 1.

qiongsiwu commented 8 months ago

It seems that these failures are only occurring during bootstrap. With an older build compiler, they are not showing up. I am taking a closer look to see that this may be the symptom of other issues.

qiongsiwu commented 8 months ago

I was able to reproduce the failures reliably during bootstrap but I have not found out the root cause. This will be my top priority over the next day or two. If no reasonable fixes are found soon, I will revert the commit from the release branch. Does this sound reasonable to you both @tstellar @azhan92 ?

azhan92 commented 8 months ago

I was able to reproduce the failures reliably during bootstrap but I have not found out the root cause. This will be my top priority over the next day or two. If no reasonable fixes are found soon, I will revert the commit from the release branch. Does this sound reasonable to you both @tstellar @azhan92 ?

That sounds good to me, thanks for looking into it!