shellcheck
shellcheck copied to clipboard
Shellcheck v0.8.0 runs out of memory on linux OS for big sh files
When I try shellcheck shellcheck-v0.8.0.linux.x86_64.tar.xz it runs out of memory reaching 64GB of memory. The issue was fixed by downgrading Shellcheck to v0.7.2
The same execution takes just a few secs on MacOS for the same version.
For bugs
- Rule Id (if any, e.g. SC1000): SC2060 or any other
- My shellcheck version (
shellcheck --version
or "online"): v0.8.0 - [ ] The rule's wiki page does not already cover this (e.g. https://shellcheck.net/wiki/SC2086)
- [x] I tried on https://www.shellcheck.net/ and verified that this is still a problem on the latest commit
For new checks and feature suggestions
- [x] https://www.shellcheck.net/ (i.e. the latest commit) currently gives no useful warnings about this
- [ ] I searched through https://github.com/koalaman/shellcheck/issues and didn't find anything related
#Shell script ltmain.txt
Here's what shellcheck currently says:
It is exiting with code 137 when processing a .sh file with 6956 lines
Here's what I wanted or expected to see:
Analysis should run fast taking a few secs as it does in Macs
Are you running via qemu user emulation by any chance, such as with Docker on macOS/ARM?
Still relevant, leaving shellcheck open on a ~100 line file makes it consume up to 16GB RAM (On UBUNTU WSL).
leaving shellcheck open
what does that mean? it never finish the processing?
have you tried the latest release or still using 0.8.0? able to build from source?
WSL might be a key here.
leaving shellcheck open
what does that mean? it never finish the processing?
have you tried the latest release or still using 0.8.0? able to build from source?
WSL might be a key here.
It looks like it finishes processing, but checking something like btop it shows that there are multiple instances of shellchek running (even if only one bash file is opened) and they each consume something like 1-2GB RAM.
me too