vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

C/C++ formatter stuck as #6809

Open b05902034 opened this issue 2 years ago • 4 comments

Environment

  • OS and version: macOS Monterey 12.0.1
  • VS Code: 1.69.2
  • C/C++ extension: v1.11.4

Bug Summary and Steps to Reproduce

Bug Summary:

same issue as #6809 and I check that its cpptools using CPU but I can't find C_Cpp.loggingLevel in settings

Other Extensions

No response

Additional Information

No response

b05902034 avatar Jul 23 '22 08:07 b05902034

The formatting getting stuck is likely due to another system blocking the formatting operation. C_Cpp.loggingLevel is available as a user/workspace setting (not workspace folder). If cpptools is using CPU, can you attach a debugger to get a call stack for the thread that appears to be doing work? https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv

sean-mcmanus avatar Jul 25 '22 17:07 sean-mcmanus

I can't activate the debugger to check if cpptools executed correctly but I used activity monitor to get sum sample as follow hope this would be cpptools call stack sample.txt

b05902034 avatar Jul 28 '22 12:07 b05902034

The call stacks doesn't show any formatting, but it shows IntelliSense process creation. Are you able to wait for IntelliSense to be finished updating before running the format command? It also shows it's trying to use recursive includes, so you may want to remove any paths with "**" from your include path to stop using recursive includes, which could be faster.

sean-mcmanus avatar Jul 28 '22 20:07 sean-mcmanus

@sean-mcmanus Recently I have been facing the same problem: formatter stuck when saving (I have auto save and format on save active) and intellisense stuck in the flame icon forever (hovering a variable prints loading...). I don't have a step by step guide to repro the problem because it doesn't happen always. The only thing I do is: edit code and then cmake run (with the cmake-tools ext). Sometimes the bug appears sometimes not.

