Description of the issue
In the last few days I've started getting intermittent (say 10%) SIGSEGV crashes during dotnet restore and dotnet build when running under CodeQL via GitHub Actions Runner.
I've managed to capture a core dump and ran gdb backtrace on the offending thread from a GitHub Action Runner.
I notice in the stack trace context line 3 it mentions Logger::Logger in semmle_utils.cpp just before entering bazel_runner.
I don't have a separate test case, but I can re-run the build and every now and then it will trigger with a failure; without CodeQL there is no issue.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `dotnet restore /home/runner/work/project/project/project/project.sln'.
Program terminated with signal SIGSEGV, Segmentation fault.
--Type <RET> for more, q to quit, c to continue without paging--c
#0 0x00007f5ebe8b4d11 in std::__1::__shared_count::__release_shared (this=0x55a493a19fe0) at /home/runner/.cache/bazel/_bazel_runner/9f4ed60bba64c867c2242caf607221b5/external/cc_linux_toolchain/bin/../include/c++/v1/__memory/shared_ptr.h:174
174 /home/runner/.cache/bazel/_bazel_runner/9f4ed60bba64c867c2242caf607221b5/external/cc_linux_toolchain/bin/../include/c++/v1/__memory/shared_ptr.h: No such file or directory.
[Current thread is 1 (Thread 0x7f1d55ff9640 (LWP 2031))]
(gdb)
(gdb)
(gdb)
(gdb)
(gdb) bt
#0 0x00007f5ebe8b4d11 in std::__1::__shared_count::__release_shared (this=0x55a493a19fe0)
at /home/runner/.cache/bazel/_bazel_runner/9f4ed60bba64c867c2242caf607221b5/external/cc_linux_toolchain/bin/../include/c++/v1/__memory/shared_ptr.h:174
#1 std::__1::__shared_weak_count::__release_shared (this=0x55a493a19fe0)
at /home/runner/.cache/bazel/_bazel_runner/9f4ed60bba64c867c2242caf607221b5/external/cc_linux_toolchain/bin/../include/c++/v1/__memory/shared_ptr.h:216
#2 std::__1::shared_ptr<global_state_t>::~shared_ptr (this=<optimized out>)
at /home/runner/.cache/bazel/_bazel_runner/9f4ed60bba64c867c2242caf607221b5/external/cc_linux_toolchain/bin/../include/c++/v1/__memory/shared_ptr.h:703
#3 Logger::Logger (this=0x7f1d55ff7ee8) at c/tracers/shared/semmle_utils.cpp:235
#4 0x00007f5ebe8a7d6b in request_file (path=path@entry=0x7f1d55ff80d0 "/home/runner/.dotnet/TelemetryStorageService/20230606052549_25cdd4595fba42aba356228c2a6492eb.trn") at c/tracers/posix/libtrace.cpp:1302
#5 0x00007f5ebe8a82a4 in __lxstat64 (x=1, path=0x7f1d55ff80d0 "/home/runner/.dotnet/TelemetryStorageService/20230606052549_25cdd4595fba42aba356228c2a6492eb.trn", st=0x7f1d55ff7f80)
at c/tracers/posix/libtrace.cpp:1452
#6 0x00007f5eb6c1b620 in SystemNative_LStat () from /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.5/libSystem.Native.so
#7 0x00007f5e3ece735c in ?? ()
#8 0x000000000001b8d9 in ?? ()
#9 0x00007f5ebe18c2d8 in ?? () from /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.5/libcoreclr.so
#10 0x00007f1d55ff8c10 in ?? ()
#11 0x0000000000000000 in ?? ()
(gdb)
Description of the issue In the last few days I've started getting intermittent (say 10%) SIGSEGV crashes during
dotnet restore
anddotnet build
when running under CodeQL via GitHub Actions Runner.I've managed to capture a core dump and ran gdb backtrace on the offending thread from a GitHub Action Runner.
I notice in the stack trace context line 3 it mentions
Logger::Logger
insemmle_utils.cpp
just before enteringbazel_runner
.I don't have a separate test case, but I can re-run the build and every now and then it will trigger with a failure; without CodeQL there is no issue.
GitHub Runner Image:
CodeQL: