Repository navigation
cpptools-srv stuck at 100% CPU, blocking VScode CoPilot #12750
Copy link
Copy link
Closed
Labels
Feature: Copilot ContextIntegration with GitHub Copilot that provides additional context infoIntegration with GitHub Copilot that provides additional context infoFeature: Copilot HoverGitHub Copilot hover "Generate Copilot summary" featureGitHub Copilot hover "Generate Copilot summary" featureLanguage ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.quick fixregressionA bug that didn't exist in a previous releaseA bug that didn't exist in a previous release
Milestone
Description
Environment
- OS and Version: Ubuntu20.04
- VS Code Version: 1.93.1
- C/C++ Extension Version: v1.22.4 (pre-release)
- If using SSH remote, specify OS of remote machine:
Bug Summary and Steps to Reproduce
Bug Summary:
Laptop heats up, fan goes to 100% when using VScode. Inline copilot symbol (yellow stars) disappeared.
Process cpptools-srv is at 100% for 30minutes already.
Steps to reproduce:
Depends on my codebase / branch. If needed, I can share a link.
But I would prefer instead some debug logging / insight which file it is having so much trouble with.
Expected behavior:
No laptop overheating. Proper copilot function.
Configuration and Logs
Configurations in c_cpp_properties.json:
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
-------- Diagnostics - 9/22/2024, 3:05:02 PM
Version: 1.22.4
Current Configuration:
{
"name": "Linux",
"includePath": [
"/home/jan/github/MRA-components/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64",
"compilerPathIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"intelliSenseModeIsExplicit": true,
"compilerPathInCppPropertiesJson": "/usr/bin/gcc",
"mergeConfigurations": false,
"browse": {
"path": [
"myredactedrepo/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
Modified Settings:
{
"C_Cpp.intelliSenseEngine": "Tag Parser",
"C_Cpp.intelliSenseCacheSize": 0,
"C_Cpp.loggingLevel": "Debug",
"C_Cpp.updateChannel": "Insiders"
}
Additional Tracked Settings:
{
"editorTabSize": 4,
"editorInsertSpaces": true,
"editorAutoClosingBrackets": "languageDefined",
"filesEncoding": "utf8",
"filesAssociations": {
"*.inc": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"csetjmp": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"*.ipp": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"hash_map": "cpp",
"hash_set": "cpp",
"strstream": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"cfenv": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"cinttypes": "cpp",
"codecvt": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"cstdint": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"map": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"regex": "cpp",
"set": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"ostream": "cpp",
"scoped_allocator": "cpp",
"shared_mutex": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"valarray": "cpp",
"variant": "cpp",
"bit": "cpp"
},
"filesExclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
},
"filesAutoSaveAfterDelay": false,
"editorInlayHintsEnabled": true,
"editorParameterHintsEnabled": true,
"searchExclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true
},
"workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.22.4.0
No active translation units.
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 495041
Number of files parsed: 27317
### Other Extensions
_No response_
### Additional context
Tried various settings already. Tried debugger but could not see anything. (May also be my fault for not being expert enough.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Feature: Copilot ContextIntegration with GitHub Copilot that provides additional context infoIntegration with GitHub Copilot that provides additional context infoFeature: Copilot HoverGitHub Copilot hover "Generate Copilot summary" featureGitHub Copilot hover "Generate Copilot summary" featureLanguage ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.quick fixregressionA bug that didn't exist in a previous releaseA bug that didn't exist in a previous release
Type
Projects
- StatusShow more project fieldsDone
Activity
sean-mcmanus commentedon Sep 23, 2024
With
"C_Cpp.intelliSenseEngine": "Tag Parser",set, cpptools-srv is not supposed to be launched. I'm guessing the copilot call back code is not checking for that setting and trying to launch cpptools-srv when it shouldn't. Changing Cpp.intelliSenseEngine to "default" might fix it, not sure yet.sean-mcmanus commentedon Sep 23, 2024
I'm not able to repro this. I don't see a cpptools-srv launched when C_Cpp.intelliSenseEngine is "Tag Parser". I'll ask if anyone else on our team is able to repro it.
janfeitsma commentedon Sep 24, 2024
Thanks Sean.
I kicked out all the custom C_Cpp settings which I gathered over the past weeks trying to debug this specifically:
Had a closer look at the ps tree, I noticed two versions of cpptools running:
1.22.4and1.22.3. Now I wonder: maybe cpptools-srv was somehow associated to the older one. So I did a reboot.Soon after restarting vscode and resuming development, cpptools-srv appeared again. Running 100% CPU for a while.
Problem persists.
Maybe relevant to mention I use bazel build.
What other info should I provide?
sean-mcmanus commentedon Dec 14, 2024
janfeitsma We can fix it so it doesn't launch the cpptools-srv process (#13058). I'm guessing I might not have reproed it earlier due to some Copilot issue may not have triggered the getIncludes request.
sean-mcmanus commentedon Jan 10, 2025
janfeitsma Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.23.3 (pre-release).