Here is my call stack (I couldn't get it with the vscode - launch.json guide so I used the lldb one):

call stack
~
❯ lldb -p 79097
(lldb) process attach --pid 79097
Process 79097 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x00000001c1e089ec libsystem_kernel.dylib`__read_nocancel + 8
libsystem_kernel.dylib`:
->  0x1c1e089ec <+8>:  b.lo   0x1c1e08a0c               ; <+40>
    0x1c1e089f0 <+12>: pacibsp
    0x1c1e089f4 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1c1e089f8 <+20>: mov    x29, sp
Executable module set to "/Users/$USER/.vscode/extensions/ms-vscode.cpptools-1.12.0-darwin-arm64/bin/cpptools".
Architecture set to: arm64e-apple-macosx-.
(lldb) bt all
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00000001c1e089ec libsystem_kernel.dylib`__read_nocancel + 8
    frame #1: 0x00000001c1d36714 libsystem_c.dylib`__sread + 24
    frame #2: 0x00000001c1d11618 libsystem_c.dylib`_sread + 32
    frame #3: 0x00000001c1d115ac libsystem_c.dylib`__srefill1 + 36
    frame #4: 0x00000001c1d2ca78 libsystem_c.dylib`__srget + 24
    frame #5: 0x00000001c1d3aba0 libsystem_c.dylib`getc + 72
    frame #6: 0x00000001c1db381c libc++.1.dylib`std::__1::__stdinbuf<char>::__getchar(bool) + 160
    frame #7: 0x0000000104df47e4 cpptools`std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::getline<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, char) + 148
    frame #8: 0x0000000104db764c cpptools`vscode::message_handler::main_loop() + 1644
    frame #9: 0x0000000104db5e38 cpptools`main + 288
    frame #10: 0x000000010666d08c dyld`start + 520
  thread #2
    frame #0: 0x00000001c1e0cc20 libsystem_kernel.dylib`kevent + 8
    frame #1: 0x0000000105634e58 cpptools`uv__io_poll + 724
    frame #2: 0x000000010562e4c0 cpptools`uv_run + 372
    frame #3: 0x00000001055f7608 cpptools`msvc::loop_t::run_loop() + 64
    frame #4: 0x00000001055fa6a8 cpptools`msvc::thread_t::invoker_t<void (*)(std::__1::shared_ptr<msvc::loop_t>), std::__1::shared_ptr<msvc::loop_t>&>::invoke() + 40
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #3
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104d9e914 cpptools`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(std::__1::unique_lock<std::__1::mutex>&) + 100
    frame #4: 0x0000000104eb9238 cpptools`vscode::thread_pool::do_work(unsigned long) + 340
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #4
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104d9e914 cpptools`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(std::__1::unique_lock<std::__1::mutex>&) + 100
    frame #4: 0x0000000104eb9238 cpptools`vscode::thread_pool::do_work(unsigned long) + 340
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #5
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104d9e914 cpptools`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(std::__1::unique_lock<std::__1::mutex>&) + 100
    frame #4: 0x0000000104eb9238 cpptools`vscode::thread_pool::do_work(unsigned long) + 340
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #6
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104d9e914 cpptools`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(std::__1::unique_lock<std::__1::mutex>&) + 100
    frame #4: 0x0000000104eb9238 cpptools`vscode::thread_pool::do_work(unsigned long) + 340
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #7
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104d9e914 cpptools`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(std::__1::unique_lock<std::__1::mutex>&) + 100
    frame #4: 0x0000000104eb9238 cpptools`vscode::thread_pool::do_work(unsigned long) + 340
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #8
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104d9e914 cpptools`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(std::__1::unique_lock<std::__1::mutex>&) + 100
    frame #4: 0x0000000104eb9238 cpptools`vscode::thread_pool::do_work(unsigned long) + 340
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #9
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104d9e914 cpptools`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(std::__1::unique_lock<std::__1::mutex>&) + 100
    frame #4: 0x0000000104eb9238 cpptools`vscode::thread_pool::do_work(unsigned long) + 340
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #10
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104d9e914 cpptools`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(std::__1::unique_lock<std::__1::mutex>&) + 100
    frame #4: 0x0000000104eb9238 cpptools`vscode::thread_pool::do_work(unsigned long) + 340
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #11
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93320 libc++.1.dylib`std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 100
    frame #3: 0x0000000104d9ecc8 cpptools`std::__1::cv_status std::__1::condition_variable_any::wait_until<std::__1::unique_lock<std::__1::mutex>, std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > > const&) + 268
    frame #4: 0x0000000104ebab1c cpptools`unsigned int msvc::bitset_event_t::wait_for_any_set<long long, std::__1::ratio<1l, 1000l> >(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> > const&, unsigned int) + 112
    frame #5: 0x0000000104eba9f0 cpptools`msvc::thread_t::invoker_t<vscode::thread_pool::thread_pool()::$_0>::invoke() + 164
    frame #6: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #7: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #12
    frame #0: 0x00000001c1e0cc20 libsystem_kernel.dylib`kevent + 8
    frame #1: 0x0000000105634e58 cpptools`uv__io_poll + 724
    frame #2: 0x000000010562e4c0 cpptools`uv_run + 372
    frame #3: 0x00000001055f7608 cpptools`msvc::loop_t::run_loop() + 64
    frame #4: 0x00000001055fa6a8 cpptools`msvc::thread_t::invoker_t<void (*)(std::__1::shared_ptr<msvc::loop_t>), std::__1::shared_ptr<msvc::loop_t>&>::invoke() + 40
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #13
    frame #0: 0x00000001c1e089ec libsystem_kernel.dylib`__read_nocancel + 8
    frame #1: 0x00000001c1d6e930 libsystem_c.dylib`wordexp + 2220
    frame #2: 0x000000010561bc20 cpptools`msvc::parse_arguments(msvc::basic_zstring_view<char>) + 60
    frame #3: 0x0000000104d64538 cpptools`cpp_properties::set_custom_browse_path(vscode::WorkspaceBrowseConfiguration const&) + 768
    frame #4: 0x0000000104dceed0 cpptools`vscode::message_handler::cpptools_didChangeCustomBrowseConfiguration(vscode::CustomBrowseConfigurationParams) + 124
    frame #5: 0x0000000104dbc07c cpptools`vscode::message_handler::dispatch(vscode::vscode_client_message&&, vscode::vscode_server_message&, vscode::message_handler::msg_proc_thread_token) + 10016
    frame #6: 0x0000000104db9890 cpptools`vscode::message_handler::handle_message(vscode::vscode_client_message&&, vscode::message_handler::msg_proc_thread_token) + 52
    frame #7: 0x0000000104e27268 cpptools`std::__1::__function::__func<vscode::message_handler::main_loop()::$_5, std::__1::allocator<vscode::message_handler::main_loop()::$_5>, void ()>::operator()() + 1996
    frame #8: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #9: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #14
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104e282c8 cpptools`vscode::message_deque<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, false>::pop_impl(bool) + 92
    frame #4: 0x0000000104e2817c cpptools`std::__1::__function::__func<vscode::message_handler::main_loop()::$_6, std::__1::allocator<vscode::message_handler::main_loop()::$_6>, void ()>::operator()() + 48
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #15
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104e29904 cpptools`vscode::message_deque<vscode::folding_ranges_params, false>::pop_impl(bool) + 92
    frame #4: 0x0000000104e2973c cpptools`std::__1::__function::__func<vscode::message_handler::main_loop()::$_9, std::__1::allocator<vscode::message_handler::main_loop()::$_9>, void ()>::operator()() + 80
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #16
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104e28d70 cpptools`vscode::message_deque<vscode::browse_engine_update_action, false>::pop_impl(bool) + 84
    frame #4: 0x0000000104e2860c cpptools`std::__1::__function::__func<vscode::message_handler::main_loop()::$_7, std::__1::allocator<vscode::message_handler::main_loop()::$_7>, void ()>::operator()() + 156
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #17
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104e29e3c cpptools`vscode::message_deque<vscode::vscode_client_message, false>::pop_impl(bool) + 96
    frame #4: 0x0000000104e29cf4 cpptools`std::__1::__function::__func<vscode::message_handler::main_loop()::$_10, std::__1::allocator<vscode::message_handler::main_loop()::$_10>, void ()>::operator()() + 68
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #18
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104e29e3c cpptools`vscode::message_deque<vscode::vscode_client_message, false>::pop_impl(bool) + 96
    frame #4: 0x0000000104e29ff4 cpptools`std::__1::__function::__func<vscode::message_handler::main_loop()::$_11, std::__1::allocator<vscode::message_handler::main_loop()::$_11>, void ()>::operator()() + 68
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #19
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104e2a5b8 cpptools`vscode::message_deque<vscode::message_handler::parse_file_entry, true>::pop_impl(bool) + 92
    frame #4: 0x0000000104e2a1a4 cpptools`std::__1::__function::__func<vscode::message_handler::main_loop()::$_12, std::__1::allocator<vscode::message_handler::main_loop()::$_12>, void ()>::operator()() + 112
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #20
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104e29e3c cpptools`vscode::message_deque<vscode::vscode_client_message, false>::pop_impl(bool) + 96
    frame #4: 0x0000000104e2aaf4 cpptools`std::__1::__function::__func<vscode::message_handler::main_loop()::$_13, std::__1::allocator<vscode::message_handler::main_loop()::$_13>, void ()>::operator()() + 68
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #21
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93320 libc++.1.dylib`std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 100
    frame #3: 0x0000000104e2aeb8 cpptools`vscode::message_deque<int, false>::pop_impl(bool, int&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >) + 148
    frame #4: 0x0000000104e2ad6c cpptools`std::__1::__function::__func<vscode::message_handler::main_loop()::$_14, std::__1::allocator<vscode::message_handler::main_loop()::$_14>, void ()>::operator()() + 316
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #22
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104d9e914 cpptools`void std::__1::condition_variable_any::wait<std::__1::unique_lock<std::__1::mutex> >(std::__1::unique_lock<std::__1::mutex>&) + 100
    frame #4: 0x0000000104e2b208 cpptools`std::__1::__function::__func<vscode::message_handler::main_loop()::$_15, std::__1::allocator<vscode::message_handler::main_loop()::$_15>, void ()>::operator()() + 196
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #23
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000104e29518 cpptools`vscode::message_deque<int, false>::pop_impl(bool) + 84
    frame #4: 0x0000000104e29440 cpptools`std::__1::__function::__func<vscode::message_handler::main_loop()::$_8, std::__1::allocator<vscode::message_handler::main_loop()::$_8>, void ()>::operator()() + 52
    frame #5: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #6: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #24
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x000000010563ba7c cpptools`uv_cond_wait + 12
    frame #3: 0x000000010562aebc cpptools`worker + 112
    frame #4: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #25
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x000000010563ba7c cpptools`uv_cond_wait + 12
    frame #3: 0x000000010562aebc cpptools`worker + 112
    frame #4: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #26
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x000000010563ba7c cpptools`uv_cond_wait + 12
    frame #3: 0x000000010562aebc cpptools`worker + 112
    frame #4: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #27
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x000000010563ba7c cpptools`uv_cond_wait + 12
    frame #3: 0x000000010562aebc cpptools`worker + 112
    frame #4: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
  thread #28
    frame #0: 0x00000001c1e0a270 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001c1e4483c libsystem_pthread.dylib`_pthread_cond_wait + 1236
    frame #2: 0x00000001c1d93284 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
    frame #3: 0x0000000105442604 cpptools`run_tag_parser() + 348
    frame #4: 0x00000001053d5f2c cpptools`process_translation_unit(char const*, int, an_exported_template_file*) + 912
    frame #5: 0x00000001050516b8 cpptools`cfe_main(int, char**) + 136
    frame #6: 0x00000001053fc2b4 cpptools`cfe_main_exception_handler(int, char**) + 12
    frame #7: 0x00000001050517a4 cpptools`edg_main(int, char**) + 12
    frame #8: 0x0000000105446048 cpptools`antlr_parse_routine() + 488
    frame #9: 0x000000010561b7f4 cpptools`msvc::thread_helper_t::thread_entry(void*) + 28
    frame #10: 0x00000001c1e4426c libsystem_pthread.dylib`_pthread_start + 148
(lldb) exit
Quitting LLDB will detach from one or more processes. Do you really want to proceed: [Y/n] y

lucasaf04 avatar Aug 04 '22 09:08 lucasaf04

I used lldb to get the call stack as @lucasaf04 截圖 2022-08-14 09 12 51 It seems like it's stuck

b05902034 avatar Aug 14 '22 01:08 b05902034

@b05902034 That only shows the 1st thread which waits on stdin. Can you get call stacks for other threads?

sean-mcmanus avatar Aug 15 '22 18:08 sean-mcmanus

This issue has been closed because it needs more information and has not had recent activity.

github-actions[bot] avatar Oct 15 '22 11:10 github-actions[bot]