[SciPy-dev] Scipy 0.4.8 segfaults on 64bit Linux (Ubuntu).

Arnd Baecker arnd.baecker at web.de
Tue Mar 21 03:00:29 CST 2006


Hi,

On Mon, 20 Mar 2006, Travis Oliphant wrote:

[...]

> Yes, this helps.
>
> But, it would be nice if you could post all the compilation warnings for
> the ndimage package encountered during a scipy build.  It's an issue
> with maybelong being used in the definition and then int* later.
>
> I've fixed what I found, but other issues may linger.  It looks like
> ndimage was not 64-bit ready.

There seem to be some further ones:

  Found 0 tests for __main__
affine_transform 1 ... FAIL
affine transform 2 ... FAIL
affine transform 3 ... FAIL
affine transform 4 ... FAIL
affine transform 5 ... FAIL
affine transform 6 ... FAIL
affine transform 7 ... FAIL
affine transform 8 ... FAIL
affine transform 9 ... FAIL
affine transform 10 ... FAIL
affine transform 11 ... FAIL
affine transform 12 ... FAIL
affine transform 13 ... FAIL
affine transform 14 ... FAIL
affine transform 15 ... FAIL
affine transform 16 ... FAIL
affine transform 17 ... FAIL
affine transform 18 ... FAIL
affine transform 19 ... FAIL
affine transform 20 ... FAIL
affine transform 21 ... FAIL
binary closing 1 ... ok
[...]
correlation 25 ... ok
brute force distance transform 1 ... ok
brute force distance transform 2 ... ok
brute force distance transform 3 ... ok
brute force distance transform 4 ... ERROR
brute force distance transform 5 ... ok
brute force distance transform 6 ... ok
chamfer type distance transform 1Segmentation fault

The backtrace gives:

brute force distance transform 6 ... ok
chamfer type distance transform 1
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912507335168 (LWP 29654)]
NI_DistanceTransformOnePass (strct=0x20, distances=0x2, features=0x894790)
at ni_morphology.c:732
732             maybelong offset = oo[ii];
(gdb) bt
#0  NI_DistanceTransformOnePass (strct=0x20, distances=0x2,
features=0x894790) at ni_morphology.c:732
#1  0x00002aaaae50f235 in Py_DistanceTransformOnePass (obj=0xffffffff,
args=0xffffffff) at nd_image.c:1154
#2  0x0000000000478cfb in PyEval_EvalFrame (f=0x718290) at ceval.c:3558
#3  0x000000000047ad2f in PyEval_EvalCodeEx (co=0x2aaaae4f5960,
globals=0x40, locals=0x1, args=0x718290, argcount=2,
    kws=0x6d6170, kwcount=1, defs=0x2aaaae4f15a8, defcount=5, closure=0x0)
at ceval.c:2736
#4  0x00000000004788f7 in PyEval_EvalFrame (f=0x6d5f90) at ceval.c:3650
#5  0x0000000000479fb1 in PyEval_EvalFrame (f=0x89af10) at ceval.c:3640
#6  0x000000000047ad2f in PyEval_EvalCodeEx (co=0x2aaaab948ea0,
globals=0x40, locals=0x1, args=0x89af10, argcount=2,
    kws=0x6eac40, kwcount=0, defs=0x2aaaab94ff68, defcount=1, closure=0x0)
at ceval.c:2736
#7  0x00000000004c6099 in function_call (func=0x2aaaab9607d0,
arg=0x2aaaae4fbe60, kw=0x956d50) at funcobject.c:548
#8  0x0000000000417700 in PyObject_Call (func=0xffffffff, arg=0x40,
kw=0x1) at abstract.c:1756
#9  0x00000000004772ea in PyEval_EvalFrame (f=0x739960) at ceval.c:3835
#10 0x000000000047ad2f in PyEval_EvalCodeEx (co=0x2aaaab948f10,
globals=0x40, locals=0x1, args=0x739960, argcount=2, kws=0x0,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at ceval.c:2736
#11 0x00000000004c6099 in function_call (func=0x2aaaab960848,
arg=0x2aaaae4fbe18, kw=0x0) at funcobject.c:548
#12 0x0000000000417700 in PyObject_Call (func=0xffffffff, arg=0x40,
kw=0x1) at abstract.c:1756
#13 0x0000000000420ee0 in instancemethod_call (func=0xffffffff,
arg=0x2aaaae4fbe18, kw=0x0) at classobject.c:2447
#14 0x0000000000417700 in PyObject_Call (func=0xffffffff, arg=0x40,
kw=0x1) at abstract.c:1756
#15 0x00000000004777d9 in PyEval_EvalFrame (f=0x7307b0) at ceval.c:3766
#16 0x000000000047ad2f in PyEval_EvalCodeEx (co=0x2aaaab93a490,
globals=0x40, locals=0x1, args=0x7307b0, argcount=2, kws=0x0,
    kwcount=0, defs=0x2aaaab961a28, defcount=1, closure=0x0) at
ceval.c:2736
#17 0x00000000004c6099 in function_call (func=0x2aaaab963d70,
arg=0x2aaaae4fbdd0, kw=0x0) at funcobject.c:548
#18 0x0000000000417700 in PyObject_Call (func=0xffffffff, arg=0x40,
kw=0x1) at abstract.c:1756
#19 0x0000000000420ee0 in instancemethod_call (func=0xffffffff,
arg=0x2aaaae4fbdd0, kw=0x0) at classobject.c:2447
#20 0x0000000000417700 in PyObject_Call (func=0xffffffff, arg=0x40,
kw=0x1) at abstract.c:1756
#21 0x000000000044fd80 in slot_tp_call (self=0x2aaaae6b1590,
args=0x2aaaae6b5690, kwds=0x0) at typeobject.c:4536
#22 0x0000000000417700 in PyObject_Call (func=0xffffffff, arg=0x40,
kw=0x1) at abstract.c:1756
#23 0x00000000004777d9 in PyEval_EvalFrame (f=0x7ad090) at ceval.c:3766
#24 0x000000000047ad2f in PyEval_EvalCodeEx (co=0x2aaaab94c960,
globals=0x40, locals=0x1, args=0x7ad090, argcount=2,
    kws=0x925590, kwcount=0, defs=0x0, defcount=0, closure=0x0) at
ceval.c:2736
#25 0x00000000004c6099 in function_call (func=0x2aaaab9620c8,
arg=0x2aaaae4fbd88, kw=0x956b10) at funcobject.c:548
#26 0x0000000000417700 in PyObject_Call (func=0xffffffff, arg=0x40,
kw=0x1) at abstract.c:1756
#27 0x00000000004772ea in PyEval_EvalFrame (f=0x6ea9d0) at ceval.c:3835
#28 0x000000000047ad2f in PyEval_EvalCodeEx (co=0x2aaaab94c9d0,
globals=0x40, locals=0x1, args=0x6ea9d0, argcount=2, kws=0x0,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at ceval.c:2736
#29 0x00000000004c6099 in function_call (func=0x2aaaab962140,
arg=0x2aaaae4fbd40, kw=0x0) at funcobject.c:548
#30 0x0000000000417700 in PyObject_Call (func=0xffffffff, arg=0x40,
kw=0x1) at abstract.c:1756
#31 0x0000000000420ee0 in instancemethod_call (func=0xffffffff,
arg=0x2aaaae4fbd40, kw=0x0) at classobject.c:2447
#32 0x0000000000417700 in PyObject_Call (func=0xffffffff, arg=0x40,
kw=0x1) at abstract.c:1756
#33 0x000000000044fd80 in slot_tp_call (self=0x2aaaae6a40d0,
args=0x2aaaae6a4150, kwds=0x0) at typeobject.c:4536
#34 0x0000000000417700 in PyObject_Call (func=0xffffffff, arg=0x40,
kw=0x1) at abstract.c:1756
#35 0x00000000004777d9 in PyEval_EvalFrame (f=0x80ab20) at ceval.c:3766
#36 0x0000000000479fb1 in PyEval_EvalFrame (f=0x6e8e20) at ceval.c:3640
#37 0x000000000047ad2f in PyEval_EvalCodeEx (co=0x2aaaab93af10,
globals=0x40, locals=0x1, args=0x6e8e20, argcount=3,
    kws=0x6e8d30, kwcount=0, defs=0x2aaaab964728, defcount=2, closure=0x0)
at ceval.c:2736
#38 0x00000000004788f7 in PyEval_EvalFrame (f=0x6e8b90) at ceval.c:3650
#39 0x000000000047ad2f in PyEval_EvalCodeEx (co=0x2aaaadb3a3b0,
globals=0x40, locals=0x1, args=0x6e8b90, argcount=0, kws=0x0,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at ceval.c:2736
#40 0x000000000047af72 in PyEval_EvalCode (co=0xffffffff, globals=0x40,
locals=0x1) at ceval.c:484
#41 0x00000000004a1c72 in PyRun_InteractiveOneFlags (fp=0x2aaaaab132d0,
filename=0x4cbf24 "<stdin>", flags=0x7fffffe7903c)
    at pythonrun.c:1265
#42 0x00000000004a1e04 in PyRun_InteractiveLoopFlags (fp=0x2aaaab556b00,
filename=0x4cbf24 "<stdin>", flags=0x7fffffe7903c)
    at pythonrun.c:695
#43 0x00000000004a2350 in PyRun_AnyFileExFlags (fp=0x2aaaab556b00,
filename=0x40 <Address 0x40 out of bounds>, closeit=0,
    flags=0x7fffffe7903c) at pythonrun.c:658
#44 0x0000000000410788 in Py_Main (argc=0, argv=0x7fffffe7a937) at
main.c:484
#45 0x00002aaaab34d5aa in __libc_start_main () from /lib64/tls/libc.so.6
#46 0x000000000040fdfa in _start () at start.S:113
#47 0x00007fffffe79138 in ?? ()
#48 0x00002aaaaabc19c0 in rtld_errno () from /lib64/ld-linux-x86-64.so.2
#49 0x0000000000000001 in ?? ()


And the compile part of ndimage:

building 'scipy.ndimage._nd_image' extension
compiling C sources
gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC'
creating build/temp.linux-x86_64-2.4/Lib/ndimage
creating build/temp.linux-x86_64-2.4/Lib/ndimage/src
compile options: '-ILib/ndimage/src
-I/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/core/include
-I/scr/python/include/python2.4 -c'
gcc: Lib/ndimage/src/ni_morphology.c
Lib/ndimage/src/ni_morphology.c: In function `NI_BinaryErosion':
Lib/ndimage/src/ni_morphology.c:114: warning: passing arg 7 of
`NI_InitFilterOffsets' from incompatible pointer type
Lib/ndimage/src/ni_morphology.c: In function
`NI_DistanceTransformBruteForce':
Lib/ndimage/src/ni_morphology.c:546: warning: assignment from incompatible
pointer type
Lib/ndimage/src/ni_morphology.c: In function
`NI_DistanceTransformOnePass':
Lib/ndimage/src/ni_morphology.c:714: warning: passing arg 7 of
`NI_InitFilterOffsets' from incompatible pointer type
gcc: Lib/ndimage/src/ni_support.c
Lib/ndimage/src/ni_support.c: In function `NI_CoordinateListAddBlock':
Lib/ndimage/src/ni_support.c:707: warning: assignment from incompatible
pointer type
gcc: Lib/ndimage/src/ni_fourier.c
gcc: Lib/ndimage/src/numcompat.c
gcc: Lib/ndimage/src/ni_measure.c
gcc: Lib/ndimage/src/ni_interpolation.c
Lib/ndimage/src/ni_interpolation.c: In function `NI_GeometricTransform':
Lib/ndimage/src/ni_interpolation.c:463: warning: passing arg 1 of pointer
to function from incompatible pointer type
Lib/ndimage/src/ni_interpolation.c:551: warning: initialization from
incompatible pointer type
Lib/ndimage/src/ni_interpolation.c:570: warning: initialization from
incompatible pointer type
Lib/ndimage/src/ni_interpolation.c: In function `NI_ZoomShift':
Lib/ndimage/src/ni_interpolation.c:709: warning: assignment from
incompatible pointer type
Lib/ndimage/src/ni_interpolation.c:843: warning: initialization from
incompatible pointer type
Lib/ndimage/src/ni_interpolation.c:864: warning: initialization from
incompatible pointer type
gcc: Lib/ndimage/src/nd_image.c
Lib/ndimage/src/nd_image.c: In function `Py_RankFilter':
Lib/ndimage/src/nd_image.c:253: warning: passing arg 7 of `NI_RankFilter'
from incompatible pointer type
gcc: Lib/ndimage/src/ni_filters.c
Lib/ndimage/src/ni_filters.c: In function `NI_RankFilter':
Lib/ndimage/src/ni_filters.c:629: warning: passing arg 4 of
`NI_InitFilterOffsets' from incompatible pointer type
Lib/ndimage/src/ni_filters.c:633: warning: passing arg 5 of
`NI_InitFilterIterator' from incompatible pointer type
gcc -pthread -shared
build/temp.linux-x86_64-2.4/Lib/ndimage/src/nd_image.o
build/temp.linux-x86_64-2.4/Lib/ndimage/src/ni_filters.o
build/temp.linux-x86_64-2.4/Lib/ndimage/src/ni_fourier.o
build/temp.linux-x86_64-2.4/Lib/ndimage/src/ni_interpolation.o
build/temp.linux-x86_64-2.4/Lib/ndimage/src/ni_measure.o
build/temp.linux-x86_64-2.4/Lib/ndimage/src/numcompat.o
build/temp.linux-x86_64-2.4/Lib/ndimage/src/ni_morphology.o
build/temp.linux-x86_64-2.4/Lib/ndimage/src/ni_support.o
-Lbuild/temp.linux-x86_64-2.4 -o
build/lib.linux-x86_64-2.4/scipy/ndimage/_nd_image.so
/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/distutils/system_info.py:531:
UserWarning: Library error: libs=['mkl', 'vml', 'guide'] found_libs=[]
  warnings.warn("Library error: libs=%s found_libs=%s" % \
/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/distutils/system_info.py:531:
UserWarning: Library error: libs=['ptf77blas', 'ptcblas', 'atlas']
found_libs=[]
  warnings.warn("Library error: libs=%s found_libs=%s" % \



Looking through the build log shows two further possible pointer
problems:

gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC'
compile options: '-DATLAS_INFO="\"3.7.11\"" -I/scr/python/include
-Ibuild/src
-I/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/core/include
-I/scr/python/include/python2.4 -c'
gcc: build/src/build/src/scipy/linalg/flapackmodule.c
build/src/build/src/scipy/linalg/flapackmodule.c: In function
`f2py_rout_flapack_cheev':
build/src/build/src/scipy/linalg/flapackmodule.c:9761: warning: passing
arg 6 of pointer to function from incompatible pointer type
build/src/build/src/scipy/linalg/flapackmodule.c: In function
`f2py_rout_flapack_zheev':
build/src/build/src/scipy/linalg/flapackmodule.c:9945: warning: passing
arg 6 of pointer to function from incompatible pointer type
/scr/python/bin/g77 -shared
build/temp.linux-x86_64-2.4/build/src/build/src/scipy/linalg/flapackmodule.o
build/temp.linux-x86_64-2.4/build/src/fortranobject.o -L/scr/python/lib64
-Lbuild/temp.linux-x86_64-2.4 -llapack -lptf77blas -lptcblas -latlas -lg2c
-o build/lib.linux-x86_64-2.4/scipy/linalg/flapack.so
building 'scipy.linalg.clapack' extension

Unfortunately I don't have time to look into any of these myself
as I have some pressing deadlines. (Though I will be able
to squeeze the above type of testing in, so just let me
know when I should give it another try).

Best, Arnd





More information about the Scipy-dev mailing list