我有一个python脚本,它返回退出状态-9。
我试图用atexit模块解决问题的根源,但是没有调用它。
任何提示可以帮助我找到脚本终止的原因和位置?
问题是可重现的,操作系统:linux 3.7.10
答案 0 :(得分:20)
该脚本被操作系统杀死。负返回值是用于终止进程的信号编号。
脚本需要太多内存。我在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