[SciPy-dev] petsc4py support? (segfault)

Neilen Marais nmarais@sun.ac...
Mon May 19 16:13:55 CDT 2008


On Mon, 19 May 2008 22:59:10 +0200, Johann Cohen-Tanugi wrote:

> and now type where at the gdb prompt.... Johann

Sorry, bit fuzzy in the brain today :) Remembered to install the dbg 
pacakges, but not do the backtrace hehe.


$ gdb python
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/
gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) run
Starting program: /usr/bin/python 
[Thread debugging using libthread_db enabled]
Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
[New Thread 0x7fef39d086e0 (LWP 14775)]
>>> import petsc4py.PETSc

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fef39d086e0 (LWP 14775)]
0x00007fef34accb8b in _int_malloc () from /usr/lib/libopen-pal.so.0
(gdb) where
#0  0x00007fef34accb8b in _int_malloc () from /usr/lib/libopen-pal.so.0
#1  0x00007fef34acde58 in malloc () from /usr/lib/libopen-pal.so.0
#2  0x00007fef34aafbfb in opal_class_initialize ()
   from /usr/lib/libopen-pal.so.0
#3  0x00007fef34ac3e2b in opal_malloc_init () from /usr/lib/libopen-
pal.so.0
#4  0x00007fef34ab0d97 in opal_init_util () from /usr/lib/libopen-pal.so.0
#5  0x00007fef34ab0e76 in opal_init () from /usr/lib/libopen-pal.so.0
#6  0x00007fef34f94723 in ompi_mpi_init () from /usr/lib/libmpi.so.0
#7  0x00007fef34fb60d6 in PMPI_Init () from /usr/lib/libmpi.so.0
#8  0x00007fef36fd090e in PetscInitialize ()
   from /usr/lib/petsc/lib/linux-gnu-c-opt/libpetsc.so.2.3.3
#9  0x00007fef383c224b in _wrap_PetscInitialize (self=<value optimized 
out>, 
    args=<value optimized out>) at petsc/lib/ext/petscext_wrap.c:6784
#10 0x0000000000488a88 in PyEval_EvalFrameEx (f=0x7e92e0, 
    throwflag=<value optimized out>) at ../Python/ceval.c:3557
#11 0x000000000048a376 in PyEval_EvalCodeEx (co=0x7fef39bdb558, 
    globals=<value optimized out>, locals=<value optimized out>, 
args=0x0, 
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
    at ../Python/ceval.c:2836
#12 0x000000000048a492 in PyEval_EvalCode (co=0x0, globals=0x0, 
    locals=0xff4ba000) at ../Python/ceval.c:494
#13 0x00000000004a0a00 in PyImport_ExecCodeModuleEx (
    name=0x7fff41d38f40 "petsc4py.lib._petsc", co=0x7fef39bdb558, 
---Type <return> to continue, or q <return> to quit---
    pathname=0x7fff41d36de0 "/usr/lib/python2.5/site-packages/petsc4py/
lib/_petsc.pyc") at ../Python/import.c:675
#14 0x00000000004a1230 in load_source_module (
    name=0x7fff41d38f40 "petsc4py.lib._petsc", 
    pathname=0x7fff41d36de0 "/usr/lib/python2.5/site-packages/petsc4py/
lib/_petsc.pyc", fp=<value optimized out>) at ../Python/import.c:959
#15 0x00000000004a1809 in import_submodule (mod=0x7fef39bd5638, 
    subname=0x7fef39cc5114 "_petsc", 
    fullname=0x7fff41d38f40 "petsc4py.lib._petsc") at ../Python/
import.c:2400
#16 0x00000000004a1ad1 in ensure_fromlist (mod=0x7fef39bd5638, 
    fromlist=0x7fef39cf7d50, buf=0x7fff41d38f40 "petsc4py.lib._petsc", 
    buflen=12, recursive=0) at ../Python/import.c:2311
#17 0x00000000004a2115 in import_module_level (name=0x0, 
    globals=<value optimized out>, locals=<value optimized out>, 
    fromlist=0x7fef39cf7d50, level=<value optimized out>)
    at ../Python/import.c:2038
#18 0x00000000004a23c5 in PyImport_ImportModuleLevel (
    name=0x7fef39cc3b7c "petsc4py.lib", globals=0x7dbef0, 
locals=0x7dbef0, 
    fromlist=0x7fef39cf7d50, level=-1) at ../Python/import.c:2072
#19 0x0000000000481a19 in builtin___import__ (self=<value optimized out>, 
    args=<value optimized out>, kwds=<value optimized out>)
    at ../Python/bltinmodule.c:47
#20 0x0000000000417e73 in PyObject_Call (func=0x0, arg=0x0, kw=0xff4ba000)
---Type <return> to continue, or q <return> to quit---
    at ../Objects/abstract.c:1861
#21 0x0000000000481fc2 in PyEval_CallObjectWithKeywords 
(func=0x7fef39cd55f0, 
    arg=0x7fef39cb6940, kw=0x0) at ../Python/ceval.c:3442
#22 0x0000000000485b61 in PyEval_EvalFrameEx (f=0x7e8ba0, 
    throwflag=<value optimized out>) at ../Python/ceval.c:2067
#23 0x000000000048a376 in PyEval_EvalCodeEx (co=0x7fef39cbf5d0, 
    globals=<value optimized out>, locals=<value optimized out>, 
args=0x0, 
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
    at ../Python/ceval.c:2836
#24 0x000000000048a492 in PyEval_EvalCode (co=0x0, globals=0x0, 
    locals=0xff4ba000) at ../Python/ceval.c:494
#25 0x00000000004a0a00 in PyImport_ExecCodeModuleEx (
    name=0x7fff41d3c500 "petsc4py.Error", co=0x7fef39cbf5d0, 
    pathname=0x7fff41d3a3b0 "/usr/lib/python2.5/site-packages/petsc4py/
Error.pyc") at ../Python/import.c:675
#26 0x00000000004a1230 in load_source_module (
    name=0x7fff41d3c500 "petsc4py.Error", 
    pathname=0x7fff41d3a3b0 "/usr/lib/python2.5/site-packages/petsc4py/
Error.pyc", fp=<value optimized out>) at ../Python/import.c:959
#27 0x00000000004a1809 in import_submodule (mod=0x7fef39cc3a60, 
    subname=0x7fff41d3c509 "Error", fullname=0x7fff41d3c500 
"petsc4py.Error")
    at ../Python/import.c:2400
#28 0x00000000004a1cdb in load_next (mod=0x7fef39cc3a60, 
---Type <return> to continue, or q <return> to quit---
    altmod=0x7fef39cc3a60, p_name=<value optimized out>, 
    buf=0x7fff41d3c500 "petsc4py.Error", p_buflen=0x7fff41d3c4f8)
    at ../Python/import.c:2220
#29 0x00000000004a1f5d in import_module_level (name=0x0, 
    globals=<value optimized out>, locals=<value optimized out>, 
    fromlist=0x7fef39cbe210, level=<value optimized out>)
    at ../Python/import.c:2008
#30 0x00000000004a23c5 in PyImport_ImportModuleLevel (
    name=0x7fef39cc3de4 "petsc4py.Error", globals=0x7dbdd0, 
locals=0x7dbdd0, 
    fromlist=0x7fef39cbe210, level=-1) at ../Python/import.c:2072
#31 0x0000000000481a19 in builtin___import__ (self=<value optimized out>, 
    args=<value optimized out>, kwds=<value optimized out>)
    at ../Python/bltinmodule.c:47
#32 0x0000000000417e73 in PyObject_Call (func=0x0, arg=0x0, kw=0xff4ba000)
    at ../Objects/abstract.c:1861
#33 0x0000000000481fc2 in PyEval_CallObjectWithKeywords 
(func=0x7fef39cd55f0, 
    arg=0x7fef39c9baa0, kw=0x0) at ../Python/ceval.c:3442
#34 0x0000000000485b61 in PyEval_EvalFrameEx (f=0x7e7300, 
    throwflag=<value optimized out>) at ../Python/ceval.c:2067
#35 0x000000000048a376 in PyEval_EvalCodeEx (co=0x7fef39cabaf8, 
    globals=<value optimized out>, locals=<value optimized out>, 
args=0x0, 
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
    at ../Python/ceval.c:2836
---Type <return> to continue, or q <return> to quit---
#36 0x000000000048a492 in PyEval_EvalCode (co=0x0, globals=0x0, 
    locals=0xff4ba000) at ../Python/ceval.c:494
#37 0x00000000004a0a00 in PyImport_ExecCodeModuleEx (
    name=0x7fff41d3fac0 "petsc4py.PETSc", co=0x7fef39cabaf8, 
    pathname=0x7fff41d3d970 "/usr/lib/python2.5/site-packages/petsc4py/
PETSc.pyc") at ../Python/import.c:675
#38 0x00000000004a1230 in load_source_module (
    name=0x7fff41d3fac0 "petsc4py.PETSc", 
    pathname=0x7fff41d3d970 "/usr/lib/python2.5/site-packages/petsc4py/
PETSc.pyc", fp=<value optimized out>) at ../Python/import.c:959
#39 0x00000000004a1809 in import_submodule (mod=0x7fef39cc3a60, 
    subname=0x7fff41d3fac9 "PETSc", fullname=0x7fff41d3fac0 
"petsc4py.PETSc")
    at ../Python/import.c:2400
#40 0x00000000004a1cdb in load_next (mod=0x7fef39cc3a60, 
    altmod=0x7fef39cc3a60, p_name=<value optimized out>, 
    buf=0x7fff41d3fac0 "petsc4py.PETSc", p_buflen=0x7fff41d3fab8)
    at ../Python/import.c:2220
#41 0x00000000004a1f5d in import_module_level (name=0x0, 
    globals=<value optimized out>, locals=<value optimized out>, 
    fromlist=0x72c460, level=<value optimized out>) at ../Python/
import.c:2008
#42 0x00000000004a23c5 in PyImport_ImportModuleLevel (
    name=0x7fef39cc3a2c "petsc4py.PETSc", globals=0x77e2e0, 
locals=0x77e2e0, 
    fromlist=0x72c460, level=-1) at ../Python/import.c:2072
---Type <return> to continue, or q <return> to quit---
#43 0x0000000000481a19 in builtin___import__ (self=<value optimized out>, 
    args=<value optimized out>, kwds=<value optimized out>)
    at ../Python/bltinmodule.c:47
#44 0x0000000000417e73 in PyObject_Call (func=0x0, arg=0x0, kw=0xff4ba000)
    at ../Objects/abstract.c:1861
#45 0x0000000000481fc2 in PyEval_CallObjectWithKeywords 
(func=0x7fef39cd55f0, 
    arg=0x7fef39c9b940, kw=0x0) at ../Python/ceval.c:3442
#46 0x0000000000485b61 in PyEval_EvalFrameEx (f=0x7e6f00, 
    throwflag=<value optimized out>) at ../Python/ceval.c:2067
#47 0x000000000048a376 in PyEval_EvalCodeEx (co=0x7fef39cb3300, 
    globals=<value optimized out>, locals=<value optimized out>, 
args=0x0, 
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
    at ../Python/ceval.c:2836
#48 0x000000000048a492 in PyEval_EvalCode (co=0x0, globals=0x0, 
    locals=0xff4ba000) at ../Python/ceval.c:494
#49 0x00000000004ac459 in PyRun_InteractiveOneFlags (fp=<value optimized 
out>, 
    filename=0x4e5c58 "<stdin>", flags=0x7fff41d410a0)
    at ../Python/pythonrun.c:1273
#50 0x00000000004ac664 in PyRun_InteractiveLoopFlags (fp=0x7fef392796a0, 
    filename=0x4e5c58 "<stdin>", flags=0x7fff41d410a0)
    at ../Python/pythonrun.c:723
#51 0x00000000004ac76a in PyRun_AnyFileExFlags (fp=0x7fef392796a0, 
    filename=0x4e5c58 "<stdin>", closeit=0, flags=0x7fff41d410a0)
---Type <return> to continue, or q <return> to quit---
    at ../Python/pythonrun.c:692
#52 0x00000000004145ad in Py_Main (argc=<value optimized out>, 
    argv=<value optimized out>) at ../Modules/main.c:523
#53 0x00007fef38f3b1c4 in __libc_start_main () from /lib/libc.so.6
#54 0x0000000000413b29 in _start ()



More information about the Scipy-dev mailing list