MSYS2-packages
MSYS2-packages copied to clipboard
Zombie child processes eating large amounts of RAM
I've discovered that when building large amounts of packages, after a while the physical memory usage has increased drastically for no apparent reason; the physical memory usage by processes in Task Manager doesn't add up to the actual memory usage. Using RAMMap, I can see that there are many tens of thousands of terminated msys processes (bash, tee, sed, xargs etc) each taking up 24 K of memory, adding up to more than 3 GB of "lost" memory.
A similar issue is described by a Google engineer while building Chrome, although, the cause in that specific case does not apply here (I do not have CcmExec.exe running). From what I can understand, it's either caused by not closing the process handles correctly, in which case it might be a bug in msys, or it's caused by a bug in Windows. Unfortunately, the tool provided in the link does not reveal what process(es) keeps the zombies alive. Further investigation is required.
No comment on this? It's quite a huge problem and very detrimental to MSYS2's use as a build environment.
I haven't seen issue like that but there were many other reports, maybe are you using software which injects dlls to running processes? You might want to check https://cygwin.com/faq/faq.html#faq.using.bloda
Well, pretty much every anti-virus solution is on that list, so yeah. Currently, I'm using Avast. Is going completely without AV the only solution? What is Cygwin/msys doing that other processes without this problem (i.e. most) doing differently?
Just use Windows defender. It's the only av you need. The others aren't very good IMHO.
Windows Defender is also on that list.
Heh, well, it's never caused me much trouble (unlike all the others).
Also I'm on Windows 7, but I guess Security Essentials is basically the same minus the rootkit/boot protection. If someone could confirm that MSE doesn't interfere with msys, I'd consider giving it a go, although reluctantly because Avast has served me well and MSE lags behind in protection scores.
To be honest number of false positives from MSE/Windows 10 Defender is overwhelming. Both of them would randomly detect threat when updating MSYS2 and virustotal just proves it was false positive.
So... Either way, you're screwed, nothing can be done except uninstalling all AV?
@niklasholm you can exclude MSYS2 directory in your AV.
I've tried, doesn't make a damn difference.
I'm not using Avast but usually there are 2 separate exclude directories, one for the scanner and one for the real-time protection.
I have never suffered a virus in my life. I take just the normal precautions but have never run a (continuously scanning) virus scanner.
The industry is largely based on snake oil (I've looked at real virus detection 'logic' it was beyond awful). They make computers far slower than they otherwise be and basically generate a load of heat based mostly on fear. Don't bother with it, John McAfee is right.
@mati865 Yes, I've excluded it everywhere still doesn't make a difference. Disabling it completely also doesn't make a difference.
@mingwandroid Most IT security departments would disagree with you. And how do you know that if you don't have AV? Most malware does their best to hide from the user. AV stops loads of attacks, that's a fact. While it is true that very security conscious users can survive in the wild without AV, most people using a computer wouldn't.
https://www.howtogeek.com/225385/what%E2%80%99s-the-best-antivirus-for-windows-10-is-windows-defender-good-enough/
This in particular gives me cause for concern:
Furthermore, security is about more than raw protection scores. Other antivirus programs may occasionally do a bit better in monthly tests, but they also come with a lot of bloat, like browser extensions that actually make you less safe, registry cleaners that are terrible and unnecesary, loads of unsafe junkware, and even the ability to track your browsing habits so they can make money. Furthermore, the way they hook themselves into your browser and operating system often causes more problems than it solves. Something that protects you against viruses but opens you up to other vectors of attack is not good security.
@niklasholm to debug this you probably need to use ProcMon and see what DLLs you AV software is hooking.
All that "bloat" is completely optional. I only have File Shield and Behaviour Shield installed. Besides, How-To Geek does not offer any evidence to support their claims that it makes the system less secure, so I wouldn't be too concerned. Throwing out the baby with the bathwater by getting rid of AV completely certainly does not improve security.
I'll try to find something with ProcMon.
yep also running into this, the problem is that win10 changed the way of handling the standby list to be more in line with linux. the problem with that is that it does a piss poor job of it ;S sadly in msys2 case 16 gb ram is not enough my pc will grind to a halt after building two packages and even installing a memory cleaner specifically setup to free the standbylist wont help as win10 refuses to release the memory even in admin mode.