[Insight-users] All python tests fail

Marco Nolden m.nolden at dkfz-heidelberg.de
Thu Nov 29 07:52:33 EST 2007


Gaëtan Lehmann wrote:
> 
> Le 28 nov. 07 à 20:01, Marco Nolden a écrit :
> 
>> nolden at mbi056:~$
>> PYTHONPATH=/local/nolden/itk-bin-wo-cswig/Wrapping/WrapITK/Python/:/local/nolden/itk-bin-wo-cswig/bin/:$PYTHONPATH
>>
>>[...]
> This one is nice.
> Can you try to run one of the failed tests by hand, for example:
> 
>  
> PYTHONPATH=/local/nolden/itk-bin-wo-cswig/Wrapping/WrapITK/Python/:/local/nolden/itk-bin-wo-cswig/bin/:$PYTHONPATH
> /usr/bin/python /usr/bin/python
> /local/nolden/itk-3.4.0/InsightToolkit-3.4.0/Wrapping/WrapITK/Python/Tests/template.py;
> echo $?
> 
> ? (There is no output log for this one in
> http://www.itk.org/Testing/Sites/mbi056/Linux-c++/20071128-0957-Experimental/Results/__Wrapping_WrapITK_Python_Tests_PythonTemplate.html)
> 
> 
Segmentation fault, see attached gdb output.

> Also, can you check if the tests are always failing? I suspect a problem
> with itkTestDriver, rather than a problem in python layer.
> I think you know how to use ctest, but just in case I'm wrong: you can
> choose to run only the python tests with the command "ctest -R Python",
> or even a single test with "ctest -R PythonTemplate" for example.
> 
Same segfault for the MedianImageFilter test.

 Just for fun I tried executing it with python2.4 and at least got a
python error (after lots of warnings abount mismatching API versions):
Traceback (most recent call last):
  File
"/local/nolden/itk-3.4.0/InsightToolkit-3.4.0/Wrapping/WrapITK/Python/Tests/MedianImageFilter.py",
line 13, in ?
    filter  = itk.MedianImageFilter[IType, IType].New( reader,
Radius=eval( argv[3] ) )
  File
"/local/nolden/itk-bin-wo-cswig/Wrapping/WrapITK/Python/itkTemplate.py",
line 357, in New
    attrib(value)
  File "/local/nolden/itk-bin-wo-cswig/bin/itkMedianImageFilter.py",
line 155, in SetRadius
    def SetRadius(*args): return
_itkMedianImageFilter.itkMedianImageFilterIUS2IUS2_Pointer_SetRadius(*args)
TypeError: Expected a pointer

Don't know if this makes sense.

I did an additional test:

1. old wrapping method, same system:
All tests fail, strangely no PYTHONPATH is set at all:

http://www.itk.org/Testing/Sites/mbi056/Linux-c++/20071129-0907-Experimental/Test.html

After manually setting the path I could execute the MedianImageFilter
without errors but got a black result picture.

Right now I'm building ITK again with new wrapping and forced python2.4
(on ubuntu 7.10) and also started testing a x86-64 Suse 10.2. Results
should be available as an Experimental Build soon (Hostname eigg)


> Thanks for your patience,
> 
> Gaëtan
> 
Thanks for the support.

Marco


-------------- next part --------------
nolden at mbi056:/local/nolden/itk-bin-wo-cswig$ PYTHONPATH=/local/nolden/itk-bin-wo-cswig/Wrapping/WrapITK/Python/:/local/nolden/itk-bin-wo-cswig/bin/:$PYTHONPATH /usr/bin/python /local/nolden/itk-3.4.0/InsightToolkit-3.4.0/Wrapping/WrapITK/Python/Tests/template.py; echo $?
Segmentation fault (core dumped)
139
nolden at mbi056:/local/nolden/itk-bin-wo-cswig$ export PYTHONPATH=/local/nolden/itk-bin-wo-cswig/Wrapping/WrapITK/Python/:/local/nolden/itk-bin-wo-cswig/bin/:$PYTHONPATH
nolden at mbi056:/local/nolden/itk-bin-wo-cswig$ gdb /usr/bin/python
GNU gdb 6.6-debian
Copyright (C) 2006 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 "i486-linux-gnu"...
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) run /local/nolden/itk-3.4.0/InsightToolkit-3.4.0/Wrapping/WrapITK/Python/Tests/template.py
Starting program: /usr/bin/python /local/nolden/itk-3.4.0/InsightToolkit-3.4.0/Wrapping/WrapITK/Python/Tests/template.py
[Thread debugging using libthread_db enabled]
[New Thread -1210189632 (LWP 11538)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210189632 (LWP 11538)]
0xb7e50583 in strlen () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7e50583 in strlen () from /lib/tls/i686/cmov/libc.so.6
#1  0x080944ea in PyString_FromString (str=0x0) at ../Objects/stringobject.c:108
#2  0x080e5dad in PyModule_AddStringConstant (m=0x97612b4, name=0xb34aed50 "XML_ERROR_ENTITY_DECLARED_IN_PE", value=0x0)
    at ../Python/modsupport.c:630
#3  0xb34985bf in initpyexpat () from /usr/lib/python2.5/site-packages/_xmlplus/parsers/pyexpat.so
#4  0x080e1a34 in _PyImport_LoadDynamicModule (name=0xbfdc7e17 "xml.parsers.pyexpat",
    pathname=0xbfdc6da7 "/usr/lib/python2.5/site-packages/_xmlplus/parsers/pyexpat.so", fp=0x9db6488)
    at ../Python/importdl.c:53
#5  0x080df6d5 in load_module (name=0xbfdc7e17 "xml.parsers.pyexpat", fp=0x0,
    buf=0xbfdc6da7 "/usr/lib/python2.5/site-packages/_xmlplus/parsers/pyexpat.so", type=3, loader=0x0)
    at ../Python/import.c:1758
#6  0x080df98b in import_submodule (mod=0x9761c44, subname=0xbfdc7e23 "pyexpat", fullname=0xbfdc7e17 "xml.parsers.pyexpat")
    at ../Python/import.c:2400
#7  0x080dfe3e in load_next (mod=0x9761c44, altmod=0x81466b8, p_name=<value optimized out>,
    buf=0xbfdc7e17 "xml.parsers.pyexpat", p_buflen=0xbfdc7e10) at ../Python/import.c:2220
#8  0x080e0068 in import_module_level (name=0x0, globals=0x816a170, locals=<value optimized out>, fromlist=0x9d4250c,
    level=-1) at ../Python/import.c:2001
#9  0x080e04f7 in PyImport_ImportModuleLevel (name=0x9d9c6d4 "pyexpat", globals=0x9d8cf0c, locals=0x9d8cf0c,
    fromlist=0x9d4250c, level=-1) at ../Python/import.c:2072
#10 0x080c1db4 in builtin___import__ (self=0x0, args=0x9d2984c, kwds=0x0) at ../Python/bltinmodule.c:47
#11 0x0805c9e7 in PyObject_Call (func=0x0, arg=0x9d2984c, kw=0x0) at ../Objects/abstract.c:1860
#12 0x080c232c in PyEval_CallObjectWithKeywords (func=0xb7da7e6c, arg=0x9d2984c, kw=0x0) at ../Python/ceval.c:3433
#13 0x080c4a9d in PyEval_EvalFrameEx (f=0x97a50d4, throwflag=0) at ../Python/ceval.c:2063
#14 0x080ca115 in PyEval_EvalCodeEx (co=0x9d460f8, globals=0x9d8cf0c, locals=0x9d8cf0c, args=0x0, argcount=0, kws=0x0,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2831
#15 0x080ca187 in PyEval_EvalCode (co=0x9d460f8, globals=0x9d8cf0c, locals=0x9d8cf0c) at ../Python/ceval.c:494
#16 0x080de9ac in PyImport_ExecCodeModuleEx (name=0xbfdcb247 "xml.parsers.expat", co=0x9d460f8,
    pathname=0xbfdc9197 "/usr/lib/python2.5/site-packages/_xmlplus/parsers/expat.pyc") at ../Python/import.c:675
#17 0x080df306 in load_source_module (name=0xbfdcb247 "xml.parsers.expat",
    pathname=0xbfdc9197 "/usr/lib/python2.5/site-packages/_xmlplus/parsers/expat.pyc", fp=<value optimized out>)
    at ../Python/import.c:959
---Type <return> to continue, or q <return> to quit---
#18 0x080df98b in import_submodule (mod=0x9761c44, subname=0xbfdcb253 "expat", fullname=0xbfdcb247 "xml.parsers.expat")
    at ../Python/import.c:2400
#19 0x080dfe3e in load_next (mod=0x9761c44, altmod=0x9761c44, p_name=<value optimized out>,
    buf=0xbfdcb247 "xml.parsers.expat", p_buflen=0xbfdcb240) at ../Python/import.c:2220
#20 0x080e00b0 in import_module_level (name=0x0, globals=<value optimized out>, locals=<value optimized out>,
    fromlist=0x9cfa7ec, level=-1) at ../Python/import.c:2008
#21 0x080e04f7 in PyImport_ImportModuleLevel (name=0x9d085a4 "xml.parsers.expat", globals=0x9cfc79c, locals=0x9cfc79c,
    fromlist=0x9cfa7ec, level=-1) at ../Python/import.c:2072
#22 0x080c1db4 in builtin___import__ (self=0x0, args=0x9d07b44, kwds=0x0) at ../Python/bltinmodule.c:47
#23 0x0805c9e7 in PyObject_Call (func=0x0, arg=0x9d07b44, kw=0x0) at ../Objects/abstract.c:1860
#24 0x080c232c in PyEval_CallObjectWithKeywords (func=0xb7da7e6c, arg=0x9d07b44, kw=0x0) at ../Python/ceval.c:3433
#25 0x080c4a9d in PyEval_EvalFrameEx (f=0x9c440dc, throwflag=0) at ../Python/ceval.c:2063
#26 0x080ca115 in PyEval_EvalCodeEx (co=0x9d0b3c8, globals=0x9cfc79c, locals=0x9cfc79c, args=0x0, argcount=0, kws=0x0,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2831
#27 0x080ca187 in PyEval_EvalCode (co=0x9d0b3c8, globals=0x9cfc79c, locals=0x9cfc79c) at ../Python/ceval.c:494
#28 0x080de9ac in PyImport_ExecCodeModuleEx (name=0xbfdce677 "apport.report", co=0x9d0b3c8,
    pathname=0xbfdcc5c7 "/var/lib/python-support/python2.5/apport/report.pyc") at ../Python/import.c:675
#29 0x080df306 in load_source_module (name=0xbfdce677 "apport.report",
    pathname=0xbfdcc5c7 "/var/lib/python-support/python2.5/apport/report.pyc", fp=<value optimized out>)
    at ../Python/import.c:959
#30 0x080df98b in import_submodule (mod=0x976117c, subname=0xbfdce67e "report", fullname=0xbfdce677 "apport.report")
    at ../Python/import.c:2400
#31 0x080dfe3e in load_next (mod=0x976117c, altmod=0x976117c, p_name=<value optimized out>, buf=0xbfdce677 "apport.report",
    p_buflen=0xbfdce670) at ../Python/import.c:2220
#32 0x080e00b0 in import_module_level (name=0x0, globals=<value optimized out>, locals=<value optimized out>,
    fromlist=0x9cfa74c, level=-1) at ../Python/import.c:2008
#33 0x080e04f7 in PyImport_ImportModuleLevel (name=0xb7d62d04 "apport.report", globals=0x9cfc604, locals=0x9cfc604,
    fromlist=0x9cfa74c, level=-1) at ../Python/import.c:2072
