Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Leak and Stack Loop Overflow #196

Open
altimmons opened this issue Dec 6, 2021 · 2 comments
Open

Memory Leak and Stack Loop Overflow #196

altimmons opened this issue Dec 6, 2021 · 2 comments

Comments

@altimmons
Copy link

You have a loop somewhere running wild, Creating hundreds of instances of Electron, ConsoleHost, CScriptHost.
The parameters for the CLI that are in the Script Host is
cscript //nologo "C:\Program Files (x86)\PiBakery\resources\app\node_modules\drivelist\scripts\win32.bat?.wsf"

Whatever runs appears to be on a 3 minute timed loop.

Perhaps you mean for it to return a value, but its just spawning a new process each time.

That is a chart of free CPU, Basically the inverted view of CPU Load, on my rather beefy system.

Before I realized what was causing system latency, I found more than 450 instances of Electron, ConsoleHost and CScriptHost, and much of the work being done by WMI Provider Host (WmiPrvSE.exe) process trying to maybe clean up the stack or something?

This happened - or rather I noticed it after I wrote to a card. I am not sure if it started earlier. Perhaps I removed it before the check process could complete, and then the loop got out of control.

@altimmons
Copy link
Author

Command line of the consoole host is : C:\Windows\system32\cmd.exe /c "C:\Program Files (x86)\PiBakery\resources\app\node_modules\drivelist-scanner\node_modules\drivelist\scripts\win32.bat"

Restarting the program, it looks like you run a new process every 10 seconds or so, as one set of cmd.exe and cscript.exe open and close each tic.

There just seems to be a state where this process will not exit, and spawn processes out of control.

Maybe check the exit conditions for the the win32.bat file, or perhaps find another way to Poll drives?

@altimmons
Copy link
Author

Also, I get a Connecting to server error

but then it attempts to download anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant