microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.54k stars 1.57k forks source link

Format on save with clang-format takes too long #6809

Closed xolom closed 3 years ago

xolom commented 3 years ago

Describe the bug

Sometimes format on save with clang-format takes really long. I need to cancel the task to save the file. What is the cause for that, how can i debug that further? I see this popup for like forever Screenshot 2021-01-19 at 10 09 26

sean-mcmanus commented 3 years ago

When this occurs can you check which process is using CPU? If it's cpptools, then the formatting might be blocked on another operation (or possibly processing the formatting result), in which case, if you set C_Cpp.loggingLevel to "Debug" and check the formatting-related logging that can help determine where it's getting stuck (or attaching a debugger and getting a call stack: https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv). If it's clang-format, then it would be a clang-format bug.

xolom commented 3 years ago

Unfortunately i can't attach to the cpptool process. Running on mac and lldb gives me following error:

❯ sudo lldb -p 72381
(lldb) process attach --pid 72381
error: attach failed: attach failed (Not allowed to attach to process.  Look in the console messages (Console.app), near the debugserver entries when the attached failed.  The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)

Everything i can say right now is that the extension stucks completely somehow. The log output doesn't print anything anymore and this little message where it says Updating IntelliSense... won't go away. image

Colengms commented 3 years ago

Hi @xolom . When this happens, can you check whether or not clang-format is still executing (based on the Activity Monitor) ? Also, I noticed that you repro'ed this with 1.1.3. Could you try upgrading to 1.2.0-insiders2 ? We recently upgraded the bundled version of clang-format to 11.x.

xolom commented 3 years ago

Hi @xolom . When this happens, can you check whether or not clang-format is still executing (based on the Activity Monitor) ? Also, I noticed that you repro'ed this with 1.1.3. Could you try upgrading to 1.2.0-insiders2 ? We recently upgraded the bundled version of clang-format to 11.x.

Hi.

I was already @ 1.2.0-insiders2, when i made the post above. I just checked if clang-format is executed at all and it seems like it's not.

❯ ps -ax | grep clang-format
 4470 ttys000    0:00.00 grep --color clang-format

On the other hand there are many running cpptools processes:

❯ ps -ax | grep cpptools
 3876 ??         0:16.33 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 98674 {D1ADD6A9-6917-484C-A2A3-5934EFE2C1FC}
 4068 ??         0:17.72 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 98674 {BA1E20A6-7AFC-46D2-9B4A-31A4ADDF0A3B}
34106 ??         2:34.51 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools
35050 ??         3:53.48 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 34106 {05C81682-4426-4663-B3BC-487DAB1E8DAA}
35548 ??         0:36.44 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 34106 {CDF5E910-5117-447D-BFBA-C46FD774F803}
42871 ??         3:49.08 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools
43088 ??         3:44.94 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 42871 {F2181B3C-89A9-4BD9-B26F-C12143A0106A}
43093 ??         1:04.20 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 42871 {5C1E7AF8-B2C8-4629-9EE8-B682226105BD}
52121 ??         3:01.85 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools
52445 ??         3:43.38 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 52121 {B2D7787E-7396-4262-82DA-DED399FFA01C}
53415 ??         1:13.78 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 52121 {5C360CEC-FDD1-487C-ACD0-4737A150942A}
53742 ??         1:30.25 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 52121 {95655A9A-1F92-43E6-872D-95AFF42165DA}
53855 ??         1:30.17 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 52121 {39D44902-D12E-4A89-823C-DFC0A9606B20}
55101 ??         0:27.71 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools
55469 ??         1:09.67 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 55101 {C98B2C4E-7F4A-4AC3-88BC-B6C269C2BD1D}
72381 ??         4:24.26 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools
73757 ??         1:11.39 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 72381 {36271D50-EB4D-4BB7-B538-96BF1D1038ED}
74113 ??         0:08.92 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 72381 {5222506C-49DF-4FCF-B008-34A5F4A91528}
74555 ??         0:30.64 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 72381 {E327868E-68F6-4B29-A64F-6E4448A0EC63}
74829 ??         0:15.68 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 72381 {4B625ED8-0758-43DF-BF86-1BDEF98A4000}
75083 ??         0:16.99 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools-srv 72381 {BB461531-82A6-499D-807C-3F327FD0F7BC}
98674 ??        10:30.70 /Users/.../.vscode/extensions/ms-vscode.cpptools-1.2.0-insiders2/bin/cpptools
xolom commented 3 years ago

What i also noticed is following message in the log: Shutting down IntelliSense server: /some/path/foo.cpp. Memory usage is 4386 MB and has exceeded the 4096 MB limit.

Today i mostly worked mostly only in one .cpp file. The IntelliSense parsing flame icon came up like every few seconds and my MacBook also needs to "breathe". I don't know, but it feels like the parsing is overwhelmed in some way and I'm pretty sure that this blocks the execution of clang-format.

I already tried to speedup the parsing as much as possible by only include the necessary folders, setting limitSymbolsToIncludedHeaders to true and exclude system includes (we're cross compiling for a microcontroller). Unfortunately the debug log doesn't help me in this case.

Colengms commented 3 years ago

Hi @xolom . Is the code involved rather complex? With debug logging enabled with "C_Cpp.loggingLevel": "Debug", an Update IntelliSense time (sec): x.xx message should occasionally be output to the C/C++ output channel when working with the file, as IntelliSense passes complete. The duration may vary a bit. Does it roughly match the delay in your scenario?

I suspect the cause of the issue is an operation prior to formatting that is trying to synchronize with the results of an IntelliSense pass. We have a known issue in which certain combinations of operations might result in a delay for this reason. We have some ongoing work that should lead to addressing the issue.

Can you identify the combination of operations prior to formatting that lead to the delay? It's likely due to making an edit, hovering, then closing the file before the hover operation is complete). Depending on your specific repro, there may be something we can do to address it sooner.

xolom commented 3 years ago

Hi @Colengms. To the code complexity: There is one part that is generated and has 480,496 loc across 28 files and the actual code has 52,881 loc across 449 files. The path to the generated code is set without ** in c_cpp_properties.json, because we're using precompiled headers and we need to have them available globally. Means that we always parse all generated files.

From what I have seen in the log these are the values coming up over the day: ``` Update IntelliSense time (sec): 0.282 Update IntelliSense time (sec): 0.271 Update IntelliSense time (sec): 0.281 Update IntelliSense time (sec): 0.285 Update IntelliSense time (sec): 0.277 Update IntelliSense time (sec): 0.283 Update IntelliSense time (sec): 0.289 Update IntelliSense time (sec): 6.022 Update IntelliSense time (sec): 0.274 Update IntelliSense time (sec): 0.274 Update IntelliSense time (sec): 0.27 Update IntelliSense time (sec): 0.278 Update IntelliSense time (sec): 0.273 Update IntelliSense time (sec): 0.477 Update IntelliSense time (sec): 0.279 Update IntelliSense time (sec): 0.276 Update IntelliSense time (sec): 2.276 Update IntelliSense time (sec): 3.605 Update IntelliSense time (sec): 3.238 Update IntelliSense time (sec): 33.036 Update IntelliSense time (sec): 0.273 Update IntelliSense time (sec): 0.284 Update IntelliSense time (sec): 0.269 Update IntelliSense time (sec): 0.56 Update IntelliSense time (sec): 0.274 Update IntelliSense time (sec): 0.285 Update IntelliSense time (sec): 0.275 Update IntelliSense time (sec): 11.737 Update IntelliSense time (sec): 7.917 Update IntelliSense time (sec): 0.274 Update IntelliSense time (sec): 0.276 Update IntelliSense time (sec): 0.545 Update IntelliSense time (sec): 0.561 Update IntelliSense time (sec): 0.351 Update IntelliSense time (sec): 0.287 Update IntelliSense time (sec): 0.573 Update IntelliSense time (sec): 0.273 Update IntelliSense time (sec): 0.279 Update IntelliSense time (sec): 0.331 Update IntelliSense time (sec): 0.322 Update IntelliSense time (sec): 0.522 Update IntelliSense time (sec): 3.61 Update IntelliSense time (sec): 17.964 Update IntelliSense time (sec): 0.457 Update IntelliSense time (sec): 2.27 Update IntelliSense time (sec): 0.33 Update IntelliSense time (sec): 0.271 Update IntelliSense time (sec): 0.279 Update IntelliSense time (sec): 0.274 Update IntelliSense time (sec): 0.28 Update IntelliSense time (sec): 0.275 Update IntelliSense time (sec): 0.28 Update IntelliSense time (sec): 0.276 Update IntelliSense time (sec): 0.275 Update IntelliSense time (sec): 0.276 Update IntelliSense time (sec): 0.563 Update IntelliSense time (sec): 0.271 Update IntelliSense time (sec): 3.981 Update IntelliSense time (sec): 1.02 Update IntelliSense time (sec): 2.2 Update IntelliSense time (sec): 6.913 Update IntelliSense time (sec): 0.27 Update IntelliSense time (sec): 0.271 Update IntelliSense time (sec): 0.539 Update IntelliSense time (sec): 0.275 Update IntelliSense time (sec): 0.27 Update IntelliSense time (sec): 0.394 Update IntelliSense time (sec): 0.278 Update IntelliSense time (sec): 0.818 Update IntelliSense time (sec): 1.276 Update IntelliSense time (sec): 0.271 Update IntelliSense time (sec): 0.681 Update IntelliSense time (sec): 20.329 Update IntelliSense time (sec): 0.537 Update IntelliSense time (sec): 0.275 Update IntelliSense time (sec): 0.272 Update IntelliSense time (sec): 12.57 Update IntelliSense time (sec): 0.275 Update IntelliSense time (sec): 0.548 Update IntelliSense time (sec): 0.837 Update IntelliSense time (sec): 0.272 Update IntelliSense time (sec): 2.708 Update IntelliSense time (sec): 8.534 Update IntelliSense time (sec): 0.28 Update IntelliSense time (sec): 0.54 Update IntelliSense time (sec): 0.279 Update IntelliSense time (sec): 0.278 Update IntelliSense time (sec): 0.419 Update IntelliSense time (sec): 0.302 ```

I'll try to find out, if there is any specific action happening before i save the file and clang-format (or cpptools) gets stuck

xolom commented 3 years ago

I'm pretty sure that cpptools or cpptools-srv (don't really know which does what) gets stuck. That's why i had so many processes running like shown in https://github.com/microsoft/vscode-cpptools/issues/6809#issuecomment-766799269 I always need to kill the processes and restart vscode. After that everything starts to work again.

Unfortunately i can't attach lldb on my MacOS machine to give you the call stack (see: https://github.com/microsoft/vscode-cpptools/issues/6809#issuecomment-765295490)

Dakror commented 3 years ago

I'm experiencing the same issue on Windows and the issue disappears when downgrading the plugin to i think 0.29, but then again much of the functionality gets lost too.

xolom commented 3 years ago

Hi @Dakror

Are you able to attach a debugger to cpptools when this happens and check the call-stack (see: this link) ?

Dakror commented 3 years ago

I'll try once I'm able to reproduce the issue again. I've kept the format on save feature disabled for a few days due to this bug and now after re-enabling it im having trouble recreating it.

Dakror commented 3 years ago

Call Stack for the main thread of cpptools. The issue is i can't actually start attaching from the same VSCode instance, so i had to open up a second workspace to attach.

ntdll.dll!_NtReadFile@36() (Unknown Source:0) KernelBase.dll!_ReadFile@20() (Unknown Source:0) kernel32.dll!_ReadFileImplementation@20() (Unknown Source:0) cpptools.exe!read_nolock() (Unknown Source:0) cpptools.exe!read() (Unknown Source:0) cpptools.exe!common_refill_and_read_nolock() (Unknown Source:0) cpptools.exe!fgetc_nolock() (Unknown Source:0) cpptools.exe!_fgetc() (Unknown Source:0) cpptools.exe!std::_Fgetc(char &,struct _iobuf *) (Unknown Source:0) cpptools.exe!std::basic_filebuf<char,struct std::char_traits >::uflow(void) (Unknown Source:0) cpptools.exe!std::basic_filebuf<char,struct std::chartraits >::underflow(void) (Unknown Source:0) cpptools.exe!crtInitializeSRWLock() (Unknown Source:0)

Dakror commented 3 years ago

the cpptools-srv are all here:

ntdll.dll!_NtWaitForSingleObject@12() (Unknown Source:0) KernelBase.dll!_WaitForSingleObjectEx@12() (Unknown Source:0) KernelBase.dll!_WaitForSingleObject@8() (Unknown Source:0) KernelBase.dll!_GetOverlappedResult@16() (Unknown Source:0) cpptools-srv.exe!read_pipe_sync(void ,unsigned long,void ) (Unknown Source:0) cpptools-srv.exe!comm_pipe_win32::read(class std::basic_string<char,struct std::char_traits,class std::allocator > &) (Unknown Source:0) cpptools-srv.exe!comm_server::wait_for_requests(void) (Unknown Source:0) cpptools-srv.exe!_main() (Unknown Source:0) cpptools-srv.exe!scrt_common_mainseh() (Unknown Source:0) kernel32.dll!@BaseThreadInitThunk@12() (Unknown Source:0) ntdll.dll!RtlUserThreadStart@8() (Unknown Source:0) ntdll.dll!__RtlUserThreadStart@8() (Unknown Source:0)

bobbrow commented 3 years ago

@Dakror can you share the stacks from all threads?

Dakror commented 3 years ago

@Dakror can you share the stacks from all threads?

From what i could see, all other threads appeared as worker threads all waiting on some lock.

bobbrow commented 3 years ago

I would expect there to be one thread waiting for clang-format. It would be in the cpptools process, not cpptools-srv.

Dakror commented 3 years ago

one thread looks like this:

ntdll.dll!_NtWaitForSingleObject@12() (Unknown Source:0)
KernelBase.dll!_WaitForSingleObjectEx@12() (Unknown Source:0)
KernelBase.dll!_WaitForSingleObject@8() (Unknown Source:0)
KernelBase.dll!_GetOverlappedResult@16() (Unknown Source:0)
cpptools.exe!read_pipe_sync(void *,unsigned long,void *) (Unknown Source:0)
cpptools.exe!comm_pipe_win32::read(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &) (Unknown Source:0)
cpptools.exe!comm_server::wait_for_requests(void) (Unknown Source:0)
cpptools.exe!std::thread::_Invoke<class std::tuple<class <lambda_b50f426d9147729548ce44430f01adab> >,0>(void *) (Unknown Source:0)
cpptools.exe!thread_start<unsigned int (__stdcall*)(void *),1>() (Unknown Source:0)
kernel32.dll!@BaseThreadInitThunk@12() (Unknown Source:0)
ntdll.dll!___RtlUserThreadStart@8() (Unknown Source:0)
ntdll.dll!__RtlUserThreadStart@8() (Unknown Source:0)

another one like this:

