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

查看:105
本文介绍了进程以退出代码 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 操作系统上使用 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 信号指示分段违规"或段错误".或多或少,这相当于读取或写入未在进程中映射的内存地址.

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天全站免登陆