Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C/C++ Extension code-tracing features completely stopped working #8295

Closed
TravisLlado opened this issue Oct 18, 2021 · 7 comments
Closed

C/C++ Extension code-tracing features completely stopped working #8295

TravisLlado opened this issue Oct 18, 2021 · 7 comments
Labels
Language Service more info needed The issue report is not actionable in its current state reliability

Comments

@TravisLlado
Copy link

TravisLlado commented Oct 18, 2021

Issue Type: Bug

The C/C++ extension worked fine for over a year, and then two weeks ago code-tracing features completely stopped working

  • suggestions and autocomplete
  • Go to Definition
  • Go to Declaration
  • Go to References
  • onMouseOver descriptions
    all stopped working. They either search forever, returning no results, or they immediately respond with "No definition found for x", "No references found for x". There are no suggestions or autocomplete or onMouseOver response at all.

I can write
bool foo = true;
foo = false;
and if I select GoToDefinition on the second line it will no "No definition found for foo". The extension doesn't work for variables, for methods, for classes, within a single file, across files, anywhere, anytime.

I have VSCode installed on a macbook ssh-ing in to a linux workstation. I'm running VSCode 1.62.0-Insider and C/C++ Extension v1.6.0.

I have:

  • Uninstalled/reinstalled the C/C++ extension. No change.
  • Upgraded to C/C++ v1.7.0, which crashes instantly.
  • Uninstalled/reinstalled VSCode. No change.
  • Uninstalled VSCode Insiders and installed VSCode Regular. No change.
  • Disabled all other extensions. No change.
  • Deleted all the caches I could find and reinstalled everything, after which GoToDefinition and other features worked normally for a few hours, then stopped working again:
    • on my linux workstation
      • rm -r ~/.cache/vscode-cpptools
    • on my mac
      • rm -fr ~/Applications/vscode
      • rm -fr ~/Library/Preferences/vscode
      • rm -fr ~/Library/Caches/vscode
      • rm -fr ~/Library/Application\ Support/Code/
      • rm -fr ~/Library/Saved\ Application\ State/vscode
      • rm -fr ~/.vscode*
        (mac does not have a cpptools cache under home directory because the extension is installed on the remote)

Any recommendations? Any other caches I can delete? Has anyone else seen the extension just completely break down like this, multiple times in a row?

Extension version: 1.7.0
VS Code version: Code - Insiders 1.62.0-insider (Universal) (729d81623815a428160b93e930054a1a2a5403ef, 2021-10-18T05:21:54.840Z)
OS version: Darwin x64 20.6.0
Restricted Mode: No
Remote OS version: Linux x64 4.4.0-213-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 1, 2
Memory (System) 16.00GB (3.13GB free)
Process Argv --crash-reporter-id 0157a282-35a0-4928-be2f-0864763e35ca
Screen Reader no
VM 0%
Item Value
Remote SSH: 10.65.110.188
OS Linux x64 4.4.0-213-generic
CPUs Intel(R) Xeon(R) Gold 6226R CPU @ 2.90GHz (4 x 2899)
Memory (System) 62.92GB (8.80GB free)
VM 100%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30291494
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30291487
pythontb:30258533
vsc_aa:30263845
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
pythonvsuse255:30319630
vscod805:30301674
pythonvspyt200:30323110
vsccppwt:30382699
pythonvssor306:30340298
bridge0708:30335490
pygetstartedt2:30353727
bridge0723:30353136
pythonrunftest32:30365365
pythonf5test824:30361779
javagetstartedt:30350119
pythonvspyt187:30365360
pydsgst2:30361790
vsqsis200cf:30381675
vsaa593:30376534

@TravisLlado TravisLlado changed the title C/C++ Extension code-analysis features completely stopped working C/C++ Extension code-tracing features completely stopped working Oct 18, 2021
@michelleangela
Copy link
Contributor

@TravisLlado
If there is logging that shows the cpptools process or language server process is crashing, then none of the IntelliSense features (autocomplete, references, etc) will work.

Extension version 1.7.1 was just release that has some fixes to some crashes. Could you try installing that version?

Also in order to delete or reset the IntelliSense database cache, use the command C/C++: Reset IntelliSense Database.

@michelleangela
Copy link
Contributor

