Process finished with exit code 139 (interrupted by signal 11: 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.

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.

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.

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

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

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.

Leave a Comment