[PATCH] D137527: [C++20] [Modules] [ClangScanDeps] Add ClangScanDeps support for C++20 Named Modules in P1689 format (2/4)

Mikael Holmén via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 10 02:15:13 PST 2023


uabelho added a comment.

Hi,

There seems to be something funny going on with the ClangScanDeps/P1689 <https://reviews.llvm.org/P1689>.cppm testcase added in this patch.

It fails randomly for me on top of tree (4ad8f7a189570 <https://reviews.llvm.org/rG4ad8f7a189570dc2560d0efdd05e6a8153313808>).
Roughly 1 in 10 runs fail for me.
E.g. with a crash like

  Exit Code: 2
  
  Command Output (stderr):
  --
  PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
  #0 0x00000000004ef8b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps+0x4ef8b8)
  #1 0x00000000004ed5ae llvm::sys::RunSignalHandlers() (/repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps+0x4ed5ae)
  #2 0x00000000004f0096 SignalHandler(int) Signals.cpp:0:0
  #3 0x00007f6518263630 __restore_rt sigaction.c:0:0
  #4 0x0000000000474f40 P1689Deps::addSourcePathsToRequires() crtstuff.c:0:0
  #5 0x00000000004666d1 P1689Deps::printDependencies(llvm::raw_ostream&) crtstuff.c:0:0
  #6 0x000000000046204a main (/repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps+0x46204a)
  #7 0x00007f6515996555 __libc_start_main (/lib64/libc.so.6+0x22555)
  #8 0x000000000045fcad _start (/repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps+0x45fcad)
  FileCheck error: '<stdin>' is empty.
  FileCheck command line:  /repo/uabelho/main-github/llvm/build-all/bin/FileCheck /repo/uabelho/main-github/llvm/build-all/tools/clang/test/ClangScanDeps/Output/P1689.cppm.tmp/Checks.cpp -DPREFIX=/repo/uabelho/main-github/llvm/build-all/tools/clang/test/ClangScanDeps/Output/P1689.cppm.tmp
  
  --
  
  ********************
  ********************
  Failed Tests (1):
    Clang :: ClangScanDeps/P1689.cppm

or

  Exit Code: 2
  
  Command Output (stderr):
  --
  PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
   #0 0x00000000004ef8b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps+0x4ef8b8)
   #1 0x00000000004ed5ae llvm::sys::RunSignalHandlers() (/repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps+0x4ed5ae)
   #2 0x00000000004f0096 SignalHandler(int) Signals.cpp:0:0
   #3 0x00007f422b33e630 __restore_rt sigaction.c:0:0
   #4 0x00007f4228a85387 raise (/lib64/libc.so.6+0x36387)
   #5 0x00007f4228a86a78 abort (/lib64/libc.so.6+0x37a78)
   #6 0x00007f4228ac7f67 __libc_message (/lib64/libc.so.6+0x78f67)
   #7 0x00007f4228ad0329 _int_free malloc.c:0:0
   #8 0x000000000047e7ef void std::vector<clang::tooling::dependencies::P1689Rule, std::allocator<clang::tooling::dependencies::P1689Rule>>::_M_realloc_insert<clang::tooling::dependencies::P1689Rule const&>(__gnu_cxx::__normal_iterator<clang::tooling::dependencies::P1689Rule*, std::vector<clang::tooling::dependencies::P1689Rule, std::allocator<clang::tooling::dependencies::P1689Rule>>>, clang::tooling::dependencies::P1689Rule const&) (/repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps+0x47e7ef)
   #9 0x000000000047cea1 std::_Function_handler<void (), main::$_1>::_M_invoke(std::_Any_data const&) ClangScanDeps.cpp:0:0
  #10 0x000000000047ba3c std::_Function_handler<void (), llvm::ThreadPool::createTaskAndFuture(std::function<void ()>)::'lambda'()>::_M_invoke(std::_Any_data const&) crtstuff.c:0:0
  #11 0x00000000004b73e9 llvm::ThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps+0x4b73e9)
  #12 0x00000000004b8358 void* llvm::thread::ThreadProxy<std::tuple<llvm::ThreadPool::grow(int)::$_0>>(void*) ThreadPool.cpp:0:0
  #13 0x00007f422b336ea5 start_thread pthread_create.c:0:0
  #14 0x00007f4228b4db0d clone (/lib64/libc.so.6+0xfeb0d)
  FileCheck error: '<stdin>' is empty.
  FileCheck command line:  /repo/uabelho/main-github/llvm/build-all/bin/FileCheck /repo/uabelho/main-github/llvm/build-all/tools/clang/test/ClangScanDeps/Output/P1689.cppm.tmp/Checks.cpp -DPREFIX=/repo/uabelho/main-github/llvm/build-all/tools/clang/test/ClangScanDeps/Output/P1689.cppm.tmp
  
  --
  
  ********************
  ********************
  Failed Tests (1):
    Clang :: ClangScanDeps/P1689.cppm

but I've also seen things like

  *** Error in `/repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps': corrupted size vs. prev_size: 0x00007faf74000fc0 ***
  ======= Backtrace: =========
  /lib64/libc.so.6(+0x7f474)[0x7fafa1ffa474]
  /lib64/libc.so.6(+0x8156b)[0x7fafa1ffc56b]
  /repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps[0x47e7ef]
  /repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps[0x47cea1]
  /repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps[0x47ba3c]
  /repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps[0x4b73e9]
  /repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps[0x4b8358]
  /lib64/libpthread.so.0(+0x7ea5)[0x7fafa4862ea5]
  /lib64/libc.so.6(clone+0x6d)[0x7fafa2079b0d]
  ======= Memory map: ========
  00400000-08ffa000 r-xp 00000000 fd:01 63551                              /repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps
  08ffa000-09b44000 rw-p 08bf9000 fd:01 63551                              /repo/uabelho/main-github/llvm/build-all/bin/clang-scan-deps
  09b44000-09bbf000 rw-p 00000000 00:00 0 
  0a86a000-0a8f3000 rw-p 00000000 00:00 0                                  [heap]
  7faf64000000-7faf64021000 rw-p 00000000 00:00 0 
  7faf64021000-7faf68000000 ---p 00000000 00:00 0 
  [...]


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137527/new/

https://reviews.llvm.org/D137527



More information about the cfe-commits mailing list