VSCode - Nordic KConfig extension misbehaviour/excessive CPU/memory usage.

Problem - while working in a project where VSCode does not have visibility to the nRFConnect SDK folders, but where the project includes project-specific KConfig files, the KConfig extension seems to be misbehaving as follows:

  1. It throws an error into the VSCode output window every 1-2 minutes. This is annoying since it pulls focus from the terminal window even while one is actively interacting with the terminal). 
  2. It is using a massive amount of CPU and memory resources (causing computer to freeze pretty often). System monitor shows the underlying python process consuming anywhere from 1-2 GB of RAM at steady state, with spikes up to 5 GB. 

Disabling the extension makes all the performance issues disappear.

This issue seems to have popped up since either the latest version of VSCode or the latest version of the extension. I have had the extension installed for months before this with the same project configuration and have never had any issues.

The issue is seen on an ASUS laptop (ZenBook UX564EI_Q538EI, Intel i7-1165G7 @ 2.80GHz, 16GB RAM), running Linux (Pop!_OS 22.04 LTS).

VSCode version  info:
Version: 1.74.2
Commit: e8a3071ea4344d9d48ef8a4df2c097372b0c5161
Date: 2022-12-20T10:27:19.253Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 6.0.6-76060006-generic
Sandboxed: No

Extension version info: nRF Kconfig v2022.11.50

I am happy to provide any additional details to debug this issue. 

