Re: Core dumps building Python on AIX
Guido van Rossum <[email protected]> Wed, 14 Aug 2002 22:37:37 -0400
| Newsgroups | gmane.comp.python.snake-farm.user |
|---|---|
| Message-ID | <[email protected]> |
> Okay, I've built a gdb now. It seems to be a python core file. > > Here are the first ten levels from 'bt': > #0 0xd01918f0 in Py_InitModule4 () at modsupport.c:35 > #1 0xd0190870 in initstruct () at structmodule.c:1508 > #2 0x100f2e90 in _PyImport_LoadDynamicModule (name=0x0, pathname=0x0, > fp=0x2ff20f18) at importdl.c:53 > #3 0x10067160 in imp_load_dynamic (self=0x0, args=0x203acecc) at import.c:2377 > #4 0x100a101c in PyCFunction_Call (func=0x202be46c, arg=0x203acecc, kw=0x0) > at methodobject.c:80 > #5 0x100462a4 in eval_frame (f=0x203e8244) at ceval.c:1971 > #6 0x10048644 in PyEval_EvalCodeEx (co=0x202bc760, globals=0x202632d4, > locals=0x0, args=0x203e1acc, argcount=2, kws=0x203e1ad4, kwcount=0, > defs=0x0, defcount=0, closure=0x0) at ceval.c:2552 > #7 0x1004b110 in fast_function (func=0x202e4b8c, pp_stack=0x2ff211d8, n=2, > na=2, nk=0) at ceval.c:3137 > #8 0x10046490 in eval_frame (f=0x203e1974) at ceval.c:1991 > #9 0x10048644 in PyEval_EvalCodeEx (co=0x202d8c60, globals=0x202d3a44, > locals=0x0, args=0x203177d8, argcount=1, kws=0x0, kwcount=0, defs=0x0, > defcount=0, closure=0x0) at ceval.c:2552 > > What am I looking for? The line numbers and function names make sense, but the argument values don't. Can you rebuild without -O3? But I'm confused. Earlier it looked like the makexp_aix script was failing, but apparently that's not the case here, because it doesn't invoke Python. I'd like to see more precisely what the Makefile is doing at this point. I'm *guessing* that since it's calling Python, that must meant it's running setup.py. The struct module is the first module that's built, so that makes sense as well: after a successful build, setup.py tries to import the module it just built, and apparently it dies in the module initialization of the just-loaded module. So it sounds like there's a problem with dynamically loaded modules... Have you scanned Misc/AIX-NOTES for clues? Have you got any understanding of AIX? Maybe you understand what makexp_aix is trying to do, and how it could fail when using GCC? (I think that when it was written, the AIX compiler was generally used.) Alternatively, you may try to enable most modules statically in the Modules/Setup file, and forget about dynamically loading of extensions. But that seems a shame, and should be done as a last resort only. --Guido van Rossum (home page: http://www.python.org/~guido/)