Skip to content

shellcheck v0.9.0 will keep eating ram until a segfault or a system lockup #2652

Closed
@sonic2kk

Description

@sonic2kk

For bugs

  • Rule Id (if any, e.g. SC1000): N/A
  • My shellcheck version (shellcheck --version or "online"): v.0.9.0
  • The rule's wiki page does not already cover this (e.g. https://shellcheck.net/wiki/SC2086)
  • I tried on https://www.shellcheck.net/ and verified that this is still a problem on the latest commit
    • On this subject, I believe the latest commit at the time of writing is the v0.9.0 release commit. Apologies if not and I will gladly test a more bleeding-edge build
    • I cannot try online as the script I am using is too large to work online

Here's a snippet or screenshot that shows the problem:

This issue is specific to one Bash project that I maintain called SteamTinkerLaunch. With shellcheck 0.8.0, there were no issues. When I updated to shellcheck 0.9.0, I started encountering a problem.

Running shellcheck v.0.9.0 on SteamTinkerLaunch (a 22,000+ lines Bash script), shellcheck will keep using ram until a segfault or a system crash. I am running a PC with 32GB RAM and before a system lockup, KSysGuard said 30GB RAM was being used.

I have tested shelllcheck from the official Arch repos (0.9.0-3 at time of writing), and the GitHub 0.9.0 release.

I have confirmed that with shellcheck 0.8.0, this issue is not present. I am currently using 0.8.0 to check SteamTinkerLaunch.

I have a couple of very small test scripts that I used to prototype ideas, there are only about 20 lines long or so. I tested shellcheck 0.8.0 and 0.9.0 on these scripts and they both worked without issue (in fact, 0.9.0 seemed marginally faster). These scripts don't have any fancy code, I just tested on them to see if they would also reproduce the issue and they did not.

System Information:

  • Distribution: Arch Linux
  • Desktop: KDE Plasma Wayland 5.26.4
  • Kernel: 6.1.1 (Linux Zen Kernel)
  • CPU: Ryzen 7 3700X
  • RAM: 32GB

I realise this is a less-than-helpful issue to open with the information I have at present. I am happy to help diagnose the problem further however I can, and in the meantime I am equally happy to keep using 0.8.0 for SteamTinkerLaunch. I don't have any other information to provide at the moment but I will provide any required information to try and fix this issue, if it is even a Shellcheck issue.

Thanks for creating Shellcheck :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions