python2.1 SEGV on Solaris 2.7

Martin von Loewis loewis at informatik.hu-berlin.de
Wed Oct 17 09:52:35 EDT 2001


Anthony Baxter <anthony at interlink.com.au> writes:

> I've got a Zope installation where python2.1 is segfaulting on 
> Solaris2.7 - it's running a largish ZEO server. The tail of the
> gdb output is:
>  #128 0x26164 in PyEval_CallObjectWithKeywords ()
>  #129 0x264c0 in PyEval_CallObjectWithKeywords ()
>  #130 0x26140 in PyEval_CallObjectWithKeywords ()
>  #131 0x25fc0 in PyEval_CallObjectWithKeywords ()
>  #132 0x517bc in PyInstance_New ()
>  #133 0x261a4 in PyEval_CallObjectWithKeywords ()
>  #134 0x25fc0 in PyEval_CallObjectWithKeywords ()
>  #135 0x42c90 in initgc ()

Looks like a stack overflow to me (with 128 stack frames). I somehow
doubt that gdb correctly represents the function names, though:
PyEval_CallObjectWithKeywords doesn't call itself recursively. Are you
sure that:

a) you've compiled python with debugging information?
b) gdb really sees that python binary that causes the crash?

If there is a stack overflow in the gc, you may succeed using Python
2.1.1, or the 2.2 betas: much of the recursion in the gc has been
removed (although I thought that already happened in 2.1).

If there is a true stack overflow in user code, you may "succeed" in
calling sys.setrecursionlimit sometime early, lowering the current
value. Instead of a crash, you'd get then a StackOverflow exception.

You can also increase your stack size, see ulimit(1) for details.

> <anthony at devhost1>$ gcc -v
> Reading specs from /opt/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs
> gcc version 2.95.2 19991024 (release)
> which is a bit old. 

That compiler should work fine; it is likely not the cause of the
problem.

> Has anyone seen anything like this? I'm going to rebuild with
> gcc3.0 and also try turning off GC. 

I'd advise against using gcc 3 for that. At a minimum, gcc 3.0.1
should be used. Since that still has many bugs (and 3.0.2 will be
released shortly), staying with 2.95.x for some time is advisable -
atleast to reduce the number of potential causes for the problem.

Regards,
Martin




More information about the Python-list mailing list