[SciPy-dev] Segfault in scipy.stats

Neil Martinsen-Burrell nmb at wartburg.edu
Thu Oct 12 09:55:22 CDT 2006


I get the following segmentation fault when trying to import
scipy.stats.  This is on MacOS 10.4.8, python 2.5, IBM XLF fortran
compiler, SciPy 0.5.1, numpy 1.0rc2.  Any ideas?  This is a fresh
source build using GCC 3.3.

-Neil

-- 

nmb at quaggy[~/Desktop]$ gdb --args `python -c "import sys;print sys.executable"`
GNU gdb 6.3.50-20050815 (Apple version gdb-563) (Wed Jul 19 05:17:43 GMT 2006)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin"...Reading symbols for shared libraries .... done

(gdb) r
Starting program: /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python 
Reading symbols for shared libraries .+ done
Python 2.5 (r25:51908, Oct  5 2006, 08:33:45) 
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Reading symbols for shared libraries .... done
>>> import scipy.stats
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries ......... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries ........................................................... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries ... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x2f830000
0x2f830000 in ?? ()
(gdb) where
#0  0x2f830000 in ?? ()
Cannot access memory at address 0x2f830000
Cannot access memory at address 0x2f830000
Cannot access memory at address 0x2f830000
Cannot access memory at address 0x2f830000
Cannot access memory at address 0x2f830000
Cannot access memory at address 0x2f830000
#1  0x02a41510 in PyFortranObject_New (defs=Cannot access memory at address 0x2f830000
Cannot access memory at address 0x2f830000
Cannot access memory at address 0x2f830000
Cannot access memory at address 0x2f830000
Cannot access memory at address 0x2f830000
Cannot access memory at address 0x2f830000
Cannot access memory at address 0x2f830000
0x0, init=Cannot access memory at address 0x2f830000
0) at build/src.macosx-10.3-ppc-2.5/fortranobject.c:60
Cannot access memory at address 0x2f830000
#2  0x02a408a8 in initmvn () at build/src.macosx-10.3-ppc-2.5/Lib/stats/mvnmodule.c:629
Cannot access memory at address 0x2f830000
#3  0x002d0454 in _PyImport_LoadDynamicModule (name=0xbfffc5ac "scipy.stats.mvn", pathname=0xbfffc0c0 "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/stats/mvn.so", fp=0x0) at ./Python/importdl.c:53
#4  0x002ce538 in import_submodule (mod=0x136f830, subname=0xbfffc5b8 "mvn", fullname=0xbfffc5ac "scipy.stats.mvn") at Python/import.c:2383
#5  0x002ce7e0 in load_next (mod=0x136f830, altmod=Cannot access memory at address 0x2f830000
Cannot access memory at address 0x2f830000
0x32a2c8, p_name=0xbfffc5b8, buf=0xbfffc5ac "scipy.stats.mvn", p_buflen=0xbfffc5a8) at Python/import.c:2203
#6  0x002cef10 in import_module_level (name=0x0, globals=0x600150, locals=Cannot access memory at address 0x2f830000
0x2a49418, fromlist=0x32a2c8, level=-1) at Python/import.c:1984
#7  0x002cf2d8 in PyImport_ImportModuleLevel (name=0x29f6c74 "mvn", globals=0x29f4e40, locals=0x29f4e40, fromlist=0x32a2c8, level=-1) at Python/import.c:2055
#8  0x002a6d28 in builtin___import__ (self=Cannot access memory at address 0x2f830000
0x4e800020, args=Cannot access memory at address 0x2f830000
0x0, kwds=Cannot access memory at address 0x2f830000
0x2a49418) at Python/bltinmodule.c:47
#9  0x0020dee4 in PyObject_Call (func=Cannot access memory at address 0x2f830000
0x4e800020, arg=Cannot access memory at address 0x2f830000
0x0, kw=Cannot access memory at address 0x2f830000
0x2a49418) at Objects/abstract.c:1860
#10 0x002ac9a0 in PyEval_CallObjectWithKeywords (func=0xe4b8, arg=0x1766a80, kw=0x0) at Python/ceval.c:3435
#11 0x002b16fc in PyEval_EvalFrameEx (f=0x6b6ea0, throwflag=7040988) at Python/ceval.c:2065
#12 0x002b45a0 in PyEval_EvalCodeEx (co=0x176d848, globals=Cannot access memory at address 0x2f830000
0x0, locals=Cannot access memory at address 0x2f830000
0xb8, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2833
#13 0x002b4740 in PyEval_EvalCode (co=Cannot access memory at address 0x2f830000
0x4e800020, globals=Cannot access memory at address 0x2f830000
0x0, locals=Cannot access memory at address 0x2f830000
0x2a49418) at Python/ceval.c:494
#14 0x002ccf30 in PyImport_ExecCodeModuleEx (name=0xbfffd73c "scipy.stats.kde", co=0x176d848, pathname=0xbfffcdd8 "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/stats/kde.pyc") at Python/import.c:658
#15 0x002cd460 in load_source_module (name=0xbfffd73c "scipy.stats.kde", pathname=0xbfffcdd8 "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/stats/kde.pyc", fp=0x176d848) at Python/import.c:942
#16 0x002ce538 in import_submodule (mod=0x136f830, subname=0xbfffd748 "kde", fullname=0xbfffd73c "scipy.stats.kde") at Python/import.c:2383
#17 0x002ce7e0 in load_next (mod=0x136f830, altmod=0x32a2c8, p_name=0xbfffd748, buf=0xbfffd73c "scipy.stats.kde", p_buflen=0xbfffd738) at Python/import.c:2203
#18 0x002cef10 in import_module_level (name=0x0, globals=0x600150, locals=Cannot access memory at address 0x2f830000
0x2a49418, fromlist=0x1346290, level=-1) at Python/import.c:1984
#19 0x002cf2d8 in PyImport_ImportModuleLevel (name=0x135e214 "kde", globals=0x13758a0, locals=0x13758a0, fromlist=0x1346290, level=-1) at Python/import.c:2055
#20 0x002a6d28 in builtin___import__ (self=Cannot access memory at address 0x2f830000
0x4e800020, args=Cannot access memory at address 0x2f830000
0x0, kwds=Cannot access memory at address 0x2f830000
0x2a49418) at Python/bltinmodule.c:47
#21 0x0020dee4 in PyObject_Call (func=Cannot access memory at address 0x2f830000
0x4e800020, arg=Cannot access memory at address 0x2f830000
0x0, kw=Cannot access memory at address 0x2f830000
0x2a49418) at Objects/abstract.c:1860
#22 0x002ac9a0 in PyEval_CallObjectWithKeywords (func=0xe4b8, arg=0x57d20, kw=0x0) at Python/ceval.c:3435
#23 0x002b16fc in PyEval_EvalFrameEx (f=0x658790, throwflag=6654156) at Python/ceval.c:2065
#24 0x002b45a0 in PyEval_EvalCodeEx (co=0x1374218, globals=Cannot access memory at address 0x2f830000
0x0, locals=Cannot access memory at address 0x2f830000
0xb8, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2833
#25 0x002b4740 in PyEval_EvalCode (co=Cannot access memory at address 0x2f830000
0x4e800020, globals=Cannot access memory at address 0x2f830000
0x0, locals=Cannot access memory at address 0x2f830000
0x2a49418) at Python/ceval.c:494
#26 0x002ccf30 in PyImport_ExecCodeModuleEx (name=0xbfffed3c "scipy.stats", co=0x1374218, pathname=0xbfffdf68 "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/stats/__init__.pyc") at Python/import.c:658
#27 0x002cd460 in load_source_module (name=0xbfffed3c "scipy.stats", pathname=0xbfffdf68 "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/stats/__init__.pyc", fp=0x1374218) at Python/import.c:942
#28 0x002cdf08 in load_package (name=0xbfffed3c "scipy.stats", pathname=0x1344a70 "") at Python/import.c:998
#29 0x002ce538 in import_submodule (mod=0x63430, subname=0xbfffed42 "stats", fullname=0xbfffed3c "scipy.stats") at Python/import.c:2383
#30 0x002ce7e0 in load_next (mod=0x63430, altmod=0x63430, p_name=0xbfffed42, buf=0xbfffed3c "scipy.stats", p_buflen=0xbfffed38) at Python/import.c:2203
#31 0x002cef48 in import_module_level (name=0x0, globals=0x63430, locals=Cannot access memory at address 0x2f830000
0x2a49418, fromlist=0x32a2c8, level=406576) at Python/import.c:1991
#32 0x002cf2d8 in PyImport_ImportModuleLevel (name=0x62e6c "scipy.stats", globals=0x1fc90, locals=0x1fc90, fromlist=0x32a2c8, level=-1) at Python/import.c:2055
#33 0x002a6d28 in builtin___import__ (self=Cannot access memory at address 0x2f830000
0x4e800020, args=Cannot access memory at address 0x2f830000
0x0, kwds=Cannot access memory at address 0x2f830000
0x2a49418) at Python/bltinmodule.c:47
#34 0x0020dee4 in PyObject_Call (func=Cannot access memory at address 0x2f830000
0x4e800020, arg=Cannot access memory at address 0x2f830000
0x0, kw=Cannot access memory at address 0x2f830000
0x2a49418) at Objects/abstract.c:1860
#35 0x002ac9a0 in PyEval_CallObjectWithKeywords (func=0xe4b8, arg=0x1e480, kw=0x0) at Python/ceval.c:3435
#36 0x002b16fc in PyEval_EvalFrameEx (f=0x60ce10, throwflag=6344524) at Python/ceval.c:2065
#37 0x002b45a0 in PyEval_EvalCodeEx (co=0x43f08, globals=Cannot access memory at address 0x2f830000
0x0, locals=Cannot access memory at address 0x2f830000
0xb8, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2833
#38 0x002b4740 in PyEval_EvalCode (co=Cannot access memory at address 0x2f830000
0x4e800020, globals=Cannot access memory at address 0x2f830000
0x0, locals=Cannot access memory at address 0x2f830000
0x2a49418) at Python/ceval.c:494
#39 0x002d9ef4 in PyRun_InteractiveOneFlags (fp=0x0, filename=0x317d40 "<stdin>", flags=0xbffff668) at Python/pythonrun.c:1264
#40 0x002da100 in PyRun_InteractiveLoopFlags (fp=0xa0001b9c, filename=0x317d40 "<stdin>", flags=0xbffff668) at Python/pythonrun.c:714
#41 0x002da7b0 in PyRun_AnyFileExFlags (fp=0xa0001b9c, filename=0x317d40 "<stdin>", closeit=0, flags=0xbffff668) at Python/pythonrun.c:683
#42 0x002e9e2c in Py_Main (argc=1, argv=0xbffff7ec) at Modules/main.c:496
#43 0x000019bc in ?? ()
#44 0x000016c0 in ?? ()
(gdb) 

-- 
Neil Martinsen-Burrell
nmb at wartburg.edu


More information about the Scipy-dev mailing list