Repository navigation
Memory leak until the system freezes #2171
Description
Activity
- addedIssue-BugA bug to squash.A bug to squash.Needs: TriageMaintainer attention needed!Maintainer attention needed!
on Aug 16, 2024 andyleejordan commented
on Aug 19, 2024 MemberMore actionsHi, can you try setting "enable script analysis on open files only" and let me know if it's still reproduces? We often see a large memory increase like this when a user has opened a folder that contains many thousands of PowerShell scripts (such as your home folder) and the default setting to analyze them all just takes a lot of memory.
Thank you Andy Jordan (@andyleejordan) , that seems to solve the issue. Very annoying... Thx for the workaround.
I'll leave this one open as I think this should never happen, a freezing system because of a setting that is not set.
andyleejordan commented
on Aug 23, 2024 MemberMore actionsSydney Smith (@SydneyhSmith) Patrick Meinecke (@SeeminglyScience) what do we think about changing this setting to be enabled by default? I think it would fix more issues than it would cause.
SydneyhSmith commented
on Aug 23, 2024 CollaboratorMore actionsI would be interested to test that out in preview and see if there is unexpected behavior
Reacted by Andy JordanJustinGrote commented
on Aug 24, 2024 CollaboratorMore actionsMy two cents would be to not make it default behavior, but have an upper limit of files being analyzed where it pops up a warning and offers to turn off the setting, the upper limit being another setting thats configurable, maybe start at 500 or something.
Reacted by DarkLite1 and Andy JordanMy two cents would be to not make it default behavior, but have an upper limit of files being analyzed where it pops up a warning and offers to turn off the setting, the upper limit being another setting thats configurable, maybe start at 500 or something.
Or simply check the memory consumption once in a while for
pwsh.exeprocess launched by the extension. If it goes above 2 GB, something is definitely wrong.JustinGrote commented
on Aug 26, 2024 CollaboratorMore actionsMy two cents would be to not make it default behavior, but have an upper limit of files being analyzed where it pops up a warning and offers to turn off the setting, the upper limit being another setting thats configurable, maybe start at 500 or something.
Or simply check the memory consumption once in a while for
pwsh.exeprocess launched by the extension. If it goes above 2 GB, something is definitely wrong.Not necessarily, since scripts run in there and the REPL runs in there, I could very well be running a script that consumes 2GB, the extension process is not used simply for extension purposes (though we often wish it would, this is necessary to provide ISE-like behavior)
andyleejordan commented
on Aug 26, 2024 MemberMore actionsMy two cents would be to not make it default behavior, but have an upper limit of files being analyzed where it pops up a warning and offers to turn off the setting, the upper limit being another setting thats configurable, maybe start at 500 or something.
You know, I would happily accept a PR for this 🤠
Reacted by Justin Grote and DarkLite1JustinGrote commented
on Aug 27, 2024 CollaboratorMore actionsAndy Jordan (@andyleejordan) I'll put it on the very long to-do list :)
Reacted by DarkLite1 and Andy Jordan- addedUp for GrabsWill shepherd PRs.Will shepherd PRs.Issue-EnhancementA feature request (enhancement).A feature request (enhancement).and removedNeeds: TriageMaintainer attention needed!Maintainer attention needed!Issue-BugA bug to squash.A bug to squash.
on Aug 27, 2024
Prerequisites
Summary
Every time the extension "PowerShell v2024.3.2 (pre-release)" is enabled, the memory usage goes up until the system freezes. When disabling the extension, there is no issue. Same issue with the release version "Powershell 2024.2.2".
Also reported here.
PowerShell Version
Editor Version
PowerShell Editor Services Version
The one built-in to "PowerShell v2024.3.2 (pre-release)" and "Powershell 2024.2.2".Steps to Reproduce
Every time the extension "PowerShell v2024.3.2 (pre-release)" is enabled, the memory usage goes up until the system freezes. When disabling the extension, there is no issue. Same issue with the release version "Powershell 2024.2.2".
Simply enable the extension, open VS Code and wait for the RAM to be fully consumed. No coding required.
Visuals
Logs
1723619554-68a1cfd5-1a3e-43e5-9fc4-7e8fa8a133561723619552104.zip