Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shellcheck: unable to decommit memory: Invalid argument (0.4.4) #785

Closed
austin987 opened this issue Nov 28, 2016 · 20 comments
Closed

shellcheck: unable to decommit memory: Invalid argument (0.4.4) #785

austin987 opened this issue Nov 28, 2016 · 20 comments

Comments

@austin987
Copy link
Contributor

Howdy,

I recently upgraded my project to using shellcheck 0.4.4 on travis-ci.org to take advantage of the new global file exclusions (#777). After doing so, shellcheck is throwing lots of errors on my project, with the message:
+shellcheck -s sh src/winetricks
shellcheck: unable to decommit memory: Invalid argument
shellcheck: unable to decommit memory: Invalid argument
shellcheck: unable to decommit memory: Invalid argument
shellcheck: unable to decommit memory: Invalid argument
shellcheck: unable to decommit memory: Invalid argument
shellcheck: unable to decommit memory: Invalid argument
shellcheck: unable to decommit memory: Invalid argument
shellcheck: unable to decommit memory: Invalid argument
shellcheck: unable to decommit memory: Invalid argument

What's interesting is that it only occurs on Linux (Ubuntu):
https://travis-ci.org/Winetricks/winetricks/jobs/177866938

But not OS X with 0.4.5:
https://travis-ci.org/Winetricks/winetricks/jobs/177866939

is this a known issue with 0.4.4? I glanced through the commits between 0.4.4 and 0.4.5, but didn't see anything relevant. Unfortunately, Ubuntu's latest is 0.4.4:
https://launchpad.net/ubuntu/+source/shellcheck

so if it is fixed in 0.4.5, I'd like to know so I can ask Ubuntu to bump it.

P.S., I hate filing a bug for this since it's a previous version, but I couldn't find an IRC channel to ask about this. Is there one I'm unaware of?

@koalaman
Copy link
Owner

koalaman commented Dec 3, 2016

I haven't seen this error before. From what I can tell from GHC issues 12865 and 12495, it may happen when GHC/shellcheck is built on a newer system but runs on one with an older kernel.

@austin987
Copy link
Contributor Author

austin987 commented Dec 4, 2016 via email

@koalaman
Copy link
Owner

koalaman commented Dec 8, 2016

I don't really have any good suggestions. If your Ubuntu kernel and all related packages are up to date and you're still getting this, I would just file a Ubuntu bug and see what they say.

@austin987
Copy link
Contributor Author

Well it's travis-ci, so I assume they are ;).

I didn't know if you wanted some sort of logs or something. Thanks.

@austin987
Copy link
Contributor Author

@renekliment
Copy link

We're experiencing the same thing over at alexa-pi/AlexaPi#120 This is very unfortunate.
@austin987 Have you tried running it under Ubuntu 14.04 instead of 12.04?

@austin987
Copy link
Contributor Author

@kurahaupo
Copy link

If you need an IRC channel, you could try #bash on freenode. It's not strictly a shellcheck channel, but Koalaman and I both hang out there, as do a number of other serious shellcheck users.

@renekliment
Copy link

@austin987 I've tried it also and wasn't able to make it work. I see it doesn't work for you either (almost wasn't able to spot those error messages in the build log - https://travis-ci.org/Winetricks/winetricks/jobs/187364963#L360, haha). Too bad 😞

@renekliment
Copy link

@austin987 Ended up using trusty-backports/universe shellcheck amd64 0.3.3-1~ubuntu14.04.1. At least trusty-backports is available when using sudo: required and the thing builds and works (example: https://travis-ci.org/alexa-pi/AlexaPi/jobs/187689160).

There is a PR for whitelisting that repo ( travis-ci/apt-source-safelist#308 ), but looking at the number of PRs and issues, I wouldn't be very enthusiastic about it, although this is a repo that makes sense.

@austin987
Copy link
Contributor Author

austin987 commented Jan 7, 2017 via email

@ccztux
Copy link

ccztux commented Feb 21, 2017

Hi!

I also get this error when using shellcheck in conjunction with travics ci, but not using the debian package. I use the latest docker image: koalaman/shellcheck

Here you can see the config and errors on travis-ci.org: glsysbackup

@sobolevn
Copy link

sobolevn commented Mar 5, 2017

Same issue here:

   - os: linux
      sudo: required
      language: ruby
      addons:
        apt:
          sources:
          - debian-sid
          packages:
          - shellcheck

Generates:

shellcheck: unable to decommit memory: Invalid argument

Link to job: https://travis-ci.org/sobolevn/git-secret/jobs/208007733

@edannenberg
Copy link

edannenberg commented Mar 23, 2017

I can confirm the issue, but it doesn't seem to affect the test outcome. Valid code passes the build, lint warnings are detected and fail the build. The decommit memory messages appear in either case.

@deiga
Copy link

deiga commented Jun 8, 2017

This also happens when running inside docker (koalamans image) on Debian 3.16.39

@PeterDaveHello
Copy link
Contributor

This also happens when running inside official docker image (v0.4.6)

@wknapik
Copy link

wknapik commented Jun 27, 2018

Also seeing this in containerized jenkins builds based on debian-stretch. Shellcheck 0.4.4 from the distro package.

@ackbyte
Copy link

ackbyte commented Sep 28, 2018

Same issue within a gitlab pipeline.
gitlab-runner 11.2.0
Image: debian:stable-slim

$ find . -name "*.sh" -type f -print0 | xargs -n 1 -0 shellcheck -e SC2181,SC1091,SC2006,SC2230,SC1117,SC2002,SC2086,SC2162,SC2196,SC2001,SC2003,SC1067,SC2153 shellcheck: unable to decommit memory: Invalid argument shellcheck: unable to decommit memory: Invalid argument shellcheck: unable to decommit memory: Invalid argument shellcheck: unable to decommit memory: Invalid argument shellcheck: unable to decommit memory: Invalid argument shellcheck: unable to decommit memory: Invalid argument shellcheck: unable to decommit memory: Invalid argument shellcheck: unable to decommit memory: Invalid argument shellcheck: unable to decommit memory: Invalid argument shellcheck: unable to decommit memory: Invalid argument shellcheck: unable to decommit memory: Invalid argument shellcheck: unable to decommit memory: Invalid argument shellcheck: unable to decommit memory: Invalid argument

Any suggestions how to avoid or just fix this errors?

Thanks
zeldor

@runejuhl
Copy link
Contributor

@ZeldoR
Had the same problem with our CI pipeline; ended up just using a newer shellcheck. My image is based on Ubuntu xenial but adds artful sources and installs shellcheck from artful (apt-get install -y -t artful shellcheck).

@ackbyte
Copy link

ackbyte commented Sep 30, 2018

@runejuhl thank you for your reply and constructive suggestion.
Will try out to add some newer repository with shellcheck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests