Shellcheck Segmentation fault

Hello,
this morning shellcheck suddenly started throwing Segmentation fault errors

shellcheck seems to still work on
Ubuntu 14.04.4 LTS
Runtime kernel version: 3.19.0-66-generic

But since this morning it started failing with the same code
The only thing that changed for build I see is:
Ubuntu 14.04.5 LTS
Runtime kernel version: 4.4.0-101-generic

Any ideas of workarounds? :slight_smile:

Hello @ar2rsawseen,

It’s hard for me to diagnose the issue at hand without the build instructions, just so I can get a little clarity on my behalf, did the segfault error look like this?

./shellcheck-stable/shellcheck --version
Segmentation fault (core dumped)

Thank you and I look forward to helping you further.

-Montana (Travis CI Staff)

1 Like

We actually run it in loop for multiple files and it looks like this:

e[0K$ countly shellcheck
/home/travis/build/Countly/countly-server/bin/commands/scripts/shellcheck.sh: line 10: 24353 Segmentation fault      (core dumped) shellcheck "$file"
/home/travis/build/Countly/countly-server/bin/commands/scripts/shellcheck.sh: line 10: 24355 Segmentation fault      (core dumped) shellcheck "$file"
/home/travis/build/Countly/countly-server/bin/commands/scripts/shellcheck.sh: line 10: 24357 Segmentation fault      (core dumped) shellcheck "$file"
/home/travis/build/Countly/countly-server/bin/commands/scripts/shellcheck.sh: line 10: 24359 Segmentation fault      (core dumped) shellcheck "$file"
...
etc

full log: https://api.travis-ci.org/v3/job/655686471/log.txt

And it is run like this:

Hey @ar2rsawseen,

If your base image is Ubuntu 15.04 or later this shouldn’t be an issue. From the specs laid out in the beginning you are using 14.04.5 LTS. The runtime kernel is fine.

Something I was thinking and I saw something similar somewhere, was what if you created a dummy libc for the binary to try and fail to use, before falling back on its default.

So possibly something like this:

touch /tmp/libc.so.6
LD_LIBRARY_PATH=/tmp shellcheck

Just a possible idea/workaround which I think may work. Let me know and see if that gets you where you need to be. I hope you have a wonderful day.

-Montana

Ok, I guess we can deprecate testing in trusty then :slight_smile:
Thank you

1 Like