Skip to content

SIGABRT when invoking completion #6271

Description

@ryanpholt

Hi,

I noticed that completion wasn't working in a specific file. I attached gdb to cpptools-srv and the problem is that it is crashing with SIGABRT.

Thread 4 "cpptools-srv" received signal SIGABRT, Aborted.
[Switching to Thread 0x7f942fc71700 (LWP 39310)]
0x00007f9430cd97bb in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt 15
#0  0x00007f9430cd97bb in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x0000000000000000 in ?? ()

The stack is not useful and so I tried again with 'catch throw' and got this:

Thread 5 "cpptools-srv" hit Catchpoint 2 (exception thrown), 0x0000000000a3556e in __cxa_throw ()
(gdb) bt 10
#0  0x0000000000a3556e in __cxa_throw ()
#1  0x000000000056463f in std::__throw_length_error(char const*) ()
#2  0x00000000005c017f in edge::scope_entry::compute_types() const ()
#3  0x00000000005bfe34 in edge::scope_entry::ensure_types() const ()
#4  0x000000000060058b in get_immediate_members_of_scope(edge::scope_entry*, edge::list<edge::symbol*>*, bool, bool, bool) ()
#5  0x00000000005ff3cd in get_scope_member_list(edge::scope_entry*, edge::list<edge::symbol*>*, edge::list<edge::symbol*>*, edge::list<edge::symbol*>*, edge::list<edge::symbol*>*, edge::list<edge::namespace_symbol*>*, bool, bool, bool, bool) ()
#6  0x00000000005febac in edge::intellisense_operation::get_auto_complete_members(edge::member_selection_entry*&, edge::scope_entry*&, edge::list<edge::symbol*>*, edge::list<edge::symbol*>*, edge::list<edge::symbol*>*, edge::list<edge::symbol*>*, edge::intellisense_operation::member_list_kind, bool, bool&, bool&, bool&) ()
#7  0x00000000005ff751 in edge::intellisense_operation::get_auto_complete_members(edge::member_selection_entry*&, edge::scope_entry*&, edge::list<edge::symbol*>*, edge::list<edge::symbol*>*, edge::list<edge::symbol*>*, edge::list<edge::symbol*>*, edge::intellisense_operation::member_list_kind) ()
#8  0x0000000000596fb2 in std::_Function_handler<void (edge::intellisense_operation&, bool&), edge_intellisense_server_impl::handle_completion(microsoft::cpp::intellisense::CompletionRequest const&)::{lambda(edge::intellisense_operation&, bool&)#2}>::_M_invoke(std::_Any_data const&, edge::intellisense_operation&, bool&) ()
#9  0x0000000000595c70 in void edge_intellisense_operation::perform_isense_operation<bool>(char const*, microsoft::cpp::intellisense::DocumentPosition const&, std::function<void (edge::intellisense_operation&, bool&)>, bool&, snapshot::snapshot_session_t, bool, edge::allocator*) ()
(More stack frames follow...)
(gdb) continue
Continuing.

Thread 5 "cpptools-srv" received signal SIGABRT, Aborted.
0x00007f72427927bb in ?? () from /lib/x86_64-linux-gnu/libc.so.6

Any idea what is going on here? I can try to provide more information if needed.

