[Tutor] Python program, seg. faults and dies

dman dsh8290@rit.edu
Tue, 2 Oct 2001 18:54:14 -0400


On Mon, Oct 01, 2001 at 10:20:18AM -0400, Lance E Sloan wrote:
| 
| A colleague of mine was written a Python program that causes
| a segmentation fault and dies under Solaris 2.6.  I ran it and
| got it to produce a coredump file, but I'm not sure how to get
| the Python program and core file loaded into the debugger, GDB.
| I've done so with C programs, but GDB says it doesn't recognize
| the Python program as an executable.
| 
| If anybody has experience with this, could you drop me a line?

The python program is a "script" not an "executable" as far as gdb is
concerted (it isn't ELF or a.out format).  If you want to fire up gdb,
use 'python' as the program, since that is really the "program" that
gave the core dump.  

What sort of program is it?  Does it use threads?  Does it use a GUI
from multiple threads?  Does it try and modify a list or dict while
iterating over it?  These are some of the situations that can lead to
race conditions and thus core dumps.  (the list/dict modification one
is hard to trigger, but I remember hearing about a patch for it)

HTH,
-D