Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
755 views
in Technique[技术] by (71.8m points)

linux - what does a python process return code -9 mean?

I have a python script which returns the exit status of -9.

I tried to get the root of the problem with the atexit module, but it does not get called.

Any hints to help me find why and where my script terminates?

The problem is reproducible, operating system: linux 3.7.10

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The script was killed by the operating system. Negative return values are the signal number which was used to kill the process.

The script needed too much memory. I found this in syslog:

Out of memory: Kill process 26184 (python) score 439 or sacrifice child
Killed process 26184 (python) total-vm:628772kB, anon-rss:447660kB, file-rss:0kB

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...