[clang] [clang][modules] Prevent deadlock in module cache (PR #182722)

via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 21 21:35:32 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 52668 tests passed
* 970 tests skipped
* 2 tests failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.ClangScanDeps/modules-context-hash-from-named-module.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 5
rm -rf C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp
# executed command: rm -rf 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 6
split-file C:\_work\llvm-project\llvm-project\clang\test\ClangScanDeps\modules-context-hash-from-named-module.cpp C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp
# executed command: split-file 'C:\_work\llvm-project\llvm-project\clang\test\ClangScanDeps\modules-context-hash-from-named-module.cpp' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 31
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -std=c++23 -fmodules    -fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/modules-cache    C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/main.cpp C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/A.cppm C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/B.cppm    -fsyntax-only -fdriver-only -MJ C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/deps.json
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -std=c++23 -fmodules '-fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/modules-cache' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/main.cpp' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/A.cppm' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/B.cppm' -fsyntax-only -fdriver-only -MJ 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/deps.json'
# note: command had no output on stdout or stderr
# RUN: at line 36
sed -e '1s/^/[/' -e '$s/,$/]/' -e 's:\\\\\?:/:g' C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/deps.json    > C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/compile_commands.json
# executed command: sed -e '1s/^/[/' -e '$s/,$/]/' -e 's:\\\\\?:/:g' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/deps.json'
# note: command had no output on stdout or stderr
# RUN: at line 39
c:\_work\llvm-project\llvm-project\build\bin\clang-scan-deps.exe    -compilation-database=C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/compile_commands.json    -format experimental-full    | sed 's:\\\\\?:/:g' | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\ClangScanDeps\modules-context-hash-from-named-module.cpp -DPREFIX=C:/_work/llvm-project/llvm-project/build/tools/clang/test/ClangScanDeps/Output/modules-context-hash-from-named-module.cpp.tmp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang-scan-deps.exe' '-compilation-database=C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\modules-context-hash-from-named-module.cpp.tmp/compile_commands.json' -format experimental-full
# .---command stderr------------
# | Diagnostics while scanning dependencies for 'C:/_work/llvm-project/llvm-project/build/tools/clang/test/ClangScanDeps/Output/modules-context-hash-from-named-module.cpp.tmp/B.cppm':
# | C:/_work/llvm-project/llvm-project/build/tools/clang/test/ClangScanDeps/Output/modules-context-hash-from-named-module.cpp.tmp/B.cppm:2:10: fatal error: could not build module 'root'
# `-----------------------------
# error: command failed with exit status: 1
# executed command: sed 's:\\\\\?:/:g'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\ClangScanDeps\modules-context-hash-from-named-module.cpp' -DPREFIX=C:/_work/llvm-project/llvm-project/build/tools/clang/test/ClangScanDeps/Output/modules-context-hash-from-named-module.cpp.tmp
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\ClangScanDeps\modules-context-hash-from-named-module.cpp:100:16: error: CHECK-NEXT: expected string not found in input
# | // CHECK-NEXT: {
# |                ^
# | <stdin>:272:15: note: scanning from here
# |  "commands": []
# |               ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\ClangScanDeps\modules-context-hash-from-named-module.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           .
# |           .
# |           .
# |         267:  "input-file": "C:/_work/llvm-project/llvm-project/build/tools/clang/test/ClangScanDeps/Output/modules-context-hash-from-named-module.cpp.tmp/A.cppm" 
# |         268:  } 
# |         269:  ] 
# |         270:  }, 
# |         271:  { 
# |         272:  "commands": [] 
# | next:100                   X~ error: no match found
# |         273:  } 
# | next:100     ~~~
# |         274:  ] 
# | next:100     ~~~
# |         275: }
# | next:100     ~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>Clang.ClangScanDeps/strip-visibility.c</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -rf C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\strip-visibility.c.tmp
# executed command: rm -rf 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\strip-visibility.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 2
split-file C:\_work\llvm-project\llvm-project\clang\test\ClangScanDeps\strip-visibility.c C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\strip-visibility.c.tmp
# executed command: split-file 'C:\_work\llvm-project\llvm-project\clang\test\ClangScanDeps\strip-visibility.c' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\strip-visibility.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 3
sed -e "s|DIR|C:/_work/llvm-project/llvm-project/build/tools/clang/test/ClangScanDeps/Output/strip-visibility.c.tmp|g" C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\strip-visibility.c.tmp/cdb.json.template > C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\strip-visibility.c.tmp/cdb.json
# executed command: sed -e 's|DIR|C:/_work/llvm-project/llvm-project/build/tools/clang/test/ClangScanDeps/Output/strip-visibility.c.tmp|g' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\strip-visibility.c.tmp/cdb.json.template'
# note: command had no output on stdout or stderr
# RUN: at line 5
c:\_work\llvm-project\llvm-project\build\bin\clang-scan-deps.exe -compilation-database C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\strip-visibility.c.tmp/cdb.json -format experimental-full -mode preprocess-dependency-directives > C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\strip-visibility.c.tmp/result.txt
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang-scan-deps.exe' -compilation-database 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\strip-visibility.c.tmp/cdb.json' -format experimental-full -mode preprocess-dependency-directives
# .---redirected output from 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\ClangScanDeps\Output\strip-visibility.c.tmp/result.txt'
# | {
# |   "modules": [
# |     {
# |       "clang-module-deps": [],
# |       "clang-modulemap-file": "C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\test\\ClangScanDeps\\Output\\strip-visibility.c.tmp\\modules\\A\\module.modulemap",
# |       "command-line": [
# |         "-cc1",
# |         "-ferror-limit",
# |         "19",
# |         "-o",
# |         "C:/_work/llvm-project/llvm-project/build/tools/clang/test/ClangScanDeps/Output/strip-visibility.c.tmp/module-cache\\9ID0R5PJZEUYR89RVBLLZ7C6O\\A-9ID0R5PJZEUYR89RVBLLZ7C6O.pcm",
# |         "-disable-free",
# |         "-emit-module",
# |         "-x",
# |         "c",
# |         "C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\test\\ClangScanDeps\\Output\\strip-visibility.c.tmp\\modules\\A\\module.modulemap",
# |         "-tune-cpu",
# |         "generic",
# |         "-target-cpu",
# |         "x86-64",
# |         "-triple",
# |         "x86_64-pc-windows-msvc19.29.30159",
# |         "-fmodules-validate-system-headers",
# |         "-fno-modules-prune-non-affecting-module-map-files",
# |         "-resource-dir",
# |         "c:
# | ...
# `---data was truncated--------
# .---command stderr------------
# | Diagnostics while scanning dependencies for 'C:/_work/llvm-project/llvm-project/build/tools/clang/test/ClangScanDeps/Output/strip-visibility.c.tmp/t3.c':
# | C:/_work/llvm-project/llvm-project/build/tools/clang/test/ClangScanDeps/Output/strip-visibility.c.tmp/t3.c:1:10: fatal error: could not build module 'A'
# `-----------------------------
# 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