-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Open
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesVS Code crashing, performance, freeze and memory leak issuesterminal-processProblems launching processes, managing ptys, exiting, process leaks, etc.Problems launching processes, managing ptys, exiting, process leaks, etc.
Milestone
Description
Expected behaviour
When opening and deleting a terminal the number of promises stays the same
Actual behaviour
When opening and deleting a terminal, the number of promises increases each time, specifically
Opening and deleting a terminal 97 times in VS Code 1.105.1:
{
"promisesWithStackTrace": [
{
"count": 97,
"properties": [
{
"name": "[[PromiseState]]",
"type": "string",
"value": "fulfilled"
},
{
"name": "[[PromiseResult]]",
"type": "undefined",
"value": "undefined"
}
],
"originalStack": [
"src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts:221:9",
"src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts:160:30",
"src/vs/platform/instantiation/common/instantiationService.ts:169:17",
"src/vs/platform/instantiation/common/instantiationService.ts:135:33",
"src/vs/workbench/contrib/terminal/browser/terminalInstance.ts:1397:58",
"src/vs/workbench/contrib/terminal/browser/terminalInstance.ts:516:30",
"src/vs/platform/instantiation/common/instantiationService.ts:169:17",
"src/vs/platform/instantiation/common/instantiationService.ts:135:33"
]
},
{
"count": 97,
"properties": [
{
"name": "[[PromiseState]]",
"type": "string",
"value": "fulfilled"
},
{
"name": "[[PromiseResult]]",
"type": "boolean",
"value": "true"
}
],
"originalStack": [
"src/vs/base/common/async.ts:489:18",
"src/vs/base/common/async.ts:517:2",
"src/vs/workbench/contrib/terminal/browser/terminalInstance.ts:518:32",
"src/vs/platform/instantiation/common/instantiationService.ts:169:17",
"src/vs/platform/instantiation/common/instantiationService.ts:135:33",
"src/vs/workbench/contrib/terminal/browser/terminalInstanceService.ts:49:46",
"src/vs/workbench/contrib/terminal/browser/terminalGroup.ts:308:44",
"src/vs/workbench/contrib/terminal/browser/terminalGroup.ts:286:8"
]
},
{
"count": 97,
"properties": [
{
"name": "[[PromiseState]]",
"type": "string",
"value": "fulfilled"
},
{
"name": "[[PromiseResult]]",
"type": "boolean",
"value": "true"
}
],
"originalStack": [
"src/vs/base/common/async.ts:489:18",
"src/vs/base/common/async.ts:517:2",
"src/vs/workbench/contrib/terminal/browser/terminalInstance.ts:519:24",
"src/vs/platform/instantiation/common/instantiationService.ts:169:17",
"src/vs/platform/instantiation/common/instantiationService.ts:135:33",
"src/vs/workbench/contrib/terminal/browser/terminalInstanceService.ts:49:46",
"src/vs/workbench/contrib/terminal/browser/terminalGroup.ts:308:44",
"src/vs/workbench/contrib/terminal/browser/terminalGroup.ts:286:8"
]
}
]
}Additional information
Test script for leaked promises:
git clone [email protected]:SimonSiefke/vscode-memory-leak-finder.git &&
cd vscode-memory-leak-finder &&
npm ci &&
node packages/cli/bin/test.js --cwd packages/e2e --only terminal.create --runs 97 --check-leaks --measure promises-with-stack-trace --run-skipped-tests-anyway --measure-after &&
cat .vscode-memory-leak-finder-results/promises-with-stack-trace/terminal.create.jsonThe script can also be run with a local vscode version by passing --vscode-version "/some/custom/path/to/vscode/scripts/code.sh".
Also, sometimes the test can be flaky, so sometimes it may only work the second time or so.
Other
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.105.1
- OS Version: Ubuntu 25.04
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesVS Code crashing, performance, freeze and memory leak issuesterminal-processProblems launching processes, managing ptys, exiting, process leaks, etc.Problems launching processes, managing ptys, exiting, process leaks, etc.