@TravisLlado
If the cpptools-srv is crashing, could you try attaching the debugger to the cpptools-srv process to get callstacks? See Linux section of https://github.com/microsoft/vscode-cpptools/wiki/Attaching-debugger-to-cpptools-or-cpptools%E2%80%90srv for instructions.

For getting the callstack during the repro:

  1. First comment out the source code that's causing the crash.
  2. Then attach the debugger to the cpptools-srv process.
  3. Then uncomment the source code to reproduce the crash.

@michelleangela michelleangela added the more info needed The issue report is not actionable in its current state label Oct 21, 2021
@TravisLlado
Copy link
Author

TravisLlado commented Oct 22, 2021 via email

@sean-mcmanus
Copy link
Collaborator

@TravisLlado That is normal logging. It's tag parsing files in your workspace. You can add paths to C_Cpp.files.exclude if you don't want them parsed (or remove the folders from the C_Cpp.default.browse.path or the equivalent setting in c_cpp_properties.json). You can also click the database icon in the status bar and choose to Pause Workspace Parsing. Do you think there's something abnormal going on still?

@xubaotian
Copy link

xubaotian commented Nov 8, 2021

version 1.71
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000592a52 in edge_intellisense_server_impl::add_goto_def_entries(cpp_intellisense::GoToDefResponse&, edge::symbol*, edge_listedge::symbol*&, cpp_intellisense::goto_mode, snapshot::snapshot_session_t) ()
[Current thread is 1 (LWP 111749)]
(gdb) bt
#0 0x0000000000592a52 in edge_intellisense_server_impl::add_goto_def_entries(cpp_intellisense::GoToDefResponse&, edge::symbol*, edge_listedge::symbol*&, cpp_intellisense::goto_mode, snapshot::snapshot_session_t) ()
#1 0x0000000000592036 in edge_intellisense_server_impl::handle_goto_def(cpp_intellisense::DocumentPosition const&, cpp_intellisense::goto_mode, cpp_intellisense::GoToDefResponse&)::{lambda(edge::intellisense_operation&, cpp_intellisense::GoToDefResponse&)#1}::operator()(edge::intellisense_operation&, cpp_intellisense::GoToDefResponse&) const ()
#2 0x0000000000590b92 in void edge_intellisense_operation::perform_isense_operation_helper<cpp_intellisense::GoToDefResponse>(char const*, edge::intellisense_operation&, cpp_intellisense::DocumentPosition const&, std::function<void (edge::intellisense_operation&, cpp_intellisense::GoToDefResponse&)>, cpp_intellisense::GoToDefResponse&, edge::allocator*, snapshot::snapshot_session_t) ()
#3 0x000000000059018b in void edge_intellisense_operation::perform_isense_operation<cpp_intellisense::GoToDefResponse>(char const*, cpp_intellisense::DocumentPosition const&, std::function<void (edge::intellisense_operation&, cpp_intellisense::GoToDefResponse&)>, cpp_intellisense::GoToDefResponse&, snapshot::snapshot_session_t, bool, edge::allocator*) ()
#4 0x0000000000585bd2 in edge_intellisense_server_impl::handle_goto_def(cpp_intellisense::DocumentPosition const&, cpp_intellisense::goto_mode, cpp_intellisense::GoToDefResponse&) ()
#5 0x00000000005b165d in cpp_intellisense::server_stub::handle_goto_def(msvc::deserializer_t&, msvc::serializer_t&) ()
#6 0x00000000005bfb00 in msvc::base_channel_t::dispatch_message(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&) ()
#7 0x0000000000a53263 in msvc::common_channel_t::perform_call(unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) ()
#8 0x0000000000aa8f25 in worker ()
#9 0x00007f2320c686ba in ?? ()
#10 0x0000000000000000 in ?? ()

@sean-mcmanus
Copy link
Collaborator

@xubaotian That call stack is a duplicate of #8337 which will have the fix available in our next insiders release (probably next week or early the following week).

I don't have enough info from @TravisLlado to determine if that's the same issue or not.

@github-actions
Copy link

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

@michelleangela michelleangela removed their assignment Jan 12, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Language Service more info needed The issue report is not actionable in its current state reliability
Projects
None yet
Development

No branches or pull requests

4 participants