Skip to content

cpptools-srv crashes frequently,(Comes with stack) #12956

Open

Description

@x1ntt

Environment

  • OS and Version: windows11 23H2
  • VS Code Version: 1.85.2
  • C/C++ Extension Version: 1.23.1
  • If using SSH remote, specify OS of remote machine: CentOS7.9

Bug Summary and Steps to Reproduce

Bug Summary:

I didn't find a pattern for its crashes. I only saw "IntelliSense process crashed handle_quick_info" in the output window, and obtained a large number of core files. It crashed very frequently, and each core was 200-300MB in size. I guess it should fill up my hard drive soon.
I need a way to stop this process from generating core files. For example, execute ulimit -c 0 only for this process

Expected behavior:
No Crash.

Configuration and Logs

Sorry, due to development environment limitations, I can't easily get the log file, but I can provide the stack trace

{
    "configurations": [
        {
            "name": "gs",
            "includePath": [
                "${workspaceFolder}/game/common",
                "${workspaceFolder}/game/",
                "${workspaceFolder}/game/include",
                "${workspaceFolder}/game/gs",
                "${workspaceFolder}/iolib/inc"
            ],
            "defines": [
                "LINUX",
                "__linux__",
                "__x86_64__",
                "_GNU_SOURCE"
            ],

            "compilerPath": "/usr/local/bin/g++",
            "cStandard": "c17",
            "cppStandard": "gnu++17",
            "intelliSenseMode": "${default}",
            "forcedInclude": [
                "${workspaceFolder}/game/ss/world.h",
                "${workspaceFolder}/game/ss/sdef.h",
                "${workspaceFolder}/game/ss/msg.h"
            ]
            // "configurationProvider": "ms-vscode.makefile-tools"
        },
        {
            "name": "cnet",
            "includePath": [
                "${workspaceFolder}/cc/gdcc",
                "${workspaceFolder}/cc/common",
                "${workspaceFolder}/cc/io",
                "${workspaceFolder}/cc/rpc",
                "${workspaceFolder}/cc/perf",
                "${workspaceFolder}/cc/",
                "${workspaceFolder}/net/",
                "${workspaceFolder}/net/include",
                "${workspaceFolder}/net/rpcdata",
                "${workspaceFolder}/net/inl",
                "${workspaceFolder}/net/log"
            ],
            "defines": [
                "LINUX",
                "__linux__",
                "__x86_64__",
                "_GNU_SOURCE",
            ],

            "compilerPath": "/usr/local/bin/g++",
            "cStandard": "c17",
            "cppStandard": "gnu++17",
            "intelliSenseMode": "${default}",
            "forcedInclude": [
            ]
            // "configurationProvider": "ms-vscode.makefile-tools"
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

$ gdb cpptools-srv core.79293 
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from cpptools-srv...

warning: Can't open file /tmp/edg0_79293 (deleted) during file-backed mapping note processing
[New LWP 79295]
[New LWP 79297]
[New LWP 79296]
[New LWP 79298]
[New LWP 79299]
[New LWP 79293]
[New LWP 79294]

warning: Expected absolute pathname for libpthread in the inferior, but got ./libc.so.

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Core was generated by `/export/home/xx/.vscode-server/extensions/ms-vscode.cpptools-1.23.1/b'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fc62a9655fe in __restore_sigs () from ./libc.so
[Current thread is 1 (LWP 79295)]
(gdb) thread apply all bt

Thread 7 (LWP 79294):
#0  0x00007fc62a973b25 in __cp_end () from ./libc.so
#1  0x00007fc62a970aa0 in __syscall_cp_c () from ./libc.so
#2  0x00007fc62a93d8de in epoll_pwait () from ./libc.so
#3  0x0000000000e051e8 in uv.io_poll ()
#4  0x0000000000e0088f in uv_run ()
#5  0x0000000000daee93 in msvc::loop_t::run_loop() ()
#6  0x0000000000db00e8 in msvc::thread_t::invoker_t<void (*)(std::shared_ptr<msvc::loop_t>), std::shared_ptr<msvc::loop_t>&>::invoke() ()
#7  0x0000000000dfaa4c in msvc::thread_helper_t::thread_entry(void*) ()
#8  0x00007fc62a9715ef in start () from ./libc.so
#9  0x00007fc62a973af2 in __clone () from ./libc.so
#10 0x0000000000000000 in ?? ()

Thread 6 (LWP 79293):
#0  0x00007fc62a973b25 in __cp_end () from ./libc.so
#1  0x00007fc62a970aa0 in __syscall_cp_c () from ./libc.so
#2  0x00007fc62a970002 in __timedwait_cp () from ./libc.so
#3  0x00007fc62a970ee0 in pthread_cond_timedwait () from ./libc.so
#4  0x00000000006b012f in RunServer(msvc::process_id_t, char const*) ()
#5  0x000000000066f6fb in main ()

Thread 5 (LWP 79299):
#0  0x00007fc62a973b25 in __cp_end () from ./libc.so
#1  0x00007fc62a970aa0 in __syscall_cp_c () from ./libc.so
#2  0x00007fc62a970002 in __timedwait_cp () from ./libc.so
#3  0x00007fc62a970ee0 in pthread_cond_timedwait () from ./libc.so
#4  0x0000000000e34390 in __gthread_cond_wait (__mutex=<optimized out>, __cond=<optimized out>) at /mnt/vss/_work/1/s/src/musl-cross-make/build/local/x86_64-linux-musl/obj_gcc/x86_64-linux-musl/libstdc++-v3/include/x86_64-linux-musl/bits/gthr-default.h:865
#5  std::__condvar::wait (__m=..., this=<optimized out>) at /mnt/vss/_work/1/s/src/musl-cross-make/build/local/x86_64-linux-musl/obj_gcc/x86_64-linux-musl/libstdc++-v3/include/bits/std_mutex.h:155
#6  std::condition_variable::wait (this=<optimized out>, __lock=...) at ../../../../../src_gcc/libstdc++-v3/src/c++11/condition_variable.cc:41
#7  0x0000000000733e9c in a_compiler_thread::fetch_fragment() ()
#8  0x00000000007978ad in before_tu_wrapup() ()
#9  0x0000000000c883a1 in process_translation_unit(char const*, int, an_exported_template_file*) ()
#10 0x000000000081b7f9 in cfe_main(int, char**) ()
#11 0x0000000000ccf4ed in cfe_main_exception_handler(int, char**) ()
#12 0x000000000081b8fd in edg_main(int, char**) ()
#13 0x0000000000cc5feb in invoke_edge_compiler(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&) ()
#14 0x0000000000cc7528 in edge_compiler_main(int, char const**) ()
#15 0x000000000073574e in a_compiler_thread::compiler_thread_routine(a_compiler_thread*) ()
#16 0x0000000000dfaa4c in msvc::thread_helper_t::thread_entry(void*) ()
#17 0x00007fc62a9715ef in start () from ./libc.so
#18 0x00007fc62a973af2 in __clone () from ./libc.so
#19 0x0000000000000000 in ?? ()

Thread 4 (LWP 79298):
#0  0x00007fc62a973b25 in __cp_end () from ./libc.so
#1  0x00007fc62a970aa0 in __syscall_cp_c () from ./libc.so
#2  0x00007fc62a970002 in __timedwait_cp () from ./libc.so
#3  0x00007fc62a970ee0 in pthread_cond_timedwait () from ./libc.so
#4  0x0000000000e0f3ed in uv_cond_wait ()
#5  0x0000000000dfc48e in worker ()
#6  0x00007fc62a9715ef in start () from ./libc.so
#7  0x00007fc62a973af2 in __clone () from ./libc.so
#8  0x0000000000000000 in ?? ()

Thread 3 (LWP 79296):
#0  0x00007fc62a973b25 in __cp_end () from ./libc.so
#1  0x00007fc62a970aa0 in __syscall_cp_c () from ./libc.so
#2  0x00007fc62a970002 in __timedwait_cp () from ./libc.so
#3  0x00007fc62a970ee0 in pthread_cond_timedwait () from ./libc.so
#4  0x0000000000e0f3ed in uv_cond_wait ()
#5  0x0000000000dfc48e in worker ()
#6  0x00007fc62a9715ef in start () from ./libc.so
#7  0x00007fc62a973af2 in __clone () from ./libc.so
#8  0x0000000000000000 in ?? ()

--Type <RET> for more, q to quit, c to continue without paging--
Thread 2 (LWP 79297):
#0  0x00007fc62a973b25 in __cp_end () from ./libc.so
#1  0x00007fc62a970aa0 in __syscall_cp_c () from ./libc.so
#2  0x00007fc62a970002 in __timedwait_cp () from ./libc.so
#3  0x00007fc62a970ee0 in pthread_cond_timedwait () from ./libc.so
#4  0x0000000000e0f3ed in uv_cond_wait ()
#5  0x0000000000dfc48e in worker ()
#6  0x00007fc62a9715ef in start () from ./libc.so
#7  0x00007fc62a973af2 in __clone () from ./libc.so
#8  0x0000000000000000 in ?? ()

Thread 1 (LWP 79295):
#0  0x00007fc62a9655fe in __restore_sigs () from ./libc.so
#1  0x00007fc62a965778 in raise () from ./libc.so
#2  0x0000000000d521ef in (anonymous namespace)::reraise_signal(int, crash_handler_data_t*) ()
#3  0x0000000000d52435 in crash_handler(int, siginfo_t*, void*) ()
#4  <signal handler called>
#5  0x00007fc62a96f98d in memcpy () from ./libc.so
#6  0x00000000007b56b4 in a_region_tracker::build_sections(std::vector<a_boundary_point_template<a_tracked_region>, std::allocator<a_boundary_point_template<a_tracked_region> > >) ()
#7  0x00000000007b7576 in a_region_tracker::build_sections() ()
#8  0x00000000007b7b0c in a_tracking_manager::check_edits(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >, bool, bool*, bool*, a_tracked_region**, a_region_scope_info*) const ()
#9  0x0000000000743f03 in edge::scoped_query_manager::check_and_compile(edge::file_position const&, edge::file_position const&, edge::file_position const&, bool, bool, bool) ()
#10 0x00000000007444a3 in edge::scoped_query_manager::update_fragment(edge::file_position const&, edge::file_position const&, edge::file_position const&, edge::update_fragment_options const&) ()
#11 0x0000000000744c39 in 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<msvc::offset_traits<msvc::offset_tag_t> >*, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >*, an_array_list<edge::update_range_action*, std::allocator<edge::update_range_action*> > const&, edge::query_action_data&) ()
#12 0x0000000000745ac7 in 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<msvc::offset_traits<msvc::offset_tag_t> >*, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >*, an_array_list<edge::update_range_action*, std::allocator<edge::update_range_action*> > const&, edge::query_action_data&) ()
#13 0x000000000068a28c in edge_intellisense_server_impl::update_range(std::shared_ptr<edge::translation_unit> const&, char const*, edge::update_range_options, snapshot::snapshot_session_t const&, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >&, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >&) ()
#14 0x00000000006a87f9 in edge_intellisense_server_impl::handle_update_intellisense(cpp_intellisense::UpdateIntelliSenseRequest const&, cpp_intellisense::UpdateIntelliSenseResponse&, snapshot::snapshot_session_t const&) ()
#15 0x0000000000710ee4 in cpp_intellisense::server_stub::handle_update_intellisense(msvc::deserializer_t&, msvc::serializer_t&) ()
#16 0x00000000006b12cb in msvc::base_channel_t::dispatch_message(std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, std::allocator<unsigned char> >&) ()
#17 0x0000000000daa1d2 in msvc::common_channel_t::perform_call(unsigned int, std::vector<unsigned char, std::allocator<unsigned char> > const&) ()
#18 0x0000000000dfc2fc in worker ()
#19 0x00007fc62a9715ef in start () from ./libc.so
#20 0x00007fc62a973af2 in __clone () from ./libc.so
#21 0x0000000000000000 in ?? ()
(gdb) 


cpptools-srv
2024/11/12 17:25:00
SIGSEGV
a_region_tracker::build_sections()+982
a_tracking_manager::check_edits(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, bool, bool*, bool*, a_tracked_region**, a_region_scope_info*) const+892
edge::scoped_query_manager::check_and_compile(edge::file_position const&, edge::file_position const&, edge::file_position const&, bool, bool, bool)+899
edge::scoped_query_manager::update_fragment(edge::file_position const&, edge::file_position const&, edge::file_position const&, edge::update_fragment_options const&)+51
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<msvc::offset_traits<msvc::offset_tag_t>>*, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>*, an_array_list<edge::update_range_action*, std::allocator<edge::update_range_action*>> const&, edge::query_action_data&)+1209
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<msvc::offset_traits<msvc::offset_tag_t>>*, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>*, an_array_list<edge::update_range_action*, std::allocator<edge::update_range_action*>> const&, edge::query_action_data&)+119
edge_intellisense_server_impl::update_range(std::shared_ptr<edge::translation_unit> const&, char const*, edge::update_range_options, snapshot::snapshot_session_t const&, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>&, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>&)+524
edge_intellisense_server_impl::handle_update_intellisense(cpp_intellisense::UpdateIntelliSenseRequest const&, cpp_intellisense::UpdateIntelliSenseResponse&, snapshot::snapshot_session_t const&)+521
cpp_intellisense::server_stub::handle_update_intellisense(msvc::deserializer_t&, msvc::serializer_t&)+292
msvc::base_channel_t::dispatch_message(std::vector<unsigned char, std::allocator<unsigned char>> const&, std::vector<unsigned char, std::allocator<unsigned char>>&)+571
msvc::common_channel_t::perform_call(unsigned int, std::vector<unsigned char, std::allocator<unsigned char>> const&)+66

cpptools-srv
2024/11/12 17:28:10
SIGSEGV
a_region_tracker::build_sections()+982
a_tracking_manager::check_edits(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, bool, bool*, bool*, a_tracked_region**, a_region_scope_info*) const+892
edge::scoped_query_manager::check_and_compile(edge::file_position const&, edge::file_position const&, edge::file_position const&, bool, bool, bool)+899
edge::scoped_query_manager::get_trees_overlapping_span(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, int, edge::tree_query_result_builder*)+173
edge::intellisense_operation::symbol_at_cursor(bool, edge::macro_invocation_info*)+193
edge_intellisense_server_impl::handle_goto_def(cpp_intellisense::DocumentPosition const&, cpp_intellisense::goto_mode, cpp_intellisense::GoToDefResponse&, snapshot::snapshot_session_t const&)::{lambda(edge::intellisense_operation&, cpp_intellisense::GoToDefResponse&)#1}::operator()(edge::intellisense_operation&, cpp_intellisense::GoToDefResponse&) const+107
void edge_intellisense_operation::perform_isense_operation<cpp_intellisense::GoToDefResponse>(char const*, edge::file_position const&, std::function<void (edge::intellisense_operation&, cpp_intellisense::GoToDefResponse&)>&&, cpp_intellisense::GoToDefResponse&, snapshot::snapshot_session_t const&, bool)+342
edge_intellisense_server_impl::handle_goto_def(cpp_intellisense::DocumentPosition const&, cpp_intellisense::goto_mode, cpp_intellisense::GoToDefResponse&, snapshot::snapshot_session_t const&)+752
cpp_intellisense::server_stub::handle_goto_def(msvc::deserializer_t&, msvc::serializer_t&)+272
msvc::base_channel_t::dispatch_message(std::vector<unsigned char, std::allocator<unsigned char>> const&, std::vector<unsigned char, std::allocator<unsigned char>>&)+571
msvc::common_channel_t::perform_call(unsigned int, std::vector<unsigned char, std::allocator<unsigned char>> const&)+66

cpptools-srv
2024/11/12 17:28:12
SIGSEGV
a_region_tracker::build_sections()+982
a_tracking_manager::check_edits(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, bool, bool*, bool*, a_tracked_region**, a_region_scope_info*) const+892
edge::scoped_query_manager::check_and_compile(edge::file_position const&, edge::file_position const&, edge::file_position const&, bool, bool, bool)+899
edge::scoped_query_manager::update_fragment(edge::file_position const&, edge::file_position const&, edge::file_position const&, edge::update_fragment_options const&)+51
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<msvc::offset_traits<msvc::offset_tag_t>>*, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>*, an_array_list<edge::update_range_action*, std::allocator<edge::update_range_action*>> const&, edge::query_action_data&)+1209
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<msvc::offset_traits<msvc::offset_tag_t>>*, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>*, an_array_list<edge::update_range_action*, std::allocator<edge::update_range_action*>> const&, edge::query_action_data&)+119
edge_intellisense_server_impl::update_range(std::shared_ptr<edge::translation_unit> const&, char const*, edge::update_range_options, snapshot::snapshot_session_t const&, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>&, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>&)+524
edge_intellisense_server_impl::handle_update_intellisense(cpp_intellisense::UpdateIntelliSenseRequest const&, cpp_intellisense::UpdateIntelliSenseResponse&, snapshot::snapshot_session_t const&)+521
cpp_intellisense::server_stub::handle_update_intellisense(msvc::deserializer_t&, msvc::serializer_t&)+292
msvc::base_channel_t::dispatch_message(std::vector<unsigned char, std::allocator<unsigned char>> const&, std::vector<unsigned char, std::allocator<unsigned char>>&)+571
msvc::common_channel_t::perform_call(unsigned int, std::vector<unsigned char, std::allocator<unsigned char>> const&)+66

cpptools-srv
2024/11/12 17:32:07
SIGSEGV
a_region_tracker::build_sections()+982
a_tracking_manager::check_edits(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, bool, bool*, bool*, a_tracked_region**, a_region_scope_info*) const+892
edge::scoped_query_manager::check_and_compile(edge::file_position const&, edge::file_position const&, edge::file_position const&, bool, bool, bool)+899
edge::scoped_query_manager::get_trees_overlapping_span(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, int, edge::tree_query_result_builder*)+173
edge::intellisense_operation::symbol_at_cursor(bool, edge::macro_invocation_info*)+193
std::_Function_handler<void (edge::intellisense_operation&, cpp_intellisense::QuickInfoResponse&), edge_intellisense_server_impl::handle_quick_info(cpp_intellisense::DocumentPosition const&, int, cpp_intellisense::QuickInfoResponse&, snapshot::snapshot_session_t const&)::{lambda(edge::intellisense_operation&, cpp_intellisense::QuickInfoResponse&)#1}>::_M_invoke(std::_Any_data const&, edge::intellisense_operation&, cpp_intellisense::QuickInfoResponse&)+151
void edge_intellisense_operation::perform_isense_operation<cpp_intellisense::QuickInfoResponse>(char const*, edge::file_position const&, std::function<void (edge::intellisense_operation&, cpp_intellisense::QuickInfoResponse&)>&&, cpp_intellisense::QuickInfoResponse&, snapshot::snapshot_session_t const&, bool)+342
edge_intellisense_server_impl::handle_quick_info(cpp_intellisense::DocumentPosition const&, int, cpp_intellisense::QuickInfoResponse&, snapshot::snapshot_session_t const&)+625
cpp_intellisense::server_stub::handle_quick_info(msvc::deserializer_t&, msvc::serializer_t&)+313
msvc::base_channel_t::dispatch_message(std::vector<unsigned char, std::allocator<unsigned char>> const&, std::vector<unsigned char, std::allocator<unsigned char>>&)+571
msvc::common_channel_t::perform_call(unsigned int, std::vector<unsigned char, std::allocator<unsigned char>> const&)+66

cpptools-srv
2024/11/12 17:32:08
SIGSEGV
a_region_tracker::build_sections()+982
a_tracking_manager::check_edits(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, bool, bool*, bool*, a_tracked_region**, a_region_scope_info*) const+892
edge::scoped_query_manager::check_and_compile(edge::file_position const&, edge::file_position const&, edge::file_position const&, bool, bool, bool)+899
edge::scoped_query_manager::get_trees_overlapping_span(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, int, edge::tree_query_result_builder*)+173
edge::intellisense_operation::symbol_at_cursor(bool, edge::macro_invocation_info*)+193
edge_intellisense_server_impl::handle_goto_def(cpp_intellisense::DocumentPosition const&, cpp_intellisense::goto_mode, cpp_intellisense::GoToDefResponse&, snapshot::snapshot_session_t const&)::{lambda(edge::intellisense_operation&, cpp_intellisense::GoToDefResponse&)#1}::operator()(edge::intellisense_operation&, cpp_intellisense::GoToDefResponse&) const+107
void edge_intellisense_operation::perform_isense_operation<cpp_intellisense::GoToDefResponse>(char const*, edge::file_position const&, std::function<void (edge::intellisense_operation&, cpp_intellisense::GoToDefResponse&)>&&, cpp_intellisense::GoToDefResponse&, snapshot::snapshot_session_t const&, bool)+342
edge_intellisense_server_impl::handle_goto_def(cpp_intellisense::DocumentPosition const&, cpp_intellisense::goto_mode, cpp_intellisense::GoToDefResponse&, snapshot::snapshot_session_t const&)+752
cpp_intellisense::server_stub::handle_goto_def(msvc::deserializer_t&, msvc::serializer_t&)+272
msvc::base_channel_t::dispatch_message(std::vector<unsigned char, std::allocator<unsigned char>> const&, std::vector<unsigned char, std::allocator<unsigned char>>&)+571
msvc::common_channel_t::perform_call(unsigned int, std::vector<unsigned char, std::allocator<unsigned char>> const&)+66

cpptools-srv
2024/11/12 17:32:18
SIGSEGV
a_region_tracker::build_sections()+982
a_tracking_manager::check_edits(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, bool, bool*, bool*, a_tracked_region**, a_region_scope_info*) const+892
edge::scoped_query_manager::check_and_compile(edge::file_position const&, edge::file_position const&, edge::file_position const&, bool, bool, bool)+899
edge::scoped_query_manager::get_trees_overlapping_span(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, int, edge::tree_query_result_builder*)+173
edge::intellisense_operation::symbol_at_cursor(bool, edge::macro_invocation_info*)+193
std::_Function_handler<void (edge::intellisense_operation&, cpp_intellisense::QuickInfoResponse&), edge_intellisense_server_impl::handle_quick_info(cpp_intellisense::DocumentPosition const&, int, cpp_intellisense::QuickInfoResponse&, snapshot::snapshot_session_t const&)::{lambda(edge::intellisense_operation&, cpp_intellisense::QuickInfoResponse&)#1}>::_M_invoke(std::_Any_data const&, edge::intellisense_operation&, cpp_intellisense::QuickInfoResponse&)+151
void edge_intellisense_operation::perform_isense_operation<cpp_intellisense::QuickInfoResponse>(char const*, edge::file_position const&, std::function<void (edge::intellisense_operation&, cpp_intellisense::QuickInfoResponse&)>&&, cpp_intellisense::QuickInfoResponse&, snapshot::snapshot_session_t const&, bool)+342
edge_intellisense_server_impl::handle_quick_info(cpp_intellisense::DocumentPosition const&, int, cpp_intellisense::QuickInfoResponse&, snapshot::snapshot_session_t const&)+625
cpp_intellisense::server_stub::handle_quick_info(msvc::deserializer_t&, msvc::serializer_t&)+313
msvc::base_channel_t::dispatch_message(std::vector<unsigned char, std::allocator<unsigned char>> const&, std::vector<unsigned char, std::allocator<unsigned char>>&)+571
msvc::common_channel_t::perform_call(unsigned int, std::vector<unsigned char, std::allocator<unsigned char>> const&)+66

cpptools-srv
2024/11/12 17:32:37
SIGSEGV
a_region_tracker::build_sections()+982
a_tracking_manager::check_edits(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, bool, bool*, bool*, a_tracked_region**, a_region_scope_info*) const+892
edge::scoped_query_manager::check_and_compile(edge::file_position const&, edge::file_position const&, edge::file_position const&, bool, bool, bool)+899
edge::scoped_query_manager::update_fragment(edge::file_position const&, edge::file_position const&, edge::file_position const&, edge::update_fragment_options const&)+51
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<msvc::offset_traits<msvc::offset_tag_t>>*, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>*, an_array_list<edge::update_range_action*, std::allocator<edge::update_range_action*>> const&, edge::query_action_data&)+1209
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<msvc::offset_traits<msvc::offset_tag_t>>*, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>*, an_array_list<edge::update_range_action*, std::allocator<edge::update_range_action*>> const&, edge::query_action_data&)+119
edge_intellisense_server_impl::update_range(std::shared_ptr<edge::translation_unit> const&, char const*, edge::update_range_options, snapshot::snapshot_session_t const&, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>&, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>&)+524
edge_intellisense_server_impl::handle_update_intellisense(cpp_intellisense::UpdateIntelliSenseRequest const&, cpp_intellisense::UpdateIntelliSenseResponse&, snapshot::snapshot_session_t const&)+521
cpp_intellisense::server_stub::handle_update_intellisense(msvc::deserializer_t&, msvc::serializer_t&)+292
msvc::base_channel_t::dispatch_message(std::vector<unsigned char, std::allocator<unsigned char>> const&, std::vector<unsigned char, std::allocator<unsigned char>>&)+571
msvc::common_channel_t::perform_call(unsigned int, std::vector<unsigned char, std::allocator<unsigned char>> const&)+66

cpptools-srv
2024/11/12 17:41:40
SIGSEGV
a_region_tracker::build_sections()+982
a_tracking_manager::check_edits(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, bool, bool*, bool*, a_tracked_region**, a_region_scope_info*) const+892
edge::scoped_query_manager::check_and_compile(edge::file_position const&, edge::file_position const&, edge::file_position const&, bool, bool, bool)+899
edge::scoped_query_manager::get_trees_overlapping_span(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t>>, int, edge::tree_query_result_builder*)+173
edge::intellisense_operation::symbol_at_cursor(bool, edge::macro_invocation_info*)+193
std::_Function_handler<void (edge::intellisense_operation&, cpp_intellisense::QuickInfoResponse&), edge_intellisense_server_impl::handle_quick_info(cpp_intellisense::DocumentPosition const&, int, cpp_intellisense::QuickInfoResponse&, snapshot::snapshot_session_t const&)::{lambda(edge::intellisense_operation&, cpp_intellisense::QuickInfoResponse&)#1}>::_M_invoke(std::_Any_data const&, edge::intellisense_operation&, cpp_intellisense::QuickInfoResponse&)+151
void edge_intellisense_operation::perform_isense_operation<cpp_intellisense::QuickInfoResponse>(char const*, edge::file_position const&, std::function<void (edge::intellisense_operation&, cpp_intellisense::QuickInfoResponse&)>&&, cpp_intellisense::QuickInfoResponse&, snapshot::snapshot_session_t const&, bool)+342
edge_intellisense_server_impl::handle_quick_info(cpp_intellisense::DocumentPosition const&, int, cpp_intellisense::QuickInfoResponse&, snapshot::snapshot_session_t const&)+625
cpp_intellisense::server_stub::handle_quick_info(msvc::deserializer_t&, msvc::serializer_t&)+313
msvc::base_channel_t::dispatch_message(std::vector<unsigned char, std::allocator<unsigned char>> const&, std::vector<unsigned char, std::allocator<unsigned char>>&)+571
msvc::common_channel_t::perform_call(unsigned int, std::vector<unsigned char, std::allocator<unsigned char>> const&)+66

Activity

  1. x1ntt commented on Nov 12, 2024

    @x1ntt
    Author

    In addition, I would like to ask by the way that there are multiple executable files in my project, so I wrote multiple configurations (such as game and cnet in the configuration file above), but when I edit the code files of the two modules, the configuration does not switch. Is there a way to switch automatically? Or how to configure auto-completion and reference search for multiple executable files in the project?

  2. sean-mcmanus commented on Nov 12, 2024

    @sean-mcmanus
    Contributor

    星途 (@x1ntt) You can use a multi-root workspace, one workspace folder for each executable and each workspace folder can have a different configuration.

  3. sean-mcmanus commented on Nov 12, 2024

    @sean-mcmanus
    Contributor

    星途 (@x1ntt) We're aware of that crash, although the additional crash data might help us. We were tracking it with #12666, but we believe there are multiple causes of the build_sections crash, so we can keep both issues open.

  4. sean-mcmanus commented on Nov 12, 2024

    @sean-mcmanus
    Contributor

    星途 (@x1ntt) I'm not sure how you can configure your OS to stop logging crashes dumps. Our extension isn't creating though dmp files (although cpptools-srv is crashing). You can delete the dmp files.

    Are you able to find a sample repro code that repros the issue you can share with us?

  5. x1ntt commented on Nov 13, 2024

    @x1ntt
    Author

    @x1ntt I'm not sure how you can configure your OS to stop logging crashes dumps. Our extension isn't creating though dmp files (although cpptools-srv is crashing). You can delete the dmp files.

    Are you able to find a sample repro code that repros the issue you can share with us?

    Setting the process to generate core is used to track bugs in our project. It is an accident to collect the core of cpptools-srv, but maybe it will be helpful? If there is any information that needs to be obtained from the core, I can provide help (such as specific stack, specific heap variables), can you give me a debug version of cpptools-srv with symbol information, or tell me how to build cpptools-srv (I hope this is cpp development), I can reproduce it 100% here (in fact, it has crashed dozens of times just a while ago, just clicking randomly or waiting for it to analyze the project), but I can't provide the core file (the project I maintain is not open source, nor does it belong to me, the core file may contain the project structure).

    For example, how is cpptools-srv started? I can execute ulimit -c 0 before its startup script or parent process starts to suppress the generation of core

    I will try to reproduce it using open source projects on my own personal computer, and pay attention to possible clues in existing projects. I will feedback here, or #12666 is also OK.

  6. x1ntt commented on Nov 13, 2024

    @x1ntt
    Author

    Sean McManus (@sean-mcmanus) Note: Although version 1.20.0 also crashes, it can completely scan my project, while 1.23.1 can't even completely scan the project

  7. x1ntt commented on Nov 21, 2024

    @x1ntt
    Author

    Sean McManus (@sean-mcmanus)
    I found a way to reproduce the crash 100% of the time
    Trigger by building https://github.com/yanwei1983/luatinkerE/tree/cxx20

    Here are the steps

    • clone code git clone git@github.com:yanwei1983/luatinkerE.git
    • Close vscode, reopen it, and open the project directory
    • Download version 5.3.4 from https://www.lua.org/ftp/, https://www.lua.org/ftp/lua-5.3.4.tar.gz
    • Unzip lua-5.3.4.tar.gz, unzip it to the luatinkerE/lua folder, and delete src/lua.c and src/luac.c
    • Modify CMakeLists.txt to the following content
    cmake_minimum_required(VERSION 3.8)
    project(luatinkerE)
    
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g ")
    
    include(CheckCXXCompilerFlag)
    
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
    #add_compile_options("-fno-limit-debug-info")
    
    include_directories(lua/src luatinkere tests)
    
    aux_source_directory(luatinkere cur_src)
    aux_source_directory(tests cur_src)
    aux_source_directory(lua/src cur_src)
    
    
    link_directories(${CMAKE_CURRENT_SOURCE_DIR}/lua/src)
    
    add_executable(test_runner ${cur_src})
    target_link_libraries(test_runner dl)
    #target_link_libraries(test_runner liblua.a dl)
    
    • mkdir build, cd build, cmake .., make -j90
    • Found code errors, fixed them, and recompiled
    • You can see cpp-tools crashing at this point
    • When clicking on a variable name in lua_tinker.h, IntelliSense process crash detected: handle_update_intellisense or handle_reference_highlight, handle_completion will appear

    I didn't know where the key steps were, so I recorded a video (there were a lot of invalid operations, I was a little nervous :(

    cpptool_crash.mp4

    The following are the relevant software versions

    Version: 1.92.2 (system setup)
    Submit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
    Date: 2024-08-14T17:29:30.058Z
    Electron: 30.1.2
    ElectronBuildId: 9870757
    Chromium: 124.0.6367.243
    Node.js: 20.14.0
    V8: 12.4.254.20-electron.0
    
    
    OS: Windows_NT x64 10.0.22631
    Local system: windows11
    cpp_tools: v1.23.1 (pre-release)
    Remote - SSH: v0.115.1
    Remote os: Rockylinux9.1 
    gcc: 11.4.1 20231218 (Red Hat 11.4.1-3) (GCC) 

    The stack shown in the video

    cpptools-srv
    2024/11/20 22:11:31
    SIGSEGV
    compare_expressions(an_expr_node*, an_expr_node*, int)+2124
    compare_constants(a_constant*, a_constant*, int)+3424
    compare_constants(a_constant*, a_constant*, int)+2885
    equiv_template_arg_lists(a_template_arg*, a_template_arg*, int)+843
    hash_find(a_hash_table*, void*, int)+120
    …
    find_template_class(a_symbol*, a_template_arg**, int, a_symbol*, int, int, int)+19
    coalesce_template_class_reference(a_symbol*, long long, int*)+2787
    …
    f_is_generalized_identifier_start(long long, a_type*)+2544
    decl_specifiers(unsigned long, a_decl_parse_state*, a_decl_pos_block*)+18493
    type_name_full(a_decl_parse_state*)+252
    …
    …
    find_template_class(a_symbol*, a_template_arg**, int, a_symbol*, int, int, int)+19
    coalesce_template_class_reference(a_symbol*, long long, int*)+2787
    …
    f_is_generalized_identifier_start(long long, a_type*)+2544
    decl_specifiers(unsigned long, a_decl_parse_state*, a_decl_pos_block*)+18493
    type_name_full(a_decl_parse_state*)+252
    …
    …
    find_template_class(a_symbol*, a_template_arg**, int, a_symbol*, int, int, int)+19
    coalesce_template_class_reference(a_symbol*, long long, int*)+2787
    …
    f_is_generalized_identifier_start(long long, a_type*)+9502
    …
    …
    scan_dependent_type_parenthesized_initializer(an_init_state*, an_init_component*)+685
    …
    …
    ctor_initializer(a_routine*, int, int)+12331
    scan_function_body(a_routine*, a_func_info_block*, unsigned long, a_macro_arg_fixup**, a_macro_arg_fixup**)+4860
    function_prototype_instantiation(a_symbol*)+681
    …
    process_deferred_class_fixups_and_instantiations(int)+107
    …
    template_or_specialization_declaration_full(a_tmpl_decl_state*, int, a_decl_parse_state*)+5603
    …
    template_directive_or_declaration(a_token_kind*, int, a_source_position*)+229
    scan_nonmember_declaration(a_decl_parse_state*, a_source_range*)+6714
    …
    …
    scan_nonmember_declaration(a_decl_parse_state*, a_source_range*)+9443
    …
    …
    scan_nonmember_declaration(a_decl_parse_state*, a_source_range*)+9443

    I'm not sure if this is the same reason as the issue I raised, maybe it can help : )

  8. x1ntt commented on Nov 25, 2024

    @x1ntt
    Author

    Another stack

    cpptools-srv
    2024/11/25 03:59:57
    SIGSEGV
    decl_specifiers(unsigned long, a_decl_parse_state*, a_decl_pos_block*)+4777
    …
    template_or_specialization_declaration_full(a_tmpl_decl_state*, int, a_decl_parse_state*)+1133
    …
    template_directive_or_declaration(a_token_kind*, int, a_source_position*)+229
    scan_nonmember_declaration(a_decl_parse_state*, a_source_range*)+6714
    declaration(int, int, int, int, a_param_id*, a_source_range*, a_decl_parse_state*)+151
    …
    before_tu_wrapup()+866
    process_translation_unit(char const*, int, an_exported_template_file*)+641
    cfe_main(int, char**)+121
    cfe_main_exception_handler(int, char**)+13
    edg_main(int, char**)+13
    …
    edge_compiler_main(int, char const**)+104
    a_compiler_thread::compiler_thread_routine(a_compiler_thread*)+190

    I didn't notice how this crashed, but the output of C/C++ contains the following two records

    IntelliSense process crash detected: handle_signature_help
    IntelliSense process crash detected: handle_contains
  9. x1ntt commented on Nov 28, 2024

    @x1ntt
    Author

    Sean McManus (@sean-mcmanus) Bob Brown (@bobbrow)

    I saw your question(#12999 (comment)), and I changed the environment again to try to reproduce (wsl2 Ubuntu 22.04.4/gcc version 11.4.0/others are the same), and I still couldn't reproduce it.
    But I installed a clean Rockylinux9.5 (https://rockylinux.org/zh-CN/download) environment (gcc version 11.5.0 20240719) through the virtual machine, and reproduced it according to the following steps. Maybe it is easier to reproduce on rockylinux?

    1. The vscode on win11 remotely connects to the newly installed rockylinux9.5 in the virtual machine through remove-ssh
    2. In the vscode terminal, git clone https://github.com/yanwei1983/luatinkerE. And wget https://www.lua.org/ftp/lua-5.3.4.tar.gz, unzip it to luatinkerE/lua, and delete lua/src/lua.c and lua/src/luac.c
    3. Replace the content of luatinkerE/CMakeLists.txt with the following cmakelist.txt
    cmake_minimum_required(VERSION 3.8)
    project(luatinkerE)
    
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g ")
    
    include(CheckCXXCompilerFlag)
    
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
    #add_compile_options("-fno-limit-debug-info")
    
    include_directories(lua/src luatinkere tests)
    
    aux_source_directory(luatinkere cur_src)
    aux_source_directory(tests cur_src)
    aux_source_directory(lua/src cur_src)
    
    link_directories(${CMAKE_CURRENT_SOURCE_DIR}/lua/src)
    
    add_executable(test_runner ${cur_src})
    target_link_libraries(test_runner dl)
    #target_link_libraries(test_runner liblua.a dl)
    1. mkdir build; cmake ..; make -j8
    2. ** (Maybe this is the key point?) At this time, an error will appear. Hold down ctrl and click the corresponding error file path in the gcc error output to open the wrong header file in the editor and correct the error (indx->index)**
    3. Click on the variable definition nearby at random, and you should be able to observe the error at this time

    Similarly, a reproduction video is attached

    cpptool_crash2.mp4
    版本: 1.92.2 (system setup)
    提交: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
    日期: 2024-08-14T17:29:30.058Z
    Electron: 30.1.2
    ElectronBuildId: 9870757
    Chromium: 124.0.6367.243
    Node.js: 20.14.0
    V8: 12.4.254.20-electron.0
    OS: Windows_NT x64 10.0.22631
    
    C/C++ v1.23.1 (pre-release)
    Remote - SSH v0.115.1
    A C/C++ extension process has crashed. The crashing process name, date/time, signal, and call stack are below -- it would be helpful to include that in a bug report at https://github.com/Microsoft/vscode-cpptools/issues.
    
    cpptools-srv
    2024/11/28 10:37:24
    SIGSEGV
    compare_expressions(an_expr_node*, an_expr_node*, int)+2124
    compare_constants(a_constant*, a_constant*, int)+3424
    compare_constants(a_constant*, a_constant*, int)+2885
    equiv_template_arg_lists(a_template_arg*, a_template_arg*, int)+843
    hash_find(a_hash_table*, void*, int)+120
    …
    find_template_class(a_symbol*, a_template_arg**, int, a_symbol*, int, int, int)+19
    coalesce_template_class_reference(a_symbol*, long long, int*)+2787
    …
    f_is_generalized_identifier_start(long long, a_type*)+2544
    decl_specifiers(unsigned long, a_decl_parse_state*, a_decl_pos_block*)+18493
    type_name_full(a_decl_parse_state*)+252
    …
    …
    find_template_class(a_symbol*, a_template_arg**, int, a_symbol*, int, int, int)+19
    coalesce_template_class_reference(a_symbol*, long long, int*)+2787
    …
    f_is_generalized_identifier_start(long long, a_type*)+2544
    decl_specifiers(unsigned long, a_decl_parse_state*, a_decl_pos_block*)+18493
    type_name_full(a_decl_parse_state*)+252
    …
    …
    find_template_class(a_symbol*, a_template_arg**, int, a_symbol*, int, int, int)+19
    coalesce_template_class_reference(a_symbol*, long long, int*)+2787
    …
    f_is_generalized_identifier_start(long long, a_type*)+9502
    …
    …
    scan_dependent_type_parenthesized_initializer(an_init_state*, an_init_component*)+685
    …
    …
    ctor_initializer(a_routine*, int, int)+12331
    scan_function_body(a_routine*, a_func_info_block*, unsigned long, a_macro_arg_fixup**, a_macro_arg_fixup**)+4860
    function_prototype_instantiation(a_symbol*)+681
    …
    process_deferred_class_fixups_and_instantiations(int)+107
    …
    template_or_specialization_declaration_full(a_tmpl_decl_state*, int, a_decl_parse_state*)+5603
    …
    template_directive_or_declaration(a_token_kind*, int, a_source_position*)+229
    scan_nonmember_declaration(a_decl_parse_state*, a_source_range*)+6714
    …
    …
    scan_nonmember_declaration(a_decl_parse_state*, a_source_range*)+9443
    …
    …
    scan_nonmember_declaration(a_decl_parse_state*, a_source_range*)+9443
    

    Please let me know if you need any further help

  10. 3 remaining items

  11. moved this from Todo to No status in cpptoolson Jan 10, 2025
  12. Hydrophos commented on Jan 23, 2025

    @Hydrophos

    Encountered the same issue today, and downgrading to v1.21.6 seems to be a valid temporary bypass.

  13. x1ntt commented on Jan 23, 2025

    @x1ntt
    Author

    I was able to reproduce and reduce the compare_expressions crash and opened a bug for our front-end compiler (EDG) to investigate. 2341984

    It is a result of this line (included from somewhere in <utility>): using make_integer_sequence = integer_sequence<_Tp, __integer_pack(_Tp(_Num))...>;

    on Ubuntu this line is: using make_integer_sequence = integer_sequence<_Tp, __integer_pack(_Num)...>;

    If you are able to reliably get a repro for the a_region_tracker::build_sections() we would still be interested in that.

    In addition to the stack information in the Output tab, is there any other information I can see? For example, logs?Or gdb debugger?
    What is a_region_tracker::build_sections() used for? How can I deliberately make it execute this function? My intranet project can easily trigger this problem in 1.23.1. I will try to build a project in the intranet to reproduce it.

  14. bobbrow commented on Jan 23, 2025

    @bobbrow
    Contributor

    The region tracker's job is to keep track of edits in the file so that we can update IntelliSense incrementally instead of having to recompile the whole file for every edit. I think it makes it harder to reliably reproduce the problem because the order and location of the edits, the IntelliSense commands, and the contents of the file are all important.

    In your original post you show that a core dump was saved. Do you still have it and do you have a way to share it with us? But if there is proprietary code in your workspace, we cannot look at it because some of that information may be stored in the core dump.

  15. x1ntt commented on Jan 24, 2025

    @x1ntt
    Author

    This is a closed source project, and the core contains code information, so I can't provide the core, sorry. I can easily trigger the build_sections error.
    Just wait for the scan to complete and click on the code to get ten cores immediately. Their contents are all as follows

    Thread 1 (LWP 79295):
    #0  0x00007fc62a9655fe in __restore_sigs () from ./libc.so
    #1  0x00007fc62a965778 in raise () from ./libc.so
    #2  0x0000000000d521ef in (anonymous namespace)::reraise_signal(int, crash_handler_data_t*) ()
    #3  0x0000000000d52435 in crash_handler(int, siginfo_t*, void*) ()
    #4  <signal handler called>
    #5  0x00007fc62a96f98d in memcpy () from ./libc.so
    #6  0x00000000007b56b4 in a_region_tracker::build_sections(std::vector<a_boundary_point_template<a_tracked_region>, std::allocator<a_boundary_point_template<a_tracked_region> > >) ()
    #7  0x00000000007b7576 in a_region_tracker::build_sections() ()
    #8  0x00000000007b7b0c in a_tracking_manager::check_edits(a_canonicalized_file_name, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >, bool, bool*, bool*, a_tracked_region**, a_region_scope_info*) const ()
    #9  0x0000000000743f03 in edge::scoped_query_manager::check_and_compile(edge::file_position const&, edge::file_position const&, edge::file_position const&, bool, bool, bool) ()
    #10 0x00000000007444a3 in edge::scoped_query_manager::update_fragment(edge::file_position const&, edge::file_position const&, edge::file_position const&, edge::update_fragment_options const&) ()
    #11 0x0000000000744c39 in 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<msvc::offset_traits<msvc::offset_tag_t> >*, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >*, an_array_list<edge::update_range_action*, std::allocator<edge::update_range_action*> > const&, edge::query_action_data&) ()
    #12 0x0000000000745ac7 in 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<msvc::offset_traits<msvc::offset_tag_t> >*, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >*, an_array_list<edge::update_range_action*, std::allocator<edge::update_range_action*> > const&, edge::query_action_data&) ()
    #13 0x000000000068a28c in edge_intellisense_server_impl::update_range(std::shared_ptr<edge::translation_unit> const&, char const*, edge::update_range_options, snapshot::snapshot_session_t const&, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >&, msvc::strong_typedef<msvc::offset_traits<msvc::offset_tag_t> >&) ()
    #14 0x00000000006a87f9 in edge_intellisense_server_impl::handle_update_intellisense(cpp_intellisense::UpdateIntelliSenseRequest const&, cpp_intellisense::UpdateIntelliSenseResponse&, snapshot::snapshot_session_t const&) ()
    #15 0x0000000000710ee4 in cpp_intellisense::server_stub::handle_update_intellisense(msvc::deserializer_t&, msvc::serializer_t&) ()
    #16 0x00000000006b12cb in msvc::base_channel_t::dispatch_message(std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, std::allocator<unsigned char> >&) ()
    #17 0x0000000000daa1d2 in msvc::common_channel_t::perform_call(unsigned int, std::vector<unsigned char, std::allocator<unsigned char> > const&) ()
    #18 0x0000000000dfc2fc in worker ()
    #19 0x00007fc62a9715ef in start () from ./libc.so
    #20 0x00007fc62a973af2 in __clone () from ./libc.so
    #21 0x0000000000000000 in ?? ()
    (gdb) 
    

    Although I can't provide the core file, I can debug it. If you can, you can tell me what variable information you need and what to focus on. I can leave my contact information so that I can tell you the results immediately (I am looking forward to the answer to this question and the fix of this problem. My discord username is x1nt, My time is GMT+8)


    In addition, other crashes were triggered during the reproduction process.

    (gdb) bt
    #0  0x00007f3541cc15fe in __restore_sigs () from ./libc.so
    #1  0x00007f3541cc1778 in raise () from ./libc.so
    #2  0x0000000000d59b5f in (anonymous namespace)::reraise_signal(int, crash_handler_data_t*) ()
    #3  0x0000000000d59da5 in crash_handler(int, siginfo_t*, void*) ()
    #4  <signal handler called>
    #5  0x00007f3541c9d41e in get_meta () from ./libc.so
    #6  0x00007f3541c9d7b7 in __libc_free () from ./libc.so
    #7  0x0000000000e08e5d in uv_run ()
    #8  0x0000000000db65c3 in msvc::loop_t::run_loop() ()
    #9  0x0000000000db7818 in msvc::thread_t::invoker_t<void (*)(std::shared_ptr<msvc::loop_t>), std::shared_ptr<msvc::loop_t>&>::invoke() ()
    #10 0x0000000000e0290c in msvc::thread_helper_t::thread_entry(void*) ()
    #11 0x00007f3541ccd5ef in start () from ./libc.so
    #12 0x00007f3541ccfaf2 in __clone () from ./libc.so
    #13 0x0000000000000000 in ?? ()
    

    wsl-crash-1737710635-94489-home_st.vscode-server_extensions_ms-vscode.cpptools-1.23.4-linux-x64_bin_cpptools-srv-11.dmp.txt
    !!!!! You need to change the suffix of .txt to .7z and then decompress it !!!!

    I don't know how it crashed yet, if necessary I will find out how to reproduce it stably

    ms-vscode.cpptools-1.23.4
    版本: 1.92.2 (system setup)
    提交: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
    日期: 2024-08-14T17:29:30.058Z
    Electron: 30.1.2
    ElectronBuildId: 9870757
    Chromium: 124.0.6367.243
    Node.js: 20.14.0
    V8: 12.4.254.20-electron.0
    OS: Windows_NT x64 10.0.22631

    Use:wsl ubuntu22.04.5

  16. bobbrow commented on Jan 24, 2025

    @bobbrow
    Contributor

    I sent you a friend request on Discord. This is not code that my team is very familiar with, but we can try to gather some details to determine what the next steps are. I will take a look at the WSL dump.

  17. added
    fixedCheck the Milestone for the release in which the fix is or will be available.
    on Feb 11, 2025
  18. sean-mcmanus commented on Feb 12, 2025

    @sean-mcmanus
    Contributor

    An instance of this was fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.24.0 . We're still looking into the root cause and other potentially cases.

    The uv_run crash or other cpptools-srv crashes that repro with C_Cpp.intelliSenseCacheSize not set to 0 is planned to be fixed in our next update (#12668).

  19. sean-mcmanus commented on Apr 3, 2025

    @sean-mcmanus
    Contributor

    星途 (@x1ntt) We fixed the uv_run and build_sections crash with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.24.5, but not the compare_expressions or decl_specifiers crashes -- those 2 crashes are some of our highest remaining IntelliSense process crashes so any additional repro info you could provide would help...not sure if this issue should be closed or remain open to track those other crashes.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServiceVisual StudioInherited from Visual StudiobugfixedCheck the Milestone for the release in which the fix is or will be available.reliability

    Type

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions