Python 2.2.x core dumping

L

Leland Woodbury

We have a stable Python app that's causing Python 2.2.1 and 2.2.3 (on
Solaris) to core dump with segmention violation on certain new inputs.
The core files have their stack trashed, so we don't have a lot to go
on other than the obvious indication of a memory problem. We moved
the app to Linux so we could run valgrind on it, that pretty much just
told us that we're getting a stack overflow, which is a clue, but I'm
not sure what to do with it.

One obvious alternative is to upgrade to Python 2.3.3, but this has
some local consequences that I'd rather avoid until I have some
assurance that it will solve the problem.

Anyone have any advice on next steps to track down the problem?

Thanks for whatever you know.

L
 
J

Jeff Epler

You could use sys.setrecursionlimit() to lower the recursion limit
(if it's recursion in Python code). That's the only Python-specific
thing that comes to mind as easily tweakable which might turn the segv
into a debuggable backtrace.

When I ran a simple recursive C program under gdb, the stack was intact
when the program stopped. Have you tried this? If you can return to
most any Python API call in the stack trace and return NULL, you may be
able to get a Python exception as a result.

just a few ideas,
Jeff
 

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

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top