退出代码为139的过程结束(信号11:SIGSEGV中断) [英] Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

查看:7060
本文介绍了退出代码为139的过程结束(信号11:SIGSEGV中断)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行 Python脚本,但出现以下错误:

I'm trying to execute a Python script, but I am getting the following error:

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

我在Linux Mint 18.1 Serena OS上使用python 3.5.2

I'm using python 3.5.2 on a Linux Mint 18.1 Serena OS

有人可以告诉我为什么会发生这种情况吗,我该如何解决?

Can someone tell me why this happens, and how can I solve?

推荐答案

SIGSEGV信号指示"细分违规"或"segfault".或多或少,这等同于对该过程中未映射的内存地址的读取或写入.

The SIGSEGV signal indicates a "segmentation violation" or a "segfault". More or less, this equates to a read or write of a memory address that's not mapped in the process.

这表明您的程序中存在错误.在Python程序中,这可能是解释程序中的错误,也可能是所使用的扩展模块中的错误(后者是最常见的原因).

This indicates a bug in your program. In a Python program, this is either a bug in the interpreter or in an extension module being used (and the latter is the most common cause).

要解决此问题,您有几种选择.一种选择是制作一个最小的,独立的,完整的示例,该示例复制问题,然后将其作为错误报告提交给它使用的扩展模块的维护者.

To fix the problem, you have several options. One option is to produce a minimal, self-contained, complete example which replicates the problem and then submit it as a bug report to the maintainers of the extension module it uses.

另一种选择是尝试自己找出原因. gdb 是这种尝试中的一种有价值的工具,它是Python和所有其他工具的调试版本使用中的扩展模块.

Another option is to try to track down the cause yourself. gdb is a valuable tool in such an endeavor, as is a debug build of Python and all of the extension modules in use.

安装gdb后,可以使用它运行Python程序:

After you have gdb installed, you can use it to run your Python program:

gdb --args python <more args if you want>

然后使用gdb命令查找问题.如果使用run,则您的程序将一直运行直到崩溃为止,您将有机会使用其他gdb命令检查状态.

And then use gdb commands to track down the problem. If you use run then your program will run until it would have crashed and you will have a chance to inspect the state using other gdb commands.

这篇关于退出代码为139的过程结束(信号11:SIGSEGV中断)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