Activity

  1. bobbrow commented on Oct 7, 2020

    @bobbrow
    Contributor

    If you could share the output from the "C/C++: Log Diagnostics" command and also the source file that causes the crash, that would be super helpful. These types of crashes are extremely difficult for us to reproduce without source code and configuration information. Bonus points if you can minimize the repro to a small code example. 😉

    Thank you!

  2. ryanpholt commented on Oct 7, 2020

    @ryanpholt
    Author

    Unfortunately, I cannot provide the source file but I seem to have narrowed down the crash to any file which is including "gtest.h" in Google Test. I just wrote a small example which had nothing except:

    #include <gtest/gtest.h>
    #include <string>
    
    std::
    

    Invoking completion after the 'std::' crashes cpptools-srv. If I remove #include <gtest/gtest.h>, relaunch vscode, and invoke completion again, it works.

    I can try to see if I can reproduce this outside of my build environment.

    Here is the output of "C/C++: Log Diagnostics" for the original file that I saw the crash from:

    -------- Diagnostics - 10/7/2020, 6:07:38 PM
    Version: 1.0.1
    Current Configuration:
    {
        "name": "Linux",
        "includePath": [
            "${workspaceFolder}/**"
        ],
        "defines": [],
        "cStandard": "gnu18",
        "compileCommands": "/local-ssd/ryanholt/HomogHoist/compile_commands.json",
        "compilerArgs": [],
        "cppStandard": "c++17",
        "intelliSenseMode": "gcc-x64",
        "browse": {
            "path": [
                "${workspaceFolder}/**"
            ],
            "limitSymbolsToIncludedHeaders": true,
            "databaseFilename": "/local-ssd/ryanholt/HomogHoist/.vscode-cpptools/browse.vc.db"
        }
    }
    Translation Unit Mappings:
    [ /local-ssd/ryanholt/HomogHoist/matlab/src/cgir_xform/unittest/test.cpp ]:
        /local-ssd/ryanholt/HomogHoist/matlab/src/cgir_xform/unittest/test.cpp
    [ /local-ssd/ryanholt/HomogHoist/matlab/derived/glnxa64/src/include/mw_gtest/gtest.hpp ]:
        /local-ssd/ryanholt/HomogHoist/matlab/derived/glnxa64/src/include/mw_gtest/gtest.hpp
    [ /local-ssd/ryanholt/HomogHoist/matlab/src/cgir_xform/dom_core/lowering/scalarize/unittest/tDynamicallyGrowMatrix.cpp ]:
        /local-ssd/ryanholt/HomogHoist/matlab/src/cgir_xform/dom_core/lowering/scalarize/unittest/hScalarization.hpp
    Translation Unit Configurations:
    [ /local-ssd/ryanholt/HomogHoist/matlab/src/cgir_xform/unittest/test.cpp ]:
        Process ID: 14354
        Memory Usage: 0 MB
        Compiler Path: /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/bin/gcc
        Includes:
            /local-ssd/ryanholt/HomogHoist/matlab/src/cgir_xform
            /local-ssd/ryanholt/HomogHoist/matlab/derived/glnxa64/src/include
            /local-ssd/ryanholt/HomogHoist/matlab/src/include
            /local-ssd/ryanholt/HomogHoist/matlab/derived/glnxa64/builtin2_impls/cgir_xform_builtinimpl/builtin1/include
            /local-ssd/ryanholt/HomogHoist/matlab/derived/glnxa64/builtin2_impls/cgir_xform_builtinimpl/builtin1
            /local-ssd/ryanholt/mathworks-hub/3rdparty/R2021a/6224961/glnxa64/boost/include
            /local-ssd/ryanholt/mathworks-hub/3rdparty/R2021a/6224961/glnxa64/cpp11compat/include
            /local-ssd/ryanholt/mathworks-hub/3rdparty/R2020b/5657608/glnxa64/gmp/include
            /local-ssd/ryanholt/mathworks-hub/3rdparty/R2020b/5657608/glnxa64/mpfr/include
            /local-ssd/ryanholt/mathworks-hub/3rdparty/R2020b/5594130/glnxa64/gmock/include/gmock
            /local-ssd/ryanholt/mathworks-hub/3rdparty/R2020b/5594130/glnxa64/gmock/include/gtest
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/include/c++/8.3.0
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/include/c++/8.3.0/x86_64-pc-linux-gnu
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/include/c++/8.3.0/backward
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include-fixed
            /usr/local/include
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/include
            /usr/include/x86_64-linux-gnu
            /usr/include
        Defines:
            BUILDING_CGIR_XFORM
            MX_INTERLEAVED_COMPLEX
            MODULE_VERSION_SYMBOL=libmwcgir_xform_version
            MODULE_DATE_SYMBOL=libmwcgir_xform_build_date
            mw_test_main=main
            NEEDS_MX_ERRWARN_MSG_ID_AND_TXT
            NEEDS_CODECVT_PREALLOCATED_BUFFER
            NEEDS_SL_SERVICES_UNICODE_CONVERSIONS
            NEEDS_ICU_EXT_API
            BOOST_CB_DISABLE_DEBUG
            BOOST_ASIO_DISABLE_EVENTFD
            BOOST_THREAD_FUTURE=unique_future
            BOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT
            BOOST_SPIRIT_THREADSAFE
            PHOENIX_THREADSAFE
            BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
            BOOST_MPL_LIMIT_VECTOR_SIZE=30
            BOOST_MPL_LIMIT_MAP_SIZE=30
            NEEDS_BOOST_UNIQUE_PTR=1
            UNITTESTS_USE_GTEST=1
            UNITTESTS_USE_MW_GTEST=1
            USING_GMOCK=1
            GTEST_MW_USE_MW_NOT_EQUALS=1
            GTEST_LINKED_AS_SHARED_LIBRARY=1
            BUILDING_UNITTEST
            _POSIX_C_SOURCE=199506L
            NEEDS_MW_BUILTIN_MACROS
            MWBOOST=mwboost
            MWBOOST_132=mwboost_132
        Standard Version: c++17
        IntelliSense Mode: gcc-x64
        Other Flags:
            --g++
            --gnu_version=80300
    [ /local-ssd/ryanholt/HomogHoist/matlab/derived/glnxa64/src/include/mw_gtest/gtest.hpp ]:
        Process ID: 14464
        Memory Usage: 11 MB
        Compiler Path: /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/bin/gcc
        Includes:
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/include/c++/8.3.0
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/include/c++/8.3.0/x86_64-pc-linux-gnu
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/include/c++/8.3.0/backward
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include-fixed
            /usr/local/include
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/include
            /usr/include/x86_64-linux-gnu
            /usr/include
        Standard Version: c++17
        IntelliSense Mode: gcc-x64
        Other Flags:
            --g++
            --gnu_version=80300
            --header_only_fallback
    [ /local-ssd/ryanholt/HomogHoist/matlab/src/cgir_xform/dom_core/lowering/scalarize/unittest/tDynamicallyGrowMatrix.cpp ]: not ready
        Process ID: 14491
        Memory Usage: 902 MB
        Compiler Path: /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/bin/gcc
        Includes:
            /local-ssd/ryanholt/HomogHoist/matlab/src/cgir_xform
            /local-ssd/ryanholt/HomogHoist/matlab/derived/glnxa64/src/include
            /local-ssd/ryanholt/HomogHoist/matlab/src/include
            /local-ssd/ryanholt/HomogHoist/matlab/derived/glnxa64/builtin2_impls/cgir_xform_builtinimpl/builtin1/include
            /local-ssd/ryanholt/HomogHoist/matlab/derived/glnxa64/builtin2_impls/cgir_xform_builtinimpl/builtin1
            /local-ssd/ryanholt/mathworks-hub/3rdparty/R2021a/6224961/glnxa64/boost/include
            /local-ssd/ryanholt/mathworks-hub/3rdparty/R2021a/6224961/glnxa64/cpp11compat/include
            /local-ssd/ryanholt/mathworks-hub/3rdparty/R2020b/5657608/glnxa64/gmp/include
            /local-ssd/ryanholt/mathworks-hub/3rdparty/R2020b/5657608/glnxa64/mpfr/include
            /local-ssd/ryanholt/mathworks-hub/3rdparty/R2020b/5594130/glnxa64/gmock/include/gmock
            /local-ssd/ryanholt/mathworks-hub/3rdparty/R2020b/5594130/glnxa64/gmock/include/gtest
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/include/c++/8.3.0
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/include/c++/8.3.0/x86_64-pc-linux-gnu
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/include/c++/8.3.0/backward
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include-fixed
            /usr/local/include
            /mathworks/hub/3rdparty/internal/5566149/glnxa64/gcc-8.3.0/include
            /usr/include/x86_64-linux-gnu
            /usr/include
            /local-ssd/ryanholt/HomogHoist/matlab/src/cgir_xform/dom_core/lowering/scalarize/unittest
        Defines:
            BUILDING_CGIR_XFORM
            MX_INTERLEAVED_COMPLEX
            MODULE_VERSION_SYMBOL=libmwcgir_xform_version
            MODULE_DATE_SYMBOL=libmwcgir_xform_build_date
            mw_test_main=main
            NEEDS_MX_ERRWARN_MSG_ID_AND_TXT
            NEEDS_CODECVT_PREALLOCATED_BUFFER
            NEEDS_SL_SERVICES_UNICODE_CONVERSIONS
            NEEDS_ICU_EXT_API
            BOOST_CB_DISABLE_DEBUG
            BOOST_ASIO_DISABLE_EVENTFD
            BOOST_THREAD_FUTURE=unique_future
            BOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT
            BOOST_SPIRIT_THREADSAFE
            PHOENIX_THREADSAFE
            BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
            BOOST_MPL_LIMIT_VECTOR_SIZE=30
            BOOST_MPL_LIMIT_MAP_SIZE=30
            NEEDS_BOOST_UNIQUE_PTR=1
            UNITTESTS_USE_GTEST=1
            UNITTESTS_USE_MW_GTEST=1
            USING_GMOCK=1
            GTEST_MW_USE_MW_NOT_EQUALS=1
            GTEST_LINKED_AS_SHARED_LIBRARY=1
            BUILDING_UNITTEST
            _POSIX_C_SOURCE=199506L
            NEEDS_MW_BUILTIN_MACROS
            MWBOOST=mwboost
            MWBOOST_132=mwboost_132
        Standard Version: c++17
        IntelliSense Mode: gcc-x64
        Other Flags:
            --g++
            --gnu_version=80300
    Total Memory Usage: 914 MB
    
    ------- Workspace parsing diagnostics -------
    Number of folders and files enumerated: 162614
    Number of files discovered (not excluded): 103294
    
  3. ryanpholt commented on Oct 8, 2020

    @ryanpholt
    Author

    I can't seem to repro it in a small project with google test. I guess I'll report back if/when I am able to.

  4. added
    investigate: reproThis issue's repro steps needs to be investigated/confirmed
    and removed
    more info neededThe issue report is not actionable in its current state
    on Oct 16, 2020
  5. bobbrow commented on Oct 16, 2024

    @bobbrow
    Contributor

    With the latest version of the extension I am unable to reproduce the issue reported in this comment: #6271 (comment), so I will close this issue. If it is still crashing for you, please let us know.

  6. locked and limited conversation to collaborators on Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions