Tracing down segfault

T

Tony Meyer

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?

Thanks!
Tony Meyer
 
S

Stephen Kellett

Tony said:
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.

Python Bug Validator, a flow tracer, is in beta. Should show you the
program execution history, line by line, with variables, params and
return codes and exceptions right up until the point the application
dies.

http://www.softwareverify.com

Stephen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top