Skip to content

cpptools-srv.exe using huge amounts of memory #6293

Description

I caught an occurrence of the (internal) Win x64 build of cpptools essentially hanging and cpptools-srv.exe skyrocketing to 32 GB. It seems to linger around 8G for a while, then shoot to 32G, fast. It looks like it was processing a handle_completion. It's possible this is the same issue users have reported on Linux and Mac (which are 64-bit).

All stacks from cpptools-srv.exe


>Debug.ListCallStack /AllThreads
Callstack for Thread 1 (Thread Id: 33048 (0x8118)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForSingleObject�()
 2      KernelBase.dll!WaitForSingleObjectEx�()
 3      KernelBase.dll!GetOverlappedResult()
 4      cpptools-srv.exe!read_pipe_sync(void *,unsigned long,void *)
 5      cpptools-srv.exe!comm_pipe_win32::read(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)
 6      cpptools-srv.exe!comm_server::wait_for_requests(void)
 7      cpptools-srv.exe!main�()
 8      cpptools-srv.exe!__scrt_common_main_seh()
 9      kernel32.dll!BaseThreadInitThunk�()
 10     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 2 (Thread Id: 20688 (0x50d0)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 3 (Thread Id: 34332 (0x861c)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 4 (Thread Id: 47800 (0xbab8)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 5 (Thread Id: 19976 (0x4e08)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 6 (Thread Id: 59520 (0xe880)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 7 (Thread Id: 63880 (0xf988)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 8 (Thread Id: 63836 (0xf95c)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 9 (Thread Id: 41160 (0xa0c8)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 10 (Thread Id: 36444 (0x8e5c)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 11 (Thread Id: 35608 (0x8b18)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 12 (Thread Id: 23768 (0x5cd8)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 13 (Thread Id: 52708 (0xcde4)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 14 (Thread Id: 57000 (0xdea8)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 15 (Thread Id: 27688 (0x6c28)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 16 (Thread Id: 63616 (0xf880)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 17 (Thread Id: 43676 (0xaa9c)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 18 (Thread Id: 21552 (0x5430)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 19 (Thread Id: 19388 (0x4bbc)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 20 (Thread Id: 31544 (0x7b38)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 21 (Thread Id: 55632 (0xd950)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 22 (Thread Id: 36352 (0x8e00)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 23 (Thread Id: 56452 (0xdc84)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 24 (Thread Id: 28788 (0x7074)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 25 (Thread Id: 38504 (0x9668)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 26 (Thread Id: 55628 (0xd94c)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 27 (Thread Id: 59160 (0xe718)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 28 (Thread Id: 42532 (0xa624)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 29 (Thread Id: 36000 (0x8ca0)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 30 (Thread Id: 5824 (0x16c0)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 31 (Thread Id: 62872 (0xf598)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 32 (Thread Id: 30084 (0x7584)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!msvc::bitset_event_t::wait_any_set(unsigned int)
 8      cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 9      cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 10     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 11     kernel32.dll!BaseThreadInitThunk�()
 12     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 33 (Thread Id: 49184 (0xc020)):
 Index  Function
--------------------------------------------------------------------------------
*1      cpptools-srv.exe!memset�()
 2      cpptools-srv.exe!msvc::memory_arena_t::allocate(unsigned __int64,bool)
 3      cpptools-srv.exe!std::vector<struct edge::symbol *,class an_edge_stl_il_allocator<struct edge::symbol *> >::_Emplace_reallocate<struct edge::symbol * const &>(struct edge::symbol * * const,struct edge::symbol * const &)
 4      cpptools-srv.exe!edge::scope_entry::compute_types(void)
 5      cpptools-srv.exe!edge::scope_entry::ensure_types(void)
 6      cpptools-srv.exe!get_immediate_members_of_scope()
 7      cpptools-srv.exe!get_namespace_scope_members()
 8      cpptools-srv.exe!get_scope_member_list()
 9      cpptools-srv.exe!edge::intellisense_operation::get_auto_complete_members(class edge::member_selection_entry * &,class edge::scope_entry * &,struct edge::list<struct edge::symbol *> *,struct edge::list<struct edge::symbol *> *,struct edge::list<struct edge::symbol *> *,struct edge::list<struct edge::symbol *> *,enum edge::intellisense_operation::member_list_kind,bool,bool &,bool &,bool &)
 10     cpptools-srv.exe!edge::intellisense_operation::get_auto_complete_members(class edge::member_selection_entry * &,class edge::scope_entry * &,struct edge::list<struct edge::symbol *> *,struct edge::list<struct edge::symbol *> *,struct edge::list<struct edge::symbol *> *,struct edge::list<struct edge::symbol *> *,enum edge::intellisense_operation::member_list_kind)
 11     cpptools-srv.exe!<lambda_a331186ae4c0363e6ef458d452c3abfd>::operator()(class edge::intellisense_operation &,bool &)
 12     cpptools-srv.exe!edge_intellisense_operation::perform_isense_operation_helper<bool>(char const *,class edge::intellisense_operation &,struct microsoft::cpp::intellisense::DocumentPosition const &,class std::function<void >,bool &,struct edge::allocator *,struct snapshot::snapshot_session_t)
 13     cpptools-srv.exe!edge_intellisense_operation::perform_isense_operation<bool>(char const *,struct microsoft::cpp::intellisense::DocumentPosition const &,class std::function<void >,bool &,struct snapshot::snapshot_session_t,bool,struct edge::allocator *)
 14     cpptools-srv.exe!edge_intellisense_server_impl::handle_completion(struct microsoft::cpp::intellisense::CompletionRequest const &)
 15     cpptools-srv.exe!work_queue::worker_proc(void)
 16     cpptools-srv.exe!std::_Func_impl_no_alloc<<lambda_e7ebccb63a97c3b180c583b86177616e>,void>::_Do_call()
 17     cpptools-srv.exe!msvc::thread_pool::do_work(unsigned __int64)
 18     cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_b5e45cde084c1fbae431fb53a67579f3> >,0>(void *)
 19     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 20     kernel32.dll!BaseThreadInitThunk�()
 21     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 34 (Thread Id: 29900 (0x74cc)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait_for(class Concurrency::details::stl_critical_section_interface *,unsigned int)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!std::condition_variable::_Wait_until1<struct std::chrono::steady_clock,class std::chrono::duration<__int64,struct std::ratio<1,1000000000> >,class <lambda_028d8776b087a33b50391e977106e9d5> >(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_028d8776b087a33b50391e977106e9d5> &)
 8      cpptools-srv.exe!std::condition_variable::wait_for<__int64,struct std::ratio<1,1000>,class <lambda_028d8776b087a33b50391e977106e9d5> >(class std::unique_lock<class std::mutex> &,class std::chrono::duration<__int64,struct std::ratio<1,1000> > const &,class <lambda_028d8776b087a33b50391e977106e9d5>)
 9      cpptools-srv.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)
 10     cpptools-srv.exe!std::thread::_Invoke<class std::tuple<class <lambda_727181be9e66f5f3968de8ced1290025> >,0>(void *)
 11     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 12     kernel32.dll!BaseThreadInitThunk�()
 13     ntdll.dll!RtlUserThreadStart�()

Callstack for Thread 35 (Thread Id: 6624 (0x19e0)):
 Index  Function
--------------------------------------------------------------------------------
 1      ntdll.dll!NtWaitForAlertByThreadId�()
 2      ntdll.dll!RtlSleepConditionVariableSRW()
 3      KernelBase.dll!SleepConditionVariableSRW�()
 4      cpptools-srv.exe!__crtSleepConditionVariableSRW�()
 5      cpptools-srv.exe!Concurrency::details::stl_condition_variable_win7::wait(class Concurrency::details::stl_critical_section_interface *)
 6      cpptools-srv.exe!do_wait()
 7      cpptools-srv.exe!a_compiler_thread::wait_for_event_with_check(bool &)
 8      cpptools-srv.exe!compile_fragment()
 9      cpptools-srv.exe!before_tu_wrapup(void)
 10     cpptools-srv.exe!process_translation_unit(char const *,int,struct an_exported_template_file *)
 11     cpptools-srv.exe!cfe_main(int,char * * const)
 12     cpptools-srv.exe!cfe_main_exception_handler(int,char * * const)
 13     cpptools-srv.exe!edg_main(int,char * * const)
 14     cpptools-srv.exe!invoke_edge_compiler()
 15     cpptools-srv.exe!edge_compiler_main(int,char const * * const)
 16     cpptools-srv.exe!a_compiler_thread::compiler_thread_routine(class a_compiler_thread *)
 17     cpptools-srv.exe!std::thread::_Invoke<class std::tuple<void (*)(class a_compiler_thread *),class a_compiler_thread *>,0,1>(void *)
 18     cpptools-srv.exe!thread_start<unsigned int (__cdecl*)(void *),1>()
 19     kernel32.dll!BaseThreadInitThunk�()
 20     ntdll.dll!RtlUserThreadStart�()

Unfortunately, I wasn't able to get symbols to resolve in the debugger. I have a crash dump, but it's 34G.

I let it continue while attached to the debugger, which led to a fatal unhandled exception at about 38G.

Activity

  1. rewrking commented on Oct 12, 2020

    @rewrking

    This happens on mac too (v1.01 on a very large Qt project). I occasionally have to kill numerous cpptools-srv processes and refresh vscode. After restarting, I usually have to wait a while before I can get any intellisense again, and it looks like the entire database rebuilds. Very interested in a fix for this, as it tends to cook my macbook...

  2. sean-mcmanus commented on Oct 12, 2020

    @sean-mcmanus
    Contributor

    Same crash as #6271

  3. sean-mcmanus commented on Oct 12, 2020

    @sean-mcmanus
    Contributor

    @andrew-r-king Can you provide more info or was there another issue tracking it? Are you saying you hit the exact same issue with cpptoo-srv using too much memory in the compute_types method? Memory usage is a general class of problems for which there could be multiple root bugs in different scenarios.

  4. added this to the Triage milestone on Oct 29, 2020
  5. mocabe commented on Nov 21, 2020

    @mocabe

    I have similar issue on Ubuntu. cpptools-srv suddenly start to allocate huge amount of memory until OOM killer kicks in.
    I attached gdb to cpptools-srv and paused process after it started to eat memory.
    Here's stacktrace of thread allocating memory:

    operator new(unsigned long) (Unknown Source:0)
    operator new[](unsigned long, std::nothrow_t const&) (Unknown Source:0)
    msvc::memory_arena_t::allocate(unsigned long, bool) (Unknown Source:0)
    an_edge_symbol_impl_t<edge::symbol>::new_object(a_symbol*) (Unknown Source:0)
    an_edge_function_template_symbol_impl::prototype_instantiation_prototype_scope() const (Unknown Source:0)
    edge::simplify_symbol(edge::symbol const*, edge::simplify_symbol_options_e) (Unknown Source:0)
    edge::symbol_references_match(edge::an_intermediate_symbol const*, edge::symbol const*) (Unknown Source:0)
    a_reference_highlight_manager::add_symbol(msvc::strong_typedef_t<msvc::offset_traits>, msvc::strong_typedef_t<msvc::offset_traits>, a_symbol*) (Unknown Source:0)
    edge::scoped_query_manager::update_fragment(edge::file_position const&, edge::file_position const&, edge::file_position const&, bool, bool, bool) (Unknown Source:0)
    edge::an_edge_translation_unit_impl::update_range(edge::allocator*, snapshot::snapshot_session_t, edge::file_position, edge::file_position, edge::update_range_options const&, edge::file_position, msvc::strong_typedef_t<msvc::offset_traits>*, msvc::strong_typedef_t<msvc::offset_traits>*, an_array_list<edge::update_range_action*, std::allocator<edge::update_range_action*> > const&, edge::query_action_data&) (Unknown Source:0)
    edge::translation_unit::update_range(edge::allocator*, snapshot::snapshot_session_t, edge::file_position, edge::file_position, edge::update_range_options const&, edge::file_position, msvc::strong_typedef_t<msvc::offset_traits>*, msvc::strong_typedef_t<msvc::offset_traits>*, an_array_list<edge::update_range_action*, std::allocator<edge::update_range_action*> > const&, edge::query_action_data&) (Unknown Source:0)
    edge_intellisense_server_impl::handle_reference_highlight(microsoft::cpp::intellisense::ReferenceHighlightRequest const&) (Unknown Source:0)
    work_queue::worker_proc() (Unknown Source:0)
    std::_Function_handler<void (), msvc::thread_pool::enqueue(std::function<void ()>, std::future<void>*)::$_2>::_M_invoke(std::_Any_data const&) (Unknown Source:0)
    msvc::thread_pool::do_work(unsigned long) (Unknown Source:0)
    execute_native_thread_routine (Unknown Source:0)
    libpthread.so.0!start_thread(void * arg) (/build/glibc-ZN95T4/glibc-2.31/nptl/pthread_create.c:477)
    libc.so.6!clone() (/build/glibc-ZN95T4/glibc-2.31/sysdeps/unix/sysv/linux/x86_64/clone.S:95)
    

    At this point, total memory usage of cpptools-srv was over 20GB.
    edit: code-insiders cpptools-1.1.2

  6. sean-mcmanus commented on Nov 24, 2020

    @sean-mcmanus
    Contributor

    mocabe handle_reference_highlight occurs when the cursor select an identifier. Does the bug only repro with certain identifiers? Do the identifiers have lots of references in the file? Are you able to repro the issue without invoking a reference highlight? Are you able to determine which function call never returns as the memory is increasing, i.e. which function is stuck in a loop causing endless allocation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions