[Zope-dev] Core Dump (Zope 2.7, Python 2.3.3, FreeBSD 4.5)

Jeremy Hylton jeremy at zope.com
Wed Feb 18 10:37:48 EST 2004


On Tue, 2004-02-17 at 11:45, Jeffrey P Shell wrote:
> What should I do next?  Should I familiarize myself with gdb and 
> inspect the core?  What are some things I could look for if that's the 
> next step?

The code dump is an important clue, so it's definitely worth looking at.
It's also pretty simple.  Run "gdb [python] [core]" where python is the
binary you use with Zope and core is the core file.

A few commands will give the most benefit.  "bt" will produce a
backtrace, much like a Python traceback.  It will tell us where the
program actually failed and what was on the call stack.  If you only do
this, we'll probably be in good shape.

If you put the following code in your ~/.gdbinit file, then you can also
inspect the Python stack frames:

# If you are in an eval_frame() function, calling pyframe with no
# arguments will print the filename, function name, and line number.
# It assumes that f is the name of the current frame.
define pyframe
x/s ((PyStringObject*)f->f_code->co_filename)->ob_sval
x/s ((PyStringObject*)f->f_code->co_name)->ob_sval
p f->f_lineno
end

That helps match the C stack and the Python stack and pinpoints what
Python code was executing.

Jeremy





More information about the Zope-Dev mailing list