Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.99k stars 536 forks source link

Memory leak on agent #447

Closed markleinhos closed 4 years ago

markleinhos commented 5 years ago

I have just one Win10 node on which the agent seems to have a memory leak and will consume more RAM over time (many days) until the system is unresponsive. Today it was using 10GB of RAM before I had to punt it. I've removed and reinstalled this agent but no change.

Has anybody else seen memory leaks like this on Windows nodes?

krayon007 commented 5 years ago

So you're saying out of all the nodes you have, just this one node is showing this behavior? Can you give me more details of this specific Windows machine? (ie: Build Number, version, etc. As well as details about the platform itself, like if it has AMT, etc.)

Ylianst commented 5 years ago

If to connect/disconnect the remote desktop over and over again, it does seem like RAM use on the agent goes up. Bryan will look into it.

markleinhos commented 5 years ago

I do indeed RD to this machine regularly, but only about once per day on average.

Win10 Pro 1903, Intel Pentium G3220 (no AMT support I'm pretty sure), Mesh agent would have been the release current from last month (I uninstalled it today).

krayon007 commented 5 years ago

Ok, I tracked down the issue. A recent feature that was added, introduced a race condition when a child process on Windows was explicitly killed and if/when the exit handler was called. In this case, if you disconnect KVM, the cleanup code may not have executed, which is where the leak came from.

This will require an agent update, so it will be released with an upcoming Mesh Central update.

markleinhos commented 5 years ago

Wow, you guys are ninjas, thanks for the hard work.

Ylianst commented 4 years ago

Closing this one as I am pretty sure it's fixed. Please open a new issue if you see a memory leak.