Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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) 

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?

like image 282
Andre Avatar asked Mar 21 '18 19:03

Andre


People also ask

What is process finished with exit code 139 interrupted by signal 11 SIGSEGV?

To Solve Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) Error Here you're trying to read/write a file which is open. In this case, simply closing the file and rerunning the script solved the issue. So That just close the file that you are trying to read or write and then run your script.

What is exit code 139 in C?

exit(139): It indicates Segmentation Fault which means that the program was trying to access a memory location not allocated to it. This mostly occurs while using pointers or trying to access an out-of-bounds array index.

What is exit code in Pycharm?

It means that there is no error with your code. You have run it right through and there is nothing wrong with it. Pycharm returns 0 when it has found no errors (plus any output you give it) and returns 1 as well as an error message when it encounters errors.

What does Process finished with exit code 1 mean?

Exit Code 1 indicates that a container shut down, either because of an application failure or because the image pointed to an invalid file. In a Unix/Linux operating system, when an application terminates with Exit Code 1, the operating system ends the process using Signal 7, known as SIGHUP.


1 Answers

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.

like image 181
Jean-Paul Calderone Avatar answered Sep 20 '22 08:09

Jean-Paul Calderone