C++ 密码覆盖率文件合并在fie锁上失败

C++ 密码覆盖率文件合并在fie锁上失败,c++,clang,code-coverage,C++,Clang,Code Coverage,我使用的是clang的代码覆盖方法,如代码中所述 为了合并不同的并发单元测试运行,我使用了%mLLVM\u PROFILE\u文件名称。但是,当运行多个并发运行时,我会遇到文件锁定问题。关闭期间,配置文件写入挂起,无法获取文件锁 (lldb) bt * thread #1, name = 'runtestsD', stop reason = signal SIGSTOP * frame #0: 0x00007ff78081659c libpthread.so.0`__libc_fcntl(f

我使用的是clang的代码覆盖方法,如代码中所述

为了合并不同的并发单元测试运行,我使用了
%m
LLVM\u PROFILE\u文件
名称。但是,当运行多个并发运行时,我会遇到文件锁定问题。关闭期间,配置文件写入挂起,无法获取文件锁

(lldb) bt
* thread #1, name = 'runtestsD', stop reason = signal SIGSTOP
  * frame #0: 0x00007ff78081659c libpthread.so.0`__libc_fcntl(fd=5, cmd=7) at fcntl.c:63
    frame #1: 0x0000000000228f91 runtestsD`lprofLockFileHandle + 81
    frame #2: 0x0000000000225d62 runtestsD`writeFile + 66
    frame #3: 0x0000000000225c38 runtestsD`__llvm_profile_write_file + 248
    frame #4: 0x00007ff77feb60f1 libc.so.6`__run_exit_handlers(status=0, listp=0x00007ff78025e718, run_list_atexit=<unavailable>, run_dtors=<unavailable>) at exit.c:108
    frame #5: 0x00007ff77feb61ea libc.so.6`__GI_exit(status=<unavailable>) at exit.c:139
我还尝试使用
\uullvm\uprofile\u set\u file\u object
而不是让编译器rt打开文件,但问题是相同的。它挂起获取文件锁

(lldb) bt
* thread #1, name = 'runtestsD', stop reason = signal SIGSTOP
  * frame #0: 0x00007ff78081659c libpthread.so.0`__libc_fcntl(fd=5, cmd=7) at fcntl.c:63
    frame #1: 0x0000000000228f91 runtestsD`lprofLockFileHandle + 81
    frame #2: 0x0000000000225d62 runtestsD`writeFile + 66
    frame #3: 0x0000000000225c38 runtestsD`__llvm_profile_write_file + 248
    frame #4: 0x00007ff77feb60f1 libc.so.6`__run_exit_handlers(status=0, listp=0x00007ff78025e718, run_list_atexit=<unavailable>, run_dtors=<unavailable>) at exit.c:108
    frame #5: 0x00007ff77feb61ea libc.so.6`__GI_exit(status=<unavailable>) at exit.c:139
(lldb)bt
*线程#1,名称='runtestsD',停止原因=信号SIGSTOP
*帧#0:0x00007ff78081659c libpthread.so.0`u libc_fcntl(fd=5,cmd=7)位于fcntl.c:63
帧#1:0x0000000000228f91 runtestsD`lprofLockFileHandle+81
帧#2:0x0000000000225d62 runtestsD`writeFile+66
帧#3:0x0000000000225c38 RUNTESSD`u llvm_profile_write_file+248
帧#4:0x00007ff77feb60f1 libc.so.6`uu运行u退出u处理程序(状态=0,列表=0x00007ff78025e718,运行u列表atexit=,运行dtors=)在退出处。c:108
帧#5:0x00007ff77feb61ea libc.so.6`u GI_退出(状态=)在退出处。c:139
我尝试了
\ullvm\u set\u file\u object
方法,因为代码在锁定和解锁时非常小心

这样的问题以前见过吗