#34 0x080c1db4 in builtin___import__ (self=0x0, args=0x9cfdb94, kwds=0x0) at ../Python/bltinmodule.c:47
#35 0x0805c9e7 in PyObject_Call (func=0x0, arg=0x9cfdb94, kw=0x0) at ../Objects/abstract.c:1860
#36 0x080c232c in PyEval_CallObjectWithKeywords (func=0xb7da7e6c, arg=0x9cfdb94, kw=0x0) at ../Python/ceval.c:3433
---Type <return> to continue, or q <return> to quit---
#37 0x080c4a9d in PyEval_EvalFrameEx (f=0x9b4549c, throwflag=0) at ../Python/ceval.c:2063
#38 0x080ca115 in PyEval_EvalCodeEx (co=0x9d01188, globals=0x9cfc604, locals=0x9cfc604, args=0x0, argcount=0, kws=0x0,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2831
#39 0x080ca187 in PyEval_EvalCode (co=0x9d01188, globals=0x9cfc604, locals=0x9cfc604) at ../Python/ceval.c:494
#40 0x080de9ac in PyImport_ExecCodeModuleEx (name=0xbfdd2ae7 "apport", co=0x9d01188,
    pathname=0xbfdcf9f7 "/var/lib/python-support/python2.5/apport/__init__.pyc") at ../Python/import.c:675
#41 0x080df306 in load_source_module (name=0xbfdd2ae7 "apport",
    pathname=0xbfdcf9f7 "/var/lib/python-support/python2.5/apport/__init__.pyc", fp=<value optimized out>)
    at ../Python/import.c:959
#42 0x080e09ce in load_package (name=0xbfdd2ae7 "apport", pathname=<value optimized out>) at ../Python/import.c:1015
#43 0x080df98b in import_submodule (mod=0x81466b8, subname=0xbfdd2ae7 "apport", fullname=0xbfdd2ae7 "apport")
    at ../Python/import.c:2400
#44 0x080dfe3e in load_next (mod=0x81466b8, altmod=0x81466b8, p_name=<value optimized out>, buf=0xbfdd2ae7 "apport",
    p_buflen=0xbfdd2ae0) at ../Python/import.c:2220
#45 0x080e0068 in import_module_level (name=0xb7d62dd3 "fileutils", globals=0xb7dd3e74, locals=<value optimized out>,
    fromlist=0xb7dc8c2c, level=-1) at ../Python/import.c:2001
#46 0x080e04f7 in PyImport_ImportModuleLevel (name=0xb7d62dcc "apport.fileutils", globals=0xb7d60824, locals=0x81466b8,
    fromlist=0xb7dc8c2c, level=-1) at ../Python/import.c:2072
#47 0x080c1db4 in builtin___import__ (self=0x0, args=0x93227ac, kwds=0x0) at ../Python/bltinmodule.c:47
#48 0x0805c9e7 in PyObject_Call (func=0x0, arg=0x93227ac, kw=0x0) at ../Objects/abstract.c:1860
#49 0x080c232c in PyEval_CallObjectWithKeywords (func=0xb7da7e6c, arg=0x93227ac, kw=0x0) at ../Python/ceval.c:3433
#50 0x080c4a9d in PyEval_EvalFrameEx (f=0x99eea64, throwflag=0) at ../Python/ceval.c:2063
#51 0x080ca115 in PyEval_EvalCodeEx (co=0xb7dc9380, globals=0xb7d60824, locals=0x0, args=0x962f830, argcount=3, kws=0x0,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2831
#52 0x081123e1 in function_call (func=0xb7d6179c, arg=0x962f824, kw=0x0) at ../Objects/funcobject.c:517
#53 0x0805c9e7 in PyObject_Call (func=0x0, arg=0x962f824, kw=0x0) at ../Objects/abstract.c:1860
#54 0x080c232c in PyEval_CallObjectWithKeywords (func=0xb7d6179c, arg=0x962f824, kw=0x0) at ../Python/ceval.c:3433
#55 0x080e8f8e in PyErr_PrintEx (set_sys_last_vars=1) at ../Python/pythonrun.c:1082
#56 0x080e9883 in PyRun_SimpleFileExFlags (fp=0x816a008,
    filename=0xbfdd4429 "/local/nolden/itk-3.4.0/InsightToolkit-3.4.0/Wrapping/WrapITK/Python/Tests/template.py",
    closeit=1, flags=0xbfdd3fc8) at ../Python/pythonrun.c:978
---Type <return> to continue, or q <return> to quit---
#57 0x08059390 in Py_Main (argc=1, argv=0xbfdd4094) at ../Modules/main.c:523
#58 0x080588c2 in main (argc=Cannot access memory at address 0x0
) at ../Modules/python.c:23
(gdb)


More information about the Insight-users mailing list