microsoft / microsoft/vscode-cpptools

LS/cpptool generating core dump files everytime compilation fails

Aperta
#8,442 15 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug investigate: repro Language Service reliability
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il problema in un progetto Linux remoto usando la sintassi C++ non valida e analizza i crash IntelliSense segnalati di cpptools-srv e i file core generati. Inizia dai log del language server e dai dettagli del file core nell’issue. Il lavoro è completato quando una compilazione fallita non genera più core dump grandi e ripetuti e IntelliSense rimane utilizzabile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp, vscode
Ambito
devtools, operating-systems
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.