[clang] [clang][modules] Prevent deadlock in module cache (PR #182722)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 21 21:35:33 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 113605 tests passed
* 4666 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### llvm-libc++-shared-cfg-in
<details>
<summary>llvm-libc++-shared-cfg-in.libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# COMPILED WITH
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang++ /home/gha/actions-runner/_work/llvm-project/llvm-project/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp -pthread --target=x86_64-unknown-linux-gnu -nostdinc++ -I /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test-suite-install/include/x86_64-unknown-linux-gnu/c++/v1 -I /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test-suite-install/include/c++/v1 -I /home/gha/actions-runner/_work/llvm-project/llvm-project/libcxx/test/support -std=c++26 -fmodules -fcxx-modules -fmodules-cache-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test/ModuleCache -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wshift-negative-value -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -Wno-nullability-completeness -flax-vector-conversions=none -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -Wuser-defined-warnings -Wno-macro-redefined -D_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI -lc++experimental -nostdlib++ -L /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test-suite-install/lib/x86_64-unknown-linux-gnu -Wl,-rpath,/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test-suite-install/lib/x86_64-unknown-linux-gnu -lc++ -latomic -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test/libcxx/memory/trivial_abi/Output/unique_ptr_destruction_order.pass.cpp.dir/t.tmp.exe
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang++ /home/gha/actions-runner/_work/llvm-project/llvm-project/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp -pthread --target=x86_64-unknown-linux-gnu -nostdinc++ -I /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test-suite-install/include/x86_64-unknown-linux-gnu/c++/v1 -I /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test-suite-install/include/c++/v1 -I /home/gha/actions-runner/_work/llvm-project/llvm-project/libcxx/test/support -std=c++26 -fmodules -fcxx-modules -fmodules-cache-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test/ModuleCache -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wshift-negative-value -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -Wno-nullability-completeness -flax-vector-conversions=none -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -Wuser-defined-warnings -Wno-macro-redefined -D_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI -lc++experimental -nostdlib++ -L /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test-suite-install/lib/x86_64-unknown-linux-gnu -Wl,-rpath,/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test-suite-install/lib/x86_64-unknown-linux-gnu -lc++ -latomic -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test/libcxx/memory/trivial_abi/Output/unique_ptr_destruction_order.pass.cpp.dir/t.tmp.exe
# .---command stderr------------
# | clang-23: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Serialization/ASTReader.cpp:6291: llvm::Error clang::ASTReader::ReadSubmoduleBlock(ModuleFile &, unsigned int): Assertion `CurFile != F.File && "ModuleManager did not de-duplicate"' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
# | Stack dump:
# | 0. /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libcxx/test-suite-install/include/c++/v1/__thread/support/pthread.h:33:4: current parser token 'include'
# | #0 0x00000000090432f8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:880:13
# | #1 0x0000000009040265 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:109:18
# | #2 0x0000000009044151 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:448:38
# | #3 0x0000000009043fa8 __find_if<const int *, __gnu_cxx::__ops::_Iter_equals_val<const int> > /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algobase.h:2072:8
# | #4 0x0000000009043fa8 __find_if<const int *, __gnu_cxx::__ops::_Iter_equals_val<const int> > /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algobase.h:2117:14
# | #5 0x0000000009043fa8 find<const int *, int> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algo.h:3897:14
# | #6 0x0000000009043fa8 is_contained<const int (&)[10], int> /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1953:12
# | #7 0x0000000009043fa8 SignalHandlerTerminate(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:464:7
# | #8 0x00007cb1f6dae330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# | #9 0x00007cb1f6e07b2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
# | #10 0x00007cb1f6dae27e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
# | #11 0x00007cb1f6d918ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# | #12 0x00007cb1f6d9181b (/lib/x86_64-linux-gnu/libc.so.6+0x2881b)
# | #13 0x00007cb1f6da4517 (/lib/x86_64-linux-gnu/libc.so.6+0x3b517)
# | #14 0x0000000009ffacd5 value /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/Basic/DirectoryEntry.h:136:5
# | #15 0x0000000009ffacd5 operator-> /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/Basic/CustomizableOptional.h:76:37
# | #16 0x0000000009ffacd5 clang::ASTReader::ReadSubmoduleBlock(clang::serialization::ModuleFile&, unsigned int) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Serialization/ASTReader.cpp:0:0
# | #17 0x0000000009ff4482 getPtr /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Error.h:278:42
# | #18 0x0000000009ff4482 operator bool /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Error.h:241:16
# | #19 0x0000000009ff4482 clang::ASTReader::ReadASTBlock(clang::serialization::ModuleFile&, unsigned int) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Serialization/ASTReader.cpp:3696:25
# | #20 0x0000000009ffd3bb getPtr /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Error.h:278:42
# | #21 0x0000000009ffd3bb operator bool /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Error.h:241:16
# | #22 0x0000000009ffd3bb clang::ASTReader::ReadAST(llvm::StringRef, clang::serialization::ModuleKind, clang::SourceLocation, unsigned int, clang::serialization::ModuleFile**) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Serialization/ASTReader.cpp:4911:21
# | #23 0x0000000009e1df0a readASTAfterCompileModule(clang::CompilerInstance&, clang::SourceLocation, clang::SourceLocation, clang::Module*, llvm::StringRef, bool*, bool*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1418:41
# | #24 0x0000000009e1dd60 compileModuleAndReadASTImpl(clang::CompilerInstance&, clang::SourceLocation, clang::SourceLocation, clang::Module*, llvm::StringRef) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:0:10
# | #25 0x0000000009e19191 compileModuleAndReadASTBehindLock /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1511:14
# | #26 0x0000000009e19191 compileModuleAndReadAST(clang::CompilerInstance&, clang::SourceLocation, clang::SourceLocation, clang::Module*, llvm::StringRef) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1564:16
# | #27 0x0000000009e18165 clang::CompilerInstance::findOrCompileModuleAndReadAST(llvm::StringRef, clang::SourceLocation, clang::SourceRange, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1940:7
# | #28 0x0000000009e1a3a7 clang::CompilerInstance::loadModule(clang::SourceLocation, llvm::ArrayRef<clang::IdentifierLoc>, clang::Module::NameVisibilityKind, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:2018:31
# | #29 0x000000000c8e6f68 clang::Preprocessor::HandleHeaderIncludeOrImport(clang::SourceLocation, clang::Token&, clang::Token&, clang::SourceLocation, clang::detail::SearchDirIteratorImpl<true>, clang::FileEntry const*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Lex/PPDirectives.cpp:2532:5
# | #30 0x000000000c8dfcbd clang::Preprocessor::HandleIncludeDirective(clang::SourceLocation, clang::Token&, clang::detail::SearchDirIteratorImpl<true>, clang::FileEntry const*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Lex/PPDirectives.cpp:2209:3
# | #31 0x000000000c8e066d clang::Preprocessor::HandleDirective(clang::Token&) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Lex/PPDirectives.cpp:1438:7
# | #32 0x000000000c8a4a7a clang::Lexer::LexTokenInternal(clang::Token&) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Lex/Lexer.cpp:4526:7
# | #33 0x000000000c8a0a9b clang::Lexer::Lex(clang::Token&) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Lex/Lexer.cpp:3742:3
# | #34 0x000000000c91d9ad clang::Preprocessor::Lex(clang::Token&) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Lex/Preprocessor.cpp:916:3
# | #35 0x000000000b32124b clang::Parser::ConsumeBrace() /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/Parse/Parser.h:672:12
# | #36 0x000000000b32b586 clang::BalancedDelimiterTracker::consumeClose() /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/Parse/RAIIObjectsForParser.h:0:0
# | #37 0x000000000b36da47 clang::Parser::ParseLinkage(clang::ParsingDeclSpec&, clang::DeclaratorContext) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:0:5
# | #38 0x000000000b328503 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Parse/Parser.cpp:1145:12
# | #39 0x000000000b327e26 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Parse/Parser.cpp:1170:12
# | #40 0x000000000b326ece clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Parse/Parser.cpp:0:14
# | #41 0x000000000b3250f0 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Parse/Parser.cpp:706:10
# | #42 0x000000000b31975e clang::ParseAST(clang::Sema&, bool, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Parse/ParseAST.cpp:169:5
# | #43 0x0000000009eadc06 clang::FrontendAction::Execute() /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1326:10
# | #44 0x0000000009e1274d getPtr /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Error.h:278:42
# | #45 0x0000000009e1274d operator bool /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Error.h:241:16
# | #46 0x0000000009e1274d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1007:23
# | #47 0x0000000009e202df operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1278:7
# | #48 0x0000000009e202df void llvm::function_ref<void ()>::callback_fn<clang::CompilerInstance::compileModule(clang::SourceLocation, llvm::StringRef, llvm::StringRef, clang::CompilerInstance&)::$_0>(long) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #49 0x0000000008fa199e operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:0:12
# | #50 0x0000000008fa199e llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:437:3
# | #51 0x0000000008fa1bd4 RunSafelyOnThread_Dispatch(void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:521:16
# | #52 0x0000000008fa1d12 operator() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:99:2
# | #53 0x0000000008fa1d12 ~unique_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:404:4
# | #54 0x0000000008fa1d12 GenericThreadProxy<std::tuple<void (*)(void *), (anonymous namespace)::RunSafelyOnThreadInfo *> > /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/thread.h:49:3
# | #55 0x0000000008fa1d12 void* llvm::thread::ThreadProxy<std::tuple<void (*)(void*), (anonymous namespace)::RunSafelyOnThreadInfo*>>(void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/thread.h:62:5
# | #56 0x00007cb1f6e05aa4 (/lib/x86_64-linux-gnu/libc.so.6+0x9caa4)
# | #57 0x00007cb1f6e92c6c (/lib/x86_64-linux-gnu/libc.so.6+0x129c6c)
# | clang++: error: unable to execute command: Aborted
# | clang++: error: clang frontend command failed with exit code -2 (use -v to see invocation)
# | clang version 23.0.0git (https://github.com/llvm/llvm-project 1093fa47987b1e6c6d998c4c1803570d9b016afd)
# | Target: x86_64-unknown-linux-gnu
# | Thread model: posix
# | InstalledDir: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin
# | Build config: +assertions
# | clang++: note: diagnostic msg:
# | ********************
# |
# | PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
# | Preprocessed source(s) and associated run script(s) are located at:
# | clang++: note: diagnostic msg: /home/gha/actions-runner/_work/llvm-project/llvm-project/artifacts/reproducers/unique_ptr_destruction_order-5bab16.cpp
# | clang++: note: diagnostic msg: /home/gha/actions-runner/_work/llvm-project/llvm-project/artifacts/reproducers/unique_ptr_destruction_order-5bab16.cache
# | clang++: note: diagnostic msg: /home/gha/actions-runner/_work/llvm-project/llvm-project/artifacts/reproducers/unique_ptr_destruction_order-5bab16.sh
# | clang++: note: diagnostic msg:
# |
# | ********************
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/182722
More information about the cfe-commits
mailing list