Parents
  • Hello, 

    Can you please provide the output of the extension command - nRF Connect: Generate Support Information as well?

    It throws an error into the VSCode output window every 1-2 minutes. This is annoying since it pulls focus from the terminal window even while one is actively interacting with the terminal). 

    What error does it throw?

    It is using a massive amount of CPU and memory resources (causing computer to freeze pretty often). System monitor shows the underlying python process consuming anywhere from 1-2 GB of RAM at steady state, with spikes up to 5 GB.

    What python process is this, are you able to provide more information?

    Thanks. 

    Kind regards,
    Øyvind

  • Hello Øyvind, 

    Thank you for your quick response.

    I have re-enabled the Kconfig extension to reproduce the issue, but so far I have only partially reproduced it. At the moment, I see issue 1) (continuously throwing errors), but I do not see issue 2 (cpu/memory usage).

    Regardless, I am attaching the info you requested, as follows:

    1. A log of >2400 errors thrown over the course of a day
    2. The Generate Support Information output
    3. Screenshot of the python process that was using too much memory (and is currently working fine). 

    As soon as I reproduce the resource usage issue, I will add evidence of it.




     Kconfig_throwing_errors.txt

    IMPORTANT: The data below could contain sensitive or confidential information about your environment.
    If you do not wish this to be seen by others, please make sure to remove it before sharing.
    
    For help and support, visit the Nordic DevZone at https://devzone.nordicsemi.com/.
    
    {
      "platform": {
        "os": "linux",
        "osVersion": "#202210290932~1669062050~22.04~d94609a SMP PREEMPT_DYNAMIC Mon N",
        "osKernel": "6.0.6-76060006-generic",
        "vscode": "1.74.2",
        "electron": "19.1.8",
        "node": "v16.14.2"
      },
      "system": {
        "date": "2023-01-06T15:01:17.616Z",
        "vscodeRoot": "/usr/share/code/resources/app",
        "nrfConnectForDesktopInstalled": "unknown",
        "vscodeUptime": "00:03:25",
        "osUptime": "760:15:17",
        "cpu": {
          "model": "11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz",
          "speed": "2870 MHz",
          "count": 4
        },
        "memory": {
          "total": "15.33 GB",
          "free": "1.69 GB"
        }
      },
      "workspace": {
        "name": null,
        "workspaceFile": null,
        "folders": []
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2022.11.140",
            "path": "/home/zsilet/.vscode/extensions/nordic-semiconductor.nrf-connect-2022.11.140-linux-x64",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": null,
          "nordic-semiconductor.nrf-devicetree": null,
          "nordic-semiconductor.nrf-kconfig": {
            "version": "2022.11.50",
            "path": "/home/zsilet/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2022.11.50",
            "isActive": true
          }
        },
        "external": {
          "marus25.cortex-debug": null,
          "ms-vscode.cpptools": "1.13.9",
          "ms-vscode.js-debug": "1.74.1",
          "ms-vscode.js-debug-companion": "1.0.18",
          "ms-vscode.vscode-js-profile-table": "1.0.3",
          "alefragnani.Bookmarks": "13.3.1",
          "bbenoist.QML": "1.0.0",
          "cschlosser.doxdocgen": "1.4.0",
          "dracula-theme.theme-dracula": "2.24.2",
          "eamodio.gitlens": "13.2.0",
          "ev3dev.ev3dev-browser": "1.2.0",
          "flimberger.android-system-tools": "0.0.2",
          "foxundermoon.shell-format": "7.2.2",
          "justerest.multi-replace": "0.7.1",
          "marlinfirmware.auto-build": "2.1.45",
          "ms-azuretools.vscode-docker": "1.23.3",
          "ms-python.isort": "2022.8.0",
          "ms-python.python": "2022.20.1",
          "ms-python.vscode-pylance": "2023.1.10",
          "ms-toolsai.jupyter": "2022.11.1003412109",
          "ms-toolsai.vscode-jupyter-cell-tags": "0.1.6",
          "ms-toolsai.vscode-jupyter-slideshow": "0.1.5",
          "ms-vscode-remote.remote-containers": "0.266.1",
          "ms-vscode-remote.remote-ssh": "0.94.0",
          "ms-vscode-remote.vscode-remote-extensionpack": "0.23.0",
          "ms-vscode.cmake-tools": "1.12.27",
          "ms-vscode.powershell": "2022.12.1",
          "ms-vscode.remote-explorer": "0.0.3",
          "platformio.platformio-ide": "2.5.5",
          "redhat.java": "1.13.0",
          "streetsidesoftware.code-spell-checker": "2.12.0",
          "tibotix.definition-autocompletion": "1.1.8",
          "timonwong.shellcheck": "0.29.3",
          "tintinweb.vscode-inline-bookmarks": "0.1.0",
          "VisualStudioExptTeam.intellicode-api-usage-examples": "0.2.6",
          "VisualStudioExptTeam.vscodeintellicode": "1.2.29",
          "vscjava.vscode-java-debug": "0.47.0",
          "vscjava.vscode-java-dependency": "0.21.1",
          "vscjava.vscode-java-pack": "0.25.7",
          "vscjava.vscode-java-test": "0.37.1",
          "vscjava.vscode-maven": "0.40.2",
          "yrpark99.hidl-syntax": "0.0.2",
          "zxh404.vscode-proto3": "0.5.5"
        }
      },
      "tools": {},
      "sdks": [],
      "toolchains": [],
      "connectedDevices": [],
      "deviceProviders": [
        "nrfjprog"
      ],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "",
          "toolchain": {
            "path": ""
          },
          "ozonePath": "",
          "applications": [],
          "applicationOptions": {},
          "kconfig": {
            "interface": "kconfig",
            "executeInDefaultShell": false
          },
          "welcome": {
            "showOnStartup": true
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": true,
          "taskBindings": {},
          "debugging": {
            "backend": "nRF Debug",
            "flash": true,
            "bindings": {}
          },
          "activeAppFollowActiveEditor": true
        }
      },
      "environment": {
        "westExe": "west",
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "HOME": "/home/zsilet",
          "PATH": "/home/zsilet/.local/bin:/home/zsilet/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/zsilet/.local/share/JetBrains/Toolbox/scripts",
          "GNUARMEMB_TOOLCHAIN_PATH": "/home/zsilet/projects/tools/gcc-arm-none-eabi/10.3-2021.07",
          "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
          "USER": "zsilet"
        },
        "inherited": {
          "ELECTRON_RUN_AS_NODE": "1",
          "HOME": "/home/zsilet",
          "PATH": "/home/zsilet/.local/bin:/home/zsilet/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/zsilet/.local/share/JetBrains/Toolbox/scripts",
          "GNUARMEMB_TOOLCHAIN_PATH": "/home/zsilet/projects/tools/gcc-arm-none-eabi/10.3-2021.07",
          "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
          "USER": "zsilet"
        }
      },
      "terminal": {
        "shell": null,
        "defaultProfile": null
      }
    }

  • Hello, 

    Zsilet said:
    have included the VSCode output logs and a screenshot of the python script's process profile. 

    Our VS Code extension team answers:

    The user is not using the current VS Code workspace for NCS app development and his configuration does not point to an SDK. Does he expect the extension to provide anything in this workspace?

    Have you verified that your workspace is pointing to the SDK?

  • Does he expect the extension to provide anything in this workspace?

    I expect/prefer the kconfig extension to be dormant in this deployment. I understand why it cannot perform it's job (as it cannot see the SDK). 

    My issue is that the extension interferes with my use of VSCode, specifically by:

    1. Using a large amount of system resources
    2. Constantly pulling focus from the Terminal window to the Output window (every time it throws another error), making it hard to use the terminal.
    3. Causing VSCode to slow to the point that it takes 15-20 seconds just to save a file. 

    If the extension were to perform one initial check and then stay dormant till the next time I open the project etc, that would be perfectly acceptable. 

  • Are you able to disable the extension in VS code? Will this stop it using large amount of system resources? You should be able to disable the extension only in that workspace or disable the extension altogether and enable it only in the workspace where you wants to use it.

    There is an ongoing internal fix for a similar issue, however, there is not timeline at the moment I'm afraid. 

  • Yes, disabling the extension does resolve the issue and as such, this issue is not blocking me at this point. The only reason I have left the extension running for the last month is to provide more information on this ticket. 

    I am glad to hear that the issue may be known, and I'm not particularly looking for a timeline to a fix. I do want to note, as I mentioned earlier, that this seems to be broken in Kconfig v2022.11.50, and has worked fine in earlier versions. 

    Please let me know if the VSCode extension team has any other questions if/when they do get around to debug this, I am happy to help.  

  • Zsilet said:
    Please let me know if the VSCode extension team has any other questions if/when they do get around to debug this, I am happy to help. 

    Thanks for letting us know! WIll have the team reach out if needed!

Reply Children
No Data
Related