Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does my Perl script exit with 137?

Tags:

exit-code

perl

Is there a way to eliminate a warning (exit code 137) in perl? I am running a Perl script on linux within another shell script. This Perl script exits with a warning and exit code 137. I could not pinpoint what exit code 137 stands for.

What is the best way to avoid this warning? I tried "no warnings" in the script and I have an exit 0 at the end of my Perl script as well.

like image 375
Bi. Avatar asked Jun 24 '09 21:06

Bi.


People also ask

How do I fix exit code 137?

If a few pods are consistently getting exit code 137 returned to them, then that is a sign that you need to increase the amount of space you afford to the pod. By increasing the maximum limit manually in the pods that are under the most strain, you'll be able to reduce the frequency with which this problem occurs.

How do I fix exit code 137 in PyCharm?

If anyone else were installing pycharm on mac and got the code 137 in PyCharm error while doing a simple print('test') command it most certainly is because of the path to interpreter being present in the new project created. Work around uninstall installed python version using brew and then manually install it.

What is exit Perl?

exit() function evaluates the expression passed to it and exits from the Perl interpreter while returning the value as the exit value. The exit() function does not always exit immediately but calls the end routines before it terminates the program.


2 Answers

137=128+9, which means some other process has sent you a signal 9, which is SIGKILL. I.e. the other script kills yours, that's what it looks like.

like image 132
Igor Krivokon Avatar answered Oct 10 '22 14:10

Igor Krivokon


I just ran into the same exit code 137 when launching a python script. It turns out to be the OOM killer kicking in, sending SIGKILL to python interpreter. If it's the same cause, you can find oom msgs in /var/log/messages

like image 40
Wenjun Avatar answered Oct 10 '22 13:10

Wenjun