microsoft / microsoft/vscode-cpptools

LS/cpptool generating core dump files everytime compilation fails

Offen
#8,442 15 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug investigate: repro Language Service reliability
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

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....!.......

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere den Fehler in einem entfernten Linux-Projekt mit der ungültigen C++-Syntax und untersuche die gemeldeten IntelliSense-Abstürze von cpptools-srv sowie die erzeugten Core-Dateien. Beginne mit den Language-Server-Logs und den Details zu den Core-Dateien im Issue. Als abgeschlossen gilt die Aufgabe, wenn eine fehlgeschlagene Kompilierung keine wiederholten großen Core-Dumps mehr erzeugt und IntelliSense weiterhin nutzbar bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp, vscode
Bereich
devtools, operating-systems
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.