CRITICAL ls MEMORY LEAK
Mon Feb 22 20:30:01 GMT 2021
On 2021-02-22 13:12, Doug Henderson wrote:
> On Sun, 21 Feb 2021 at 08:21, Satalink wrote:
>> I deal with a lot of very large files on a regular basis. I've noticed that
>> when I delve into these directories using in mintty and issue the command ls
>> -l (or ls -color=auto), a very large junk of memory is consumed. The
>> memory leak seems to be proportionate to the number and size of files within
>> the containing folder.
> This is likely due to your virus scanner. If those files contain
> non-executable content, it is probably safe to disable virus scans for
> those files.
> Something that ls does is triggering the scan. That scan causes the
> virus scanner to read the entire file. You should see extraordinary
> GPU and disk activity for some time after the ls completes. There
> might be processes or at least threads for each file being scanned.
> Hopefully you will be able to identify a common folder in the path to
> those files where it is safe to disable scanning for that folder and
> all folders and files within that folder.
I've often wondered if the heavy activity is due to Windows' defaults to writing
files with F+RX perms which triggers executable virus scans?
You can't have separate directory and file default perms and unlike Unix,
Windows appears dumb about applying the X bit to files, probably because that
would render downloaded executables non-X, and there is no easy way for users to
change that, whereas Unix requires tools and users explicitly grant X perms.
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
More information about the Cygwin