microsoft / microsoft/vscode-cpptools

LS/cpptool generating core dump files everytime compilation fails

Open
#8,442 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug investigate: repro Language Service reliability
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Bug type: Language Service

Might be related to https://github.com/microsoft/vscode-cpptools/issues/8436

Describe the bug

  • OS and Version: Windows 10
  • VS Code Version: 1.62
  • C/C++ Extension Version: 1.7.1
  • Other extensions you installed (and if the issue persists after disabling them): reproductible with no other extensions
  • If using SSH remote, specify OS of remote machine: Linux Suse
  • A clear and concise description of what the bug is : LS/cpptool generating core dump files everytime compilation fails, which are about ~1 Gb each.

Steps to reproduce

  1. Open a C++ (remote) project on ssh
  2. add some illegal code so the compilation will fail
  3. attempt to build the project
  4. see the generated core-dump file

FYI, Intellisense is in linux-gcc-x64 mode

$> ls -latrhH
-rw-------  1 gdua xxxx 801M Nov 25 11:09 core.47122
-rw-------  1 gdua xxxx 801M Nov 25 11:11 core.47175
drwxr-xr-x 13 gdua xxxx 1.1K Nov 25 11:11 .
-rw-------  1 gdua xxxx 801M Nov 25 11:11 core.47198

Expected behavior
No core-dump file generated

  • Code sample
// some valid code

THIS IS NOT VALID SYNTAX AND WILL MAKE THE COMPILATION FAIL

// some valid code
  • Configurations in c_cpp_properties.json

  • Logs from running C/C++: Log Diagnostics from the VS Code command palette

Cannot share everything, but :

Translation Unit Mappings:
[ /path/to/source.cpp]:
    /path/to/source.cpp
    /path/to/source.h
Translation Unit Configurations:
[ /path/to/source.cpp ]: not ready
    Process ID: 47642
    Memory Usage: 57 MB
    Compiler Path: /path/to/toolchain/bin/g++
    Includes:

where /path/to/source.cpp is the file in which the illegale syntax was added on purpose.

IntelliSense process crash detected.
IntelliSense process crash detected.
IntelliSense process crash detected.
IntelliSense process crash detected.
uv_read_cb failed with nread = -104
IntelliSense process crash detected.
IntelliSense process crash detected.
IntelliSense process crash detected.
IntelliSense process crash detected.
IntelliSense process crash detected.
IntelliSense process crash detected.

Screenshots

Additional context

objdump -s of core-file note0 section looks like :

/path/to/core.42128:     file format elf64-x86-64

Contents of section note0:
 0000 05000000 50010000 01000000 434f5245  ....P.......CORE
 ...
 01a0 63707074 6f6f6c73 2d737276 00000000  cpptools-srv....
 01b0 2f72656d 6f74652f 75736572 732f6764  /remote/users/gd
 01c0 75612f2e 7673636f 64652d73 65727665  ua/.vscode-serve
 01d0 722f6578 74656e73 696f6e73 2f6d732d  r/extensions/ms-
 01e0 7673636f 64652e63 7070746f 6f6c732d  vscode.cpptools-
 01f0 312e372e 312f6269 6e2f6370 70746f00  1.7.1/bin/cppto.
 0200 05000000 80000000 49474953 434f5245  ........IGISCORE
 ...
 02a0 434f5245 00000000 21000000 00000000  CORE....!.......

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure in a remote Linux project using the illegal C++ syntax and inspect the reported cpptools-srv IntelliSense crashes and generated core files. Start with the language-server logs and the core-file details in the issue. Done means failed compilation no longer generates repeated large core dumps and IntelliSense remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, vscode
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.