Tracing down segfault

Tony Meyer t-meyer at
Sat Jun 25 04:53:50 CEST 2005

I have (unfortunately) a Python program that I can consistently (in a
reproducible way) segfault.  However, I've got somewhat used to Python's
very nice habit of protecting me from segfaults and raising exceptions
instead, and am having trouble tracking down the problem.

The problem that occurs looks something like this:

Program received signal SIGSEGV, Segmentation fault.
0x00a502aa in ?? ()
(gdb) bt
#0  0x00a502aa in ?? ()
Cannot access memory at address 0x0

Which looks something like accessing a NULL pointer to me.

The problem is finding the code that is causing this, so I can work around
it (or fix it).  Unfortunately, the script uses ZEO, ZODB,
threading.Threads, and wx (my code is pure Python, though), and I'm having
trouble creating a simple version that isolates the problem (I'm pretty sure
it started happening when I switched from thread to threading, but I'm not
sure why that would be causing a problem; I am join()ing all threads before
this happens).

Does anyone have any advice for tracking this down?

Tony Meyer

More information about the Python-list mailing list