microsoft / microsoft/vscode-cpptools

High CPU and memory with GDB

オープン
#11,005 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

external
主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
14時間 46分
マージ済み PR(30日)
61

説明

Environment
  • OS and version: Windows 11
  • VS Code: 1.78.2
  • C/C++ extension: 1.16.0 & 1.15.4
  • OS and version of remote machine CENTOS 7.9.2009
  • GDB / LLDB version: GNU gdb (GDB) Red Hat Enterprise Linux 10.2-6.el7
Bug Summary and Steps to Reproduce

Bug Summary:
Debug my executable, before it even breaks in main or loads any symbols it spins for minutes at 100% CPU while allocating a ton of memory. Stepping through is very slow also. Using gdb from the command line is very fast, however a suboptimal experience. I have tried it with the system gdb also. I see the same behavior

image
Debugger Configurations
launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/Debug/bin/Debug/dds_worker",
            "args": ["--no-heartbeats"],
            "stopAtEntry": true,
            "cwd": "${workspaceFolder}/DDS/dds",
            "environment": [],
            "miDebuggerPath": "/opt/rh/devtoolset-11/root/usr/bin/gdb",
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Enable break on all exceptions",
                    "text": "catch throw",
                    "ignoreFailures": true
                }
        
            ]
        }

    ]
}
Debugger Logs
There's a lot of lines, but most look like
1: (111798) <-1017-symbol-list-lines /home/dev/scratch/connector.cpp
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (111802) 1013: elapsed time 103627\n"},"seq":226}
1: (111802) 1013: elapsed time 103627
Other Extensions

No response

Additional Information

No response

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

launch.json の設定と、symbol-list-lines リクエストが繰り返されていることを示すデバッガーログから始めます。起動を再現し、VS Code の動作をコマンドライン GDB と比較します。これらのリクエストに関係するシンボル読み込みとステッピングの経路を追跡します。完了条件は、デバッグが main の前に数分間 100% の CPU を消費したり過剰なメモリを割り当てたりせず、ステッピングが応答性よく動作することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, typescript
領域
devtools, performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。