cpptools.exe!std::_Cmp_chrange<char const *,char const *,struct std::_Cmp_cs<class std::regex_traits<char> > >(char const *,char const *,char const *,char const *,struct std::_Cmp_cs<class std::regex_traits<char> >) (Unknown Source:0)
cpptools.exe!std::_Compare<char const *,char const *,class std::regex_traits<char> >(char const *,char const *,char const *,char const *,class std::regex_traits<char> const &,enum std::regex_constants::syntax_option_type) (Unknown Source:0)
cpptools.exe!std::_Matcher<char const *,char,class std::regex_traits<char>,char const *>::_Skip(char const *,char const *,class std::_Node_base *) (Unknown Source:0)
cpptools.exe!std::_Matcher<char const *,char,class std::regex_traits<char>,char const *>::_Skip(char const *,char const *,class std::_Node_base *) (Unknown Source:0)
cpptools.exe!std::_Matcher<char const *,char,class std::regex_traits<char>,char const *>::_Skip(char const *,char const *,class std::_Node_base *) (Unknown Source:0)
cpptools.exe!std::_Regex_search2<char const *,class std::allocator<class std::sub_match<char const *> >,char,class std::regex_traits<char>,char const *>(char const *,char const *,class std::match_results<char const *,class std::allocator<class std::sub_match<char const *> > > *,class std::basic_regex<char,class std::regex_traits<char> > const &,enum std::regex_constants::match_flag_type,char const *) (Unknown Source:0)
cpptools.exe!std::regex_iterator<char const *,char,class std::regex_traits<char> >::operator++(void) (Unknown Source:0)
cpptools.exe!msvc::split_string<char,class std::back_insert_iterator<class std::vector<struct msvc::sized_string<char>,class std::allocator<struct msvc::sized_string<char> > > > >(char const *,char const *,class std::basic_regex<char,class std::regex_traits<char> > const &,class std::back_insert_iterator<class std::vector<struct msvc::sized_string<char>,class std::allocator<struct msvc::sized_string<char> > > >,bool) (Unknown Source:0)
cpptools.exe!msvc::split_string<char,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(class std::basic_string_view<char,struct std::char_traits<char> >,class std::basic_regex<char,class std::regex_traits<char> > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &,bool) (Unknown Source:0)
cpptools.exe!msvc::split_string<char,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_regex<char,class std::regex_traits<char> > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &,bool) (Unknown Source:0)
cpptools.exe!parse_defines(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &) (Unknown Source:0)
cpptools.exe!gcc_info::get_system_defaults(struct gcc_info::compiler_defaults const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool,struct compilation_args &) (Unknown Source:0)
cpptools.exe!gcc_info::gcc_info(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class vscode::ext::optional<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool,class vscode::ext::optional<enum IntelliSenseMode> const &) (Unknown Source:0)
cpptools.exe!std::_Construct_in_place<class gcc_info,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class vscode::ext::optional<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool &,class vscode::ext::optional<enum IntelliSenseMode> const &>(class gcc_info &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::al (Unknown Source:0)
cpptools.exe!std::_Ref_count_obj2<class gcc_info>::_Ref_count_obj2<class gcc_info><class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class vscode::ext::optional<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool &,class vscode::ext::optional<enum IntelliSenseMode> const &>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>, (Unknown Source:0)
cpptools.exe!std::make_shared<class gcc_info,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class vscode::ext::optional<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool &,class vscode::ext::optional<enum IntelliSenseMode> const &>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,c (Unknown Source:0)
cpptools.exe!compiler_info::find_or_create(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class vscode::ext::optional<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool,class vscode::ext::optional<enum IntelliSenseMode> const &,bool &) (Unknown Source:0)
cpptools.exe!compiler_info::get(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class vscode::ext::optional<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > const &,bool,class vscode::ext::optional<class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class vscode::ext::optional<enum IntelliSenseMode> const &,bool,class vscode::ext::optional<class std (Unknown Source:0)
cpptools.exe!cpp_properties::add_custom_config(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct vscode::SourceFileConfiguration const &) (Unknown Source:0)
cpptools.exe!vscode::message_handler::cpptools_didChangeCustomConfigurations(struct vscode::CustomConfigurationParams) (Unknown Source:0)
cpptools.exe!vscode::message_handler::dispatch(class vscode::vscode_client_message &&,struct vscode::vscode_server_message &,struct vscode::message_handler::msg_proc_thread_token) (Unknown Source:0)
cpptools.exe!vscode::message_handler::handle_message(class vscode::vscode_client_message &&,struct vscode::message_handler::msg_proc_thread_token) (Unknown Source:0)
cpptools.exe!<lambda>(void)() (Unknown Source:0)
cpptools.exe!std::thread::_Invoke<class std::tuple<class <lambda_d26d5df9c9b9a9741891376c056f615c> >,0>(void *) (Unknown Source:0)
cpptools.exe!thread_start<unsigned int (__stdcall*)(void *),1>() (Unknown Source:0)
kernel32.dll!@BaseThreadInitThunk@12() (Unknown Source:0)
ntdll.dll!___RtlUserThreadStart@8() (Unknown Source:0)
ntdll.dll!__RtlUserThreadStart@8() (Unknown Source:0)

the others are all the same with:

ntdll.dll!_NtWaitForKeyedEvent@16() (Unknown Source:0)
ntdll.dll!_RtlSleepConditionVariableSRW@16() (Unknown Source:0)
kernel32.dll!_SleepConditionVariableSRW@16() (Unknown Source:0)
cpptools.exe!___crtSleepConditionVariableSRW() (Unknown Source:0)
cpptools.exe!Concurrency::details::stl_condition_variable_win7::wait_for(class Concurrency::details::stl_critical_section_interface *,unsigned int) (Unknown Source:0)
cpptools.exe!do_wait() (Unknown Source:0)
cpptools.exe!std::condition_variable::wait_until(class std::unique_lock<class std::mutex> &,struct xtime const *) (Unknown Source:0)
cpptools.exe!std::condition_variable::_Wait_until1<struct std::chrono::steady_clock,class std::chrono::duration<__int64,struct std::ratio<1,1000000000> >,class <lambda_5b3201cb33e96a73edaa7af5dadd49bd> >(class std::unique_lock<class std::mutex> &,class std::chrono::time_point<struct std::chrono::steady_clock,class std::chrono::duration<__int64,struct std::ratio<1,1000000000> > > const &,class <lambda_5b3201cb33e96a73edaa7af5dadd49bd> &) (Unknown Source:0)
cpptools.exe!std::condition_variable::wait_for<__int64,struct std::ratio<1,1000>,class <lambda_5b3201cb33e96a73edaa7af5dadd49bd> >(class std::unique_lock<class std::mutex> &,class std::chrono::duration<__int64,struct std::ratio<1,1000> > const &,class <lambda_5b3201cb33e96a73edaa7af5dadd49bd>) (Unknown Source:0)
cpptools.exe!msvc::bitset_event_t::wait_for_any_set<__int64,struct std::ratio<1,1000> >(class std::chrono::duration<__int64,struct std::ratio<1,1000> > const &,unsigned int) (Unknown Source:0)
cpptools.exe!<lambda>(void)() (Unknown Source:0)
cpptools.exe!std::thread::_Invoke<class std::tuple<class <lambda_6f614bd7e9c91969769d2d5046dccb28> >,0>(void *) (Unknown Source:0)
cpptools.exe!thread_start<unsigned int (__stdcall*)(void *),1>() (Unknown Source:0)
kernel32.dll!@BaseThreadInitThunk@12() (Unknown Source:0)
ntdll.dll!___RtlUserThreadStart@8() (Unknown Source:0)
ntdll.dll!__RtlUserThreadStart@8() (Unknown Source:0)
sean-mcmanus commented 3 years ago

I don't see any call stack that shows any work being stuck. The only one with work shows it's parsing defines from querying the compiler -- if you let the program run, does it show a different call stack for that thread?

Dakror commented 3 years ago

stepping up seemed to fail at the level of the regex iterator operator++. the program seems to be stuck there and repeat everything below it infinitely

sean-mcmanus commented 3 years ago

Oh, that is odd -- the regex is just being used to split the input into multiple lines. Not sure yet what could cause that to fail...

Dakror commented 3 years ago

Actually correction, the frame above it is the one running forever, the msvc::split_string

sean-mcmanus commented 3 years ago

Yeah, split_string uses the regex iterator in a loop. What compiler and version are you using?

What do you get when you use <compilerName> -Wp,-v -E -dD -x c++ nul? Some unexpected output might be causing the issue, such as non-English characters.

Dakror commented 3 years ago
clang -cc1 version 11.0.0 based upon LLVM 11.0.0 default target x86_64-pc-windows-msvc
ignoring nonexistent directory "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\atlmfc\include"
#include "..." search starts here:
#include <...> search starts here:
 C:\Program Files\LLVM\lib\clang\11.0.0\include
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include
 C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt
 C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared
 C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um
 C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt
End of search list.
# 1 "nul"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
#define __llvm__ 1
#define __clang__ 1
#define __clang_major__ 11
#define __clang_minor__ 0
#define __clang_patchlevel__ 0
#define __clang_version__ "11.0.0 "
#define __ATOMIC_RELAXED 0
#define __ATOMIC_CONSUME 1
#define __ATOMIC_ACQUIRE 2
#define __ATOMIC_RELEASE 3
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_SEQ_CST 5
#define __OPENCL_MEMORY_SCOPE_WORK_ITEM 0
#define __OPENCL_MEMORY_SCOPE_WORK_GROUP 1
#define __OPENCL_MEMORY_SCOPE_DEVICE 2
#define __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES 3
#define __OPENCL_MEMORY_SCOPE_SUB_GROUP 4
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __VERSION__ "Clang 11.0.0"
#define __OBJC_BOOL_IS_BOOL 0
#define __cpp_rtti 199711L
#define __cpp_exceptions 199711L
#define __cpp_unicode_characters 200704L
#define __cpp_raw_strings 200710L
#define __cpp_unicode_literals 200710L
#define __cpp_user_defined_literals 200809L
#define __cpp_lambdas 200907L
#define __cpp_constexpr 201304L
#define __cpp_constexpr_in_decltype 201711L
#define __cpp_range_based_for 200907
#define __cpp_static_assert 200410
#define __cpp_decltype 200707L
#define __cpp_attributes 200809L
#define __cpp_rvalue_references 200610L
#define __cpp_variadic_templates 200704L
#define __cpp_initializer_lists 200806L
#define __cpp_delegating_constructors 200604L
#define __cpp_nsdmi 200809L
#define __cpp_inheriting_constructors 201511L
#define __cpp_ref_qualifiers 200710L
#define __cpp_alias_templates 200704L
#define __cpp_threadsafe_static_init 200806L
#define __cpp_binary_literals 201304L
#define __cpp_digit_separators 201309L
#define __cpp_init_captures 201304L
#define __cpp_generic_lambdas 201304L
#define __cpp_decltype_auto 201304L
#define __cpp_return_type_deduction 201304L
#define __cpp_aggregate_nsdmi 201304L
#define __cpp_variable_templates 201304L
#define __cpp_impl_destroying_delete 201806L
#define __CONSTANT_CFSTRINGS__ 1
#define __DEPRECATED 1
#define _WCHAR_T_DEFINED 1
#define _NATIVE_WCHAR_T_DEFINED 1
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __ORDER_BIG_ENDIAN__ 4321
#define __ORDER_PDP_ENDIAN__ 3412
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __LITTLE_ENDIAN__ 1
#define __CHAR_BIT__ 8
#define __SCHAR_MAX__ 127
#define __SHRT_MAX__ 32767
#define __INT_MAX__ 2147483647
#define __LONG_MAX__ 2147483647L
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __WCHAR_MAX__ 65535
#define __WINT_MAX__ 65535
#define __INTMAX_MAX__ 9223372036854775807LL
#define __SIZE_MAX__ 18446744073709551615ULL
#define __UINTMAX_MAX__ 18446744073709551615ULL
#define __PTRDIFF_MAX__ 9223372036854775807LL
#define __INTPTR_MAX__ 9223372036854775807LL
#define __UINTPTR_MAX__ 18446744073709551615ULL
#define __SIZEOF_DOUBLE__ 8
#define __SIZEOF_FLOAT__ 4
#define __SIZEOF_INT__ 4
#define __SIZEOF_LONG__ 4
#define __SIZEOF_LONG_DOUBLE__ 8
#define __SIZEOF_LONG_LONG__ 8
#define __SIZEOF_POINTER__ 8
#define __SIZEOF_SHORT__ 2
#define __SIZEOF_PTRDIFF_T__ 8
#define __SIZEOF_SIZE_T__ 8
#define __SIZEOF_WCHAR_T__ 2
#define __SIZEOF_WINT_T__ 2
#define __SIZEOF_INT128__ 16
#define __INTMAX_TYPE__ long long int
#define __INTMAX_FMTd__ "lld"
#define __INTMAX_FMTi__ "lli"
#define __INTMAX_C_SUFFIX__ LL
#define __UINTMAX_TYPE__ long long unsigned int
#define __UINTMAX_FMTo__ "llo"
#define __UINTMAX_FMTu__ "llu"
#define __UINTMAX_FMTx__ "llx"
#define __UINTMAX_FMTX__ "llX"
#define __UINTMAX_C_SUFFIX__ ULL
#define __INTMAX_WIDTH__ 64
#define __PTRDIFF_TYPE__ long long int
#define __PTRDIFF_FMTd__ "lld"
#define __PTRDIFF_FMTi__ "lli"
#define __PTRDIFF_WIDTH__ 64
#define __INTPTR_TYPE__ long long int
#define __INTPTR_FMTd__ "lld"
#define __INTPTR_FMTi__ "lli"
#define __INTPTR_WIDTH__ 64
#define __SIZE_TYPE__ long long unsigned int
#define __SIZE_FMTo__ "llo"
#define __SIZE_FMTu__ "llu"
#define __SIZE_FMTx__ "llx"
#define __SIZE_FMTX__ "llX"
#define __SIZE_WIDTH__ 64
#define __WCHAR_TYPE__ unsigned short
#define __WCHAR_WIDTH__ 16
#define __WINT_TYPE__ unsigned short
#define __WINT_WIDTH__ 16
#define __SIG_ATOMIC_WIDTH__ 32
#define __SIG_ATOMIC_MAX__ 2147483647
#define __CHAR16_TYPE__ unsigned short
#define __CHAR32_TYPE__ unsigned int
#define __UINTMAX_WIDTH__ 64
#define __UINTPTR_TYPE__ long long unsigned int
#define __UINTPTR_FMTo__ "llo"
#define __UINTPTR_FMTu__ "llu"
#define __UINTPTR_FMTx__ "llx"
#define __UINTPTR_FMTX__ "llX"
#define __UINTPTR_WIDTH__ 64
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __FLT_HAS_DENORM__ 1
#define __FLT_DIG__ 6
#define __FLT_DECIMAL_DIG__ 9
#define __FLT_EPSILON__ 1.19209290e-7F
#define __FLT_HAS_INFINITY__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MANT_DIG__ 24
#define __FLT_MAX_10_EXP__ 38
#define __FLT_MAX_EXP__ 128
#define __FLT_MAX__ 3.40282347e+38F
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT_MIN_EXP__ (-125)
#define __FLT_MIN__ 1.17549435e-38F
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __DBL_HAS_DENORM__ 1
#define __DBL_DIG__ 15
#define __DBL_DECIMAL_DIG__ 17
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define __DBL_HAS_INFINITY__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __DBL_MANT_DIG__ 53
#define __DBL_MAX_10_EXP__ 308
#define __DBL_MAX_EXP__ 1024
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_MIN_10_EXP__ (-307)
#define __DBL_MIN_EXP__ (-1021)
#define __DBL_MIN__ 2.2250738585072014e-308
#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
#define __LDBL_HAS_DENORM__ 1
#define __LDBL_DIG__ 15
#define __LDBL_DECIMAL_DIG__ 17
#define __LDBL_EPSILON__ 2.2204460492503131e-16L
#define __LDBL_HAS_INFINITY__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __LDBL_MANT_DIG__ 53
#define __LDBL_MAX_10_EXP__ 308
#define __LDBL_MAX_EXP__ 1024
#define __LDBL_MAX__ 1.7976931348623157e+308L
#define __LDBL_MIN_10_EXP__ (-307)
#define __LDBL_MIN_EXP__ (-1021)
#define __LDBL_MIN__ 2.2250738585072014e-308L
#define __POINTER_WIDTH__ 64
#define __BIGGEST_ALIGNMENT__ 16
#define __WCHAR_UNSIGNED__ 1
#define __WINT_UNSIGNED__ 1
#define __INT8_TYPE__ signed char
#define __INT8_FMTd__ "hhd"
#define __INT8_FMTi__ "hhi"
#define __INT8_C_SUFFIX__
#define __INT16_TYPE__ short
#define __INT16_FMTd__ "hd"
#define __INT16_FMTi__ "hi"
#define __INT16_C_SUFFIX__
#define __INT32_TYPE__ int
#define __INT32_FMTd__ "d"
#define __INT32_FMTi__ "i"
#define __INT32_C_SUFFIX__
#define __INT64_TYPE__ long long int
#define __INT64_FMTd__ "lld"
#define __INT64_FMTi__ "lli"
#define __INT64_C_SUFFIX__ LL
#define __UINT8_TYPE__ unsigned char
#define __UINT8_FMTo__ "hho"
#define __UINT8_FMTu__ "hhu"
#define __UINT8_FMTx__ "hhx"
#define __UINT8_FMTX__ "hhX"
#define __UINT8_C_SUFFIX__
#define __UINT8_MAX__ 255
#define __INT8_MAX__ 127
#define __UINT16_TYPE__ unsigned short
#define __UINT16_FMTo__ "ho"
#define __UINT16_FMTu__ "hu"
#define __UINT16_FMTx__ "hx"
#define __UINT16_FMTX__ "hX"
#define __UINT16_C_SUFFIX__
#define __UINT16_MAX__ 65535
#define __INT16_MAX__ 32767
#define __UINT32_TYPE__ unsigned int
#define __UINT32_FMTo__ "o"
#define __UINT32_FMTu__ "u"
#define __UINT32_FMTx__ "x"
#define __UINT32_FMTX__ "X"
#define __UINT32_C_SUFFIX__ U
#define __UINT32_MAX__ 4294967295U
#define __INT32_MAX__ 2147483647
#define __UINT64_TYPE__ long long unsigned int
#define __UINT64_FMTo__ "llo"
#define __UINT64_FMTu__ "llu"
#define __UINT64_FMTx__ "llx"
#define __UINT64_FMTX__ "llX"
#define __UINT64_C_SUFFIX__ ULL
#define __UINT64_MAX__ 18446744073709551615ULL
#define __INT64_MAX__ 9223372036854775807LL
#define __INT_LEAST8_TYPE__ signed char
#define __INT_LEAST8_MAX__ 127
#define __INT_LEAST8_FMTd__ "hhd"
#define __INT_LEAST8_FMTi__ "hhi"
#define __UINT_LEAST8_TYPE__ unsigned char
#define __UINT_LEAST8_MAX__ 255
#define __UINT_LEAST8_FMTo__ "hho"
#define __UINT_LEAST8_FMTu__ "hhu"
#define __UINT_LEAST8_FMTx__ "hhx"
#define __UINT_LEAST8_FMTX__ "hhX"
#define __INT_LEAST16_TYPE__ short
#define __INT_LEAST16_MAX__ 32767
#define __INT_LEAST16_FMTd__ "hd"
#define __INT_LEAST16_FMTi__ "hi"
#define __UINT_LEAST16_TYPE__ unsigned short
#define __UINT_LEAST16_MAX__ 65535
#define __UINT_LEAST16_FMTo__ "ho"
#define __UINT_LEAST16_FMTu__ "hu"
#define __UINT_LEAST16_FMTx__ "hx"
#define __UINT_LEAST16_FMTX__ "hX"
#define __INT_LEAST32_TYPE__ int
#define __INT_LEAST32_MAX__ 2147483647
#define __INT_LEAST32_FMTd__ "d"
#define __INT_LEAST32_FMTi__ "i"
#define __UINT_LEAST32_TYPE__ unsigned int
#define __UINT_LEAST32_MAX__ 4294967295U
#define __UINT_LEAST32_FMTo__ "o"
#define __UINT_LEAST32_FMTu__ "u"
#define __UINT_LEAST32_FMTx__ "x"
#define __UINT_LEAST32_FMTX__ "X"
#define __INT_LEAST64_TYPE__ long long int
#define __INT_LEAST64_MAX__ 9223372036854775807LL
#define __INT_LEAST64_FMTd__ "lld"
#define __INT_LEAST64_FMTi__ "lli"
#define __UINT_LEAST64_TYPE__ long long unsigned int
#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
#define __UINT_LEAST64_FMTo__ "llo"
#define __UINT_LEAST64_FMTu__ "llu"
#define __UINT_LEAST64_FMTx__ "llx"
#define __UINT_LEAST64_FMTX__ "llX"
#define __INT_FAST8_TYPE__ signed char
#define __INT_FAST8_MAX__ 127
#define __INT_FAST8_FMTd__ "hhd"
#define __INT_FAST8_FMTi__ "hhi"
#define __UINT_FAST8_TYPE__ unsigned char
#define __UINT_FAST8_MAX__ 255
#define __UINT_FAST8_FMTo__ "hho"
#define __UINT_FAST8_FMTu__ "hhu"
#define __UINT_FAST8_FMTx__ "hhx"
#define __UINT_FAST8_FMTX__ "hhX"
#define __INT_FAST16_TYPE__ short
#define __INT_FAST16_MAX__ 32767
#define __INT_FAST16_FMTd__ "hd"
#define __INT_FAST16_FMTi__ "hi"
#define __UINT_FAST16_TYPE__ unsigned short
#define __UINT_FAST16_MAX__ 65535
#define __UINT_FAST16_FMTo__ "ho"
#define __UINT_FAST16_FMTu__ "hu"
#define __UINT_FAST16_FMTx__ "hx"
#define __UINT_FAST16_FMTX__ "hX"
#define __INT_FAST32_TYPE__ int
#define __INT_FAST32_MAX__ 2147483647
#define __INT_FAST32_FMTd__ "d"
#define __INT_FAST32_FMTi__ "i"
#define __UINT_FAST32_TYPE__ unsigned int
#define __UINT_FAST32_MAX__ 4294967295U
#define __UINT_FAST32_FMTo__ "o"
#define __UINT_FAST32_FMTu__ "u"
#define __UINT_FAST32_FMTx__ "x"
#define __UINT_FAST32_FMTX__ "X"
#define __INT_FAST64_TYPE__ long long int
#define __INT_FAST64_MAX__ 9223372036854775807LL
#define __INT_FAST64_FMTd__ "lld"
#define __INT_FAST64_FMTi__ "lli"
#define __UINT_FAST64_TYPE__ long long unsigned int
#define __UINT_FAST64_MAX__ 18446744073709551615ULL
#define __UINT_FAST64_FMTo__ "llo"
#define __UINT_FAST64_FMTu__ "llu"
#define __UINT_FAST64_FMTx__ "llx"
#define __UINT_FAST64_FMTX__ "llX"
#define __USER_LABEL_PREFIX__
#define __FINITE_MATH_ONLY__ 0
#define __CLANG_ATOMIC_BOOL_LOCK_FREE 2
#define __CLANG_ATOMIC_CHAR_LOCK_FREE 2
#define __CLANG_ATOMIC_CHAR16_T_LOCK_FREE 2
#define __CLANG_ATOMIC_CHAR32_T_LOCK_FREE 2
#define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __CLANG_ATOMIC_SHORT_LOCK_FREE 2
#define __CLANG_ATOMIC_INT_LOCK_FREE 2
#define __CLANG_ATOMIC_LONG_LOCK_FREE 2
#define __CLANG_ATOMIC_LLONG_LOCK_FREE 2
#define __CLANG_ATOMIC_POINTER_LOCK_FREE 2
#define __NO_INLINE__ 1
#define __PIC__ 2
#define __pic__ 2
#define __FLT_EVAL_METHOD__ 0
#define __FLT_RADIX__ 2
#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__
#define __GCC_ASM_FLAG_OUTPUTS__ 1
#define __code_model_small__ 1
#define __amd64__ 1
#define __amd64 1
#define __x86_64 1
#define __x86_64__ 1
#define __SEG_GS 1
#define __SEG_FS 1
#define __seg_gs __attribute__((address_space(256)))
#define __seg_fs __attribute__((address_space(257)))
#define __k8 1
#define __k8__ 1
#define __tune_k8__ 1
#define __REGISTER_PREFIX__
#define __NO_MATH_INLINES 1
#define __FXSR__ 1
#define __SSE2__ 1
#define __SSE2_MATH__ 1
#define __SSE__ 1
#define __SSE_MATH__ 1
#define __MMX__ 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
#define _WIN32 1
#define _WIN64 1
#define _CPPRTTI 1
#define _CPPUNWIND 1
#define __BOOL_DEFINED 1
#define _MSC_VER 1928
#define _MSC_FULL_VER 192829336
#define _MSC_BUILD 1
#define _HAS_CHAR16_T_LANGUAGE_SUPPORT 1
#define _MSVC_LANG 201402L
#define _MSC_EXTENSIONS 1
#define _RVALUE_REFERENCES_V2_SUPPORTED 1
#define _RVALUE_REFERENCES_SUPPORTED 1
#define _NATIVE_NULLPTR_SUPPORTED 1
#define _INTEGRAL_MAX_BITS 64
#define _M_X64 100
#define _M_AMD64 100
#define __STDC_HOSTED__ 1
#define __cplusplus 201402L
#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16ULL
#define __STDC_UTF_16__ 1
#define __STDC_UTF_32__ 1

# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "nul" 2
xolom commented 3 years ago

I now finnally could manage to get lldb running with running csrutil enable --without debug on my MacBook!

Call stacks of cpptools: ``` (lldb) bt all * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP * frame #0: 0x00007fff202f370e libsystem_kernel.dylib`__read_nocancel + 10 frame #1: 0x00007fff20239f0f libsystem_c.dylib`_sread + 16 frame #2: 0x00007fff2023958a libsystem_c.dylib`__srefill1 + 24 frame #3: 0x00007fff202396ac libsystem_c.dylib`__srget + 14 frame #4: 0x00007fff20235567 libsystem_c.dylib`getc + 52 frame #5: 0x00007fff2029a3a9 libc++.1.dylib`std::__1::__stdinbuf::__getchar(bool) + 109 frame #6: 0x0000000103ffb096 cpptools`std::__1::basic_istream >& std::__1::getline, std::__1::allocator >(std::__1::basic_istream >&, std::__1::basic_string, std::__1::allocator >&, char) + 150 frame #7: 0x0000000103fbabab cpptools`vscode::message_handler::main_loop() + 1739 frame #8: 0x0000000103fb736e cpptools`main + 206 frame #9: 0x00007fff20341621 libdyld.dylib`start + 1 frame #10: 0x00007fff20341621 libdyld.dylib`start + 1 thread #2 frame #0: 0x00007fff202f67e2 libsystem_kernel.dylib`kevent + 10 frame #1: 0x000000010467634a cpptools`uv__io_poll + 874 frame #2: 0x000000010466f881 cpptools`uv_run + 465 frame #3: 0x00000001045e6e69 cpptools`msvc::channel_manager_t::thread_proc() + 121 frame #4: 0x00000001045e9b4e cpptools`void* std::__1::__thread_proxy >, void (msvc::channel_manager_t::*)(), msvc::channel_manager_t*> >(void*) + 62 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #3 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #4 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #5 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #6 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #7 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #8 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #9 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #10 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #11 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #12 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #13 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #14 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #15 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #16 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #17 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #18 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010405cc0b cpptools`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x000000010405e681 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #19 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dd83 libc++.1.dylib`std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock&, std::__1::chrono::time_point > >) + 93 frame #3: 0x000000010402b5ab cpptools`std::__1::cv_status std::__1::condition_variable::wait_until > >(std::__1::unique_lock&, std::__1::chrono::time_point > > const&) + 171 frame #4: 0x000000010405e5f7 cpptools`unsigned int msvc::bitset_event_t::wait_for_any_set >(std::__1::chrono::duration > const&, unsigned int) + 103 frame #5: 0x000000010405e4f2 cpptools`void* std::__1::__thread_proxy >, msvc::thread_pool::thread_pool()::$_0> >(void*) + 306 frame #6: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #7: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #20 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dd83 libc++.1.dylib`std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock&, std::__1::chrono::time_point > >) + 93 frame #3: 0x000000010402b5ab cpptools`std::__1::cv_status std::__1::condition_variable::wait_until > >(std::__1::unique_lock&, std::__1::chrono::time_point > > const&) + 171 frame #4: 0x000000010402ad76 cpptools`vscode::message_deque::try_pop_front(vscode::vscode_client_message&, std::__1::chrono::duration >) + 118 frame #5: 0x0000000104029cae cpptools`void* std::__1::__thread_proxy >, vscode::message_handler::main_loop()::$_3> >(void*) + 398 frame #6: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #7: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #21 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010402b742 cpptools`vscode::message_deque, std::__1::allocator >, false>::pop_impl(bool) + 82 frame #4: 0x000000010402b61d cpptools`void* std::__1::__thread_proxy >, vscode::message_handler::main_loop()::$_4> >(void*) + 77 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #22 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010402cff2 cpptools`vscode::message_deque::pop_impl(bool) + 82 frame #4: 0x000000010402ce6d cpptools`std::__1::__function::__func, void ()>::operator()() + 61 frame #5: 0x000000010402d5c3 cpptools`void* std::__1::__thread_proxy >, std::__1::function > >(void*) + 51 frame #6: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #7: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #23 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010402c3a2 cpptools`vscode::message_deque::pop_impl(bool) + 82 frame #4: 0x000000010402bace cpptools`std::__1::__function::__func, void ()>::operator()() + 110 frame #5: 0x000000010402d5c3 cpptools`void* std::__1::__thread_proxy >, std::__1::function > >(void*) + 51 frame #6: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #7: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #24 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010402d832 cpptools`vscode::message_deque::pop_impl(bool) + 98 frame #4: 0x000000010402d70d cpptools`std::__1::__function::__func, void ()>::operator()() + 61 frame #5: 0x000000010402d5c3 cpptools`void* std::__1::__thread_proxy >, std::__1::function > >(void*) + 51 frame #6: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #7: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #25 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010402d832 cpptools`vscode::message_deque::pop_impl(bool) + 98 frame #4: 0x000000010402da3d cpptools`std::__1::__function::__func, void ()>::operator()() + 61 frame #5: 0x000000010402d5c3 cpptools`void* std::__1::__thread_proxy >, std::__1::function > >(void*) + 51 frame #6: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #7: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #26 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010402e0f2 cpptools`vscode::message_deque::pop_impl(bool) + 98 frame #4: 0x000000010402dbf1 cpptools`std::__1::__function::__func, void ()>::operator()() + 97 frame #5: 0x000000010402d5c3 cpptools`void* std::__1::__thread_proxy >, std::__1::function > >(void*) + 51 frame #6: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #7: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #27 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010402d832 cpptools`vscode::message_deque::pop_impl(bool) + 98 frame #4: 0x000000010402e73c cpptools`std::__1::__function::__func, void ()>::operator()() + 76 frame #5: 0x000000010402d5c3 cpptools`void* std::__1::__thread_proxy >, std::__1::function > >(void*) + 51 frame #6: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #7: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #28 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010402e962 cpptools`vscode::message_deque::pop_impl(bool) + 82 frame #4: 0x000000010402e8bd cpptools`std::__1::__function::__func, void ()>::operator()() + 45 frame #5: 0x000000010402d5c3 cpptools`void* std::__1::__thread_proxy >, std::__1::function > >(void*) + 51 frame #6: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #7: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #29 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010402ec27 cpptools`std::__1::__function::__func, void ()>::operator()() + 183 frame #4: 0x000000010402d5c3 cpptools`void* std::__1::__thread_proxy >, std::__1::function > >(void*) + 51 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #30 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x000000010467d3f9 cpptools`uv_cond_wait + 9 frame #3: 0x000000010466b819 cpptools`worker + 89 frame #4: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #5: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #31 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x000000010467d3f9 cpptools`uv_cond_wait + 9 frame #3: 0x000000010466b819 cpptools`worker + 89 frame #4: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #5: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #32 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x000000010467d3f9 cpptools`uv_cond_wait + 9 frame #3: 0x000000010466b819 cpptools`worker + 89 frame #4: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #5: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #33 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x000000010467d3f9 cpptools`uv_cond_wait + 9 frame #3: 0x000000010466b819 cpptools`worker + 89 frame #4: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #5: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 ```
Call stacks of cpptools-srv: ``` (lldb) bt all * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP * frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dd83 libc++.1.dylib`std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock&, std::__1::chrono::time_point > >) + 93 frame #3: 0x0000000100036d8b cpptools-srv`std::__1::cv_status std::__1::condition_variable::wait_until > >(std::__1::unique_lock&, std::__1::chrono::time_point > > const&) + 171 frame #4: 0x000000010002dc86 cpptools-srv`bool msvc::event_t::wait_for >(std::__1::chrono::duration > const&) + 102 frame #5: 0x000000010002d8a3 cpptools-srv`RunServer(unsigned int, char const*) + 787 frame #6: 0x000000010002e0c4 cpptools-srv`main + 116 frame #7: 0x00007fff20341621 libdyld.dylib`start + 1 thread #2 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #3 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #4 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #5 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #6 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #7 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #8 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #9 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #10 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #11 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #12 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #13 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #14 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #15 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #16 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #17 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x00000001004262cb cpptools-srv`msvc::thread_pool::do_work(unsigned long) + 363 frame #4: 0x0000000100427d41 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::add_threads()::$_1> >(void*) + 49 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #18 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dd83 libc++.1.dylib`std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock&, std::__1::chrono::time_point > >) + 93 frame #3: 0x0000000100036d8b cpptools-srv`std::__1::cv_status std::__1::condition_variable::wait_until > >(std::__1::unique_lock&, std::__1::chrono::time_point > > const&) + 171 frame #4: 0x0000000100427cb7 cpptools-srv`unsigned int msvc::bitset_event_t::wait_for_any_set >(std::__1::chrono::duration > const&, unsigned int) + 103 frame #5: 0x0000000100427bb2 cpptools-srv`void* std::__1::__thread_proxy >, msvc::thread_pool::thread_pool()::$_0> >(void*) + 306 frame #6: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #7: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #19 frame #0: 0x00007fff202f67e2 libsystem_kernel.dylib`kevent + 10 frame #1: 0x000000010049858a cpptools-srv`uv__io_poll + 874 frame #2: 0x0000000100491ac1 cpptools-srv`uv_run + 465 frame #3: 0x0000000100441719 cpptools-srv`msvc::channel_manager_t::thread_proc() + 121 frame #4: 0x00000001004443fe cpptools-srv`void* std::__1::__thread_proxy >, void (msvc::channel_manager_t::*)(), msvc::channel_manager_t*> >(void*) + 62 frame #5: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #6: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #20 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x000000010049f639 cpptools-srv`uv_cond_wait + 9 frame #3: 0x000000010048da59 cpptools-srv`worker + 89 frame #4: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #5: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #21 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x000000010049f639 cpptools-srv`uv_cond_wait + 9 frame #3: 0x000000010048da59 cpptools-srv`worker + 89 frame #4: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #5: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #22 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x000000010049f639 cpptools-srv`uv_cond_wait + 9 frame #3: 0x000000010048da59 cpptools-srv`worker + 89 frame #4: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #5: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #23 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x000000010049f639 cpptools-srv`uv_cond_wait + 9 frame #3: 0x000000010048da59 cpptools-srv`worker + 89 frame #4: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #5: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 thread #24 frame #0: 0x00007fff202f48e2 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fff20326e6f libsystem_pthread.dylib`_pthread_cond_wait + 1254 frame #2: 0x00007fff2028dcf2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 18 frame #3: 0x000000010038ced8 cpptools-srv`a_compiler_thread::fetch_fragment() + 136 frame #4: 0x00000001003b47dc cpptools-srv`before_tu_wrapup() + 348 frame #5: 0x0000000100345f6e cpptools-srv`process_translation_unit(char const*, int, an_exported_template_file*) + 958 frame #6: 0x0000000100042279 cpptools-srv`cfe_main(int, char**) + 121 frame #7: 0x000000010036ecd9 cpptools-srv`cfe_main_exception_handler(int, char**) + 9 frame #8: 0x0000000100042369 cpptools-srv`edg_main(int, char**) + 9 frame #9: 0x00000001003619e4 cpptools-srv`edge_compiler_main(int, char const**) + 9220 frame #10: 0x00000001003b4fb2 cpptools-srv`preparse(int, char const**, a_scout_store*, edge::translation_unit*) + 242 frame #11: 0x000000010038cc98 cpptools-srv`a_compiler_thread::compiler_thread_routine(a_compiler_thread*) + 296 frame #12: 0x00000001003abefc cpptools-srv`void* std::__1::__thread_proxy >, void (*)(a_compiler_thread*), a_compiler_thread*> >(void*) + 44 frame #13: 0x00007fff20326950 libsystem_pthread.dylib`_pthread_start + 224 frame #14: 0x00007fff2032247b libsystem_pthread.dylib`thread_start + 15 ```

I noticed now that this behavior only occurs when i open a relatively big file (86k LOC) which is in another workspace, where "C_Cpp.default.browse.path": [] is set

Dakror commented 3 years ago

For me it's independent of file size. Just sometimes it starts to happen and only goes away after a restart

xolom commented 3 years ago

Maybe it's a different cause in my case. According to the call stacks it looks like that everything is waiting. Intellisense completely stopped working tho. Deadlock?

Dakror commented 3 years ago

Okay so for me it definitely is the compiler I'm using. Earlier today i switched back to MSVC 2017 and had no problems. I just now switched back to my Clang and immediately the issue reappeared.

sean-mcmanus commented 3 years ago

@Dakror I used the compiler output you provided but the split_string method doesn't infinite loop for me, and the code basically just does

for (std::cregex_iterator i(compilerOutput.begin(), compilerOutput.end(), std::regex("\\r?\\n\\s*")), end; i != end; ++i)

so I don't see how it's possible for that to infinite loop unless there's some library bug. Some example code can be found at https://en.cppreference.com/w/cpp/regex/regex_iterator , so let us know if you figure out a way for that to infinite loop.

I also tested with

        {
            "name": "clang",
            "compilerPath": "C:\\Program Files\\LLVM\\bin\\clang++.exe",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-clang-x64"
        }

but wasn't able to repro the issue. Is your configuration somehow different?

You should see log output like: Compiler query command line: "C:\Program Files\LLVM\bin\clang++.exe" -std=c++17 -Wp,-v -E -dD -x c++ -m64 -fno-blocks nul

@xolom All the call stacks you provide show no work being done. No deadlock. Did you attach to the correct processes?

Dakror commented 3 years ago

Is there a way for me to install the extension with the ability to fully debug it?

sean-mcmanus commented 3 years ago

@Dakror You could use the Visual Studio debugger (https://visualstudio.microsoft.com/vs/community/, Desktop Development with C++ workload, none of the optional installs should be required) to debug through the disassembly code and view the registers and memory windows -- not sure how to do that with other debugger tools. You'll need to add https://msdl.microsoft.com/download/symbols to the Tools->Options->Debugging->Symbols path. You won't have source code access, but you should still be able to see what data is being processed. The esi register should have the memory address to the string that is being iterated over.

image

Any more info you can provide with regards to the inputs that are being passed or which assembly instructions are getting looped over could help.

Dakror commented 3 years ago

The string at that location spans 2.4 million characters, is this to be expected? image

it starts off with the compiler infos, then i think it follows with my code and then perhaps the STL? The frame that is looping inifinitely is indeed the split_string or atleast it's taking insanely long. looking at the progress in the ESI register, a single run of the frame moves it forward by one def:

ESI 146723E5

define UINT_LEAST32_FMTx "x"

ESI 14672407

define UINT_LEAST32_FMTX "X"

but the code in lower frames must be doing so much that after letting it run like 5 seconds and pausing again it only made about 300 bytes of progress: ESI 14672740

sean-mcmanus commented 3 years ago

No, there are not supposed to be any 2.4 million character strings. What makes you think it's that long? The EDI register should have the end string delimiter, so EDI-ESI == string length. I don't see any how the string could be that big from looking at the code. The string should contain the compiler output and not your code or STL. If you're seeing it 5 seconds to process 300 bytes, then it sounds like the regex evaluation is taking a really long time, which suggests the input string could be very large. Are you using any unusual compilerArgs that could be causing it to output a lot of text?

Dakror commented 3 years ago

im using the CMake Tools extension. EDI starts with 148 and ESI 146

sean-mcmanus commented 3 years ago

Your C/C++ logging should have "Custom configurations received:" which should show the compilerPath and compilerArgs that CMake Tools is sending us (with C_Cpp.loggingLevel set to "Debug"). If you use <compilerName> <compilerArgs> -Wp,-v -E -dD -x c++ nul do you get any unusually output?

What do you mean EDI starts with 148? It should be a memory address. Are you seeing EDI-ESI being equal to the string length? I'm getting a string length around 12k.

Dakror commented 3 years ago

ESI 146723E5 EDI 148xxxxx i dont know the exact numbers anymore but i figured that EDI would be the end and thats why i said 2.4mil bytes.

Dakror commented 3 years ago

I think i found the issue, it must be my (self-compiled) LLVM+Clang installation. Using the command that i found using your instructions, i get a Clang crash dump.

Edit: However i was just now able to recreate the issue using binary-distribution installed Clang 10. Will need to re-do all previous steps

Dakror commented 3 years ago

Same thing, but different crash in Clang 10:

i doubt its a real OOM. i have 32 GB of RAM

C:\Users\Dakror> "i:/programmieren/cpp/llvm/bin/clang++.exe" -g -Xclang -gcodeview -O0 -Xclang --dependent-lib=msvcrtd -std=gnu++17 -Xclang -include-pch -Xclang I:/Programmieren/Projects/Sandal/Games/
3DTown/build/sandal/src/Sandal/CMakeFiles/Sandal.dir/cmake_pch.hxx.pch -Xclang -include -Xclang I:/Programmieren/Projects/Sandal/Games/3DTown/build/sandal/src/Sandal/CMakeFiles/Sandal.dir/cmake_pch.hx
x  -Wp,-v -E -dD -x c++ -m64 -fno-blocks nul
clang -cc1 version 10.0.0 based upon LLVM 10.0.0 default target x86_64-pc-windows-msvc
ignoring nonexistent directory "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\atlmfc\include"
#include "..." search starts here:
#include <...> search starts here:
 i:\programmieren\cpp\llvm\lib\clang\10.0.0\include
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include
 C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt
 C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared
 C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um
 C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt
End of search list.
fatal error: error in backend: IO failure on output stream: not enough memory
Stack dump:
0.      Program arguments: i:/programmieren/cpp/llvm/bin/clang++.exe -g -Xclang -gcodeview -O0 -Xclang --dependent-lib=msvcrtd -std=gnu++17 -Xclang -include-pch -Xclang I:/Programmieren/Projects/Sanda
l/Games/3DTown/build/sandal/src/Sandal/CMakeFiles/Sandal.dir/cmake_pch.hxx.pch -Xclang -include -Xclang I:/Programmieren/Projects/Sandal/Games/3DTown/build/sandal/src/Sandal/CMakeFiles/Sandal.dir/cmak
e_pch.hxx -Wp,-v -E -dD -x c++ -m64 -fno-blocks nul
 #0 0x000007fefd71b87d (C:\Windows\system32\KERNELBASE.dll+0xb87d)
 #1 0x0000000140bf6eca (i:\programmieren\cpp\llvm\bin\clang++.exe+0x16b6eca)
 #2 0x0000000140bd35a3 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x16935a3)
 #3 0x000000013f5471f9 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x71f9)
 #4 0x0000000140bfbee7 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x16bbee7)
 #5 0x0000000140bfbff3 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x16bbff3)
 #6 0x0000000140bf0cf3 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x16b0cf3)
 #7 0x0000000140bf15d0 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x16b15d0)
 #8 0x00000001412ae36c (i:\programmieren\cpp\llvm\bin\clang++.exe+0x1d6e36c)
 #9 0x00000001412ede02 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x1dade02)
#10 0x00000001412b0b78 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x1d70b78)
#11 0x0000000141348ca9 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x1e08ca9)
#12 0x000000013f546ebf (i:\programmieren\cpp\llvm\bin\clang++.exe+0x6ebf)
#13 0x000000013f544337 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x4337)
#14 0x000000014124d7c6 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x1d0d7c6)
#15 0x0000000140bf6d33 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x16b6d33)
#16 0x000000014124d00b (i:\programmieren\cpp\llvm\bin\clang++.exe+0x1d0d00b)
#17 0x00000001411711d8 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x1c311d8)
#18 0x00000001411716d4 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x1c316d4)
#19 0x000000014115f357 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x1c1f357)
#20 0x000000013f543c93 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x3c93)
#21 0x0000000142c074a0 (i:\programmieren\cpp\llvm\bin\clang++.exe+0x36c74a0)
#22 0x00000000777c556d (C:\Windows\system32\kernel32.dll+0x1556d)
#23 0x000000007792372d (C:\Windows\SYSTEM32\ntdll.dll+0x5372d)
Dakror commented 3 years ago

While this naturally is a Clang bug, it still is also a bug in cpptools for not dealing with this issue and not terminating the format action.

sean-mcmanus commented 3 years ago

The output in your screenshot shows #defines and the assembly code that is infinite looping only runs when there are defines in the output, but in the output when clang crashes I don't see any #define lines. Do you know why? Are you able to provide us with a repro where clang crashes? If not, we can probably create some dummy compiler that crashes to see if we can repro the issue.

Dakror commented 3 years ago

I would suggest you add a test against garbage clang output to handle that case. Im not sure i will be able to find a reproc but i'll try

sean-mcmanus commented 3 years ago

Yeah, I created a dummy app that crashes after it outputs the includes, but our code successfully detects that and fallback to a different compiler, so I'm not sure yet how that logic is being bypassed with your repro.

sean-mcmanus commented 3 years ago

I believe clang may be outputting some bogus data before it crashes -- are you able to somehow obtain that string data (e.g. from the VS memory window?)? With my dummy app that crashes, it gets the valid output you provided earlier (although I had to add a #define) and then it just times out from not being able to communicate with the clang process since it crashed.

We could add logging before calling parse_defines (unfortunately, if the output is too large it would hit our logging limit amount unless we override that somehow, and it's possible the logging code would just hit some unexpected condition instead of split_string). I guess outputting the size and whatever else we can is better than nothing.

Dakror commented 3 years ago

So the command works perfectly fine if i exclude the pch and header file from cmake. Those are generated properly using Cmake and only include a single library's pch. I'm kinda exhausted trying to find a solution here... Might i ask why the pch and header file are included in the compiler probe at all?

sean-mcmanus commented 3 years ago

I recall that we do make an attempt to remove arguments that we don't need -- @Colengms do you recall? I could check too.

Also, are you using a 32-bit or 64-bit version of clang? If you're using a 32-bit version, that could explain the out-of-memory (might be worth trying a 64-bit version to see if that works).

sean-mcmanus commented 3 years ago

Also, it's possible when we query the compiler, the compiler isn't crashing, and the issue could be the handling of the -include-pch -Xclang <pch> args -- we've had bugs like that before where we'd only remove part of the unneeded compiler argument and then ended up passing in 1/2 the arg, breaking our compiler querying. @Colengms Can you review those args to see if we're expecting those?

Dakror commented 3 years ago

I'm using x64 and i also just went through the effort compiling clang in debug mode to learn more, and the issue seems to be related to the output being nul. it tries to close the output file stream and then dies inside the STL trying to reset a unique_ptr or something along those lines

Dakror commented 3 years ago

Regarding removing arguments, there are a bunch of duplicate -Xclang arguments in the call, those might be also not properly cleaned up?

sean-mcmanus commented 3 years ago

Yay -- I finally reproed the bug -- I just needed to use a pch file. And the input string is 1-2 million characters long.

Dakror commented 3 years ago

Finally :D

sean-mcmanus commented 3 years ago

The issue doens't repro if the "-Xclang" arguments are removed, i.e. the bug is that the filtering out of the ipch file argument doesn't work with the "-Xclang" arguments.