8000 glibc detected: double free or corruption error on numpy.percentile · Issue #4836 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
glibc detected: double free or corruption error on numpy.percentile #4836
@habibrosyad

Description

@habibrosyad

Hi,
I've got this error while trying to run np.percentile on a series of images in a loop:

Python 2.7.6 (default, May 29 2014, 17:32:27)
[GCC Intel(R) C++ gcc 4.4 mode] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> from skimage.io import ImageCollection
>>> imc = ImageCollection('/share/experiments/ahm/projections/Block_1_*.tiff')
>>> for i in xrange(len(imc)):
...  low, hi = np.percentile(imc[i],(0,98))
...
*** glibc detected *** python2.7: double free or corruption (out): 0x000000000379cf60 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3d08876166]
/lib64/libc.so.6[0x3d08878ca3]
/usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so(+0x1c4fc)[0x7f9ffccb84fc]
/usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so(+0x1cfdb)[0x7f9ffccb8fdb]
/usr/local/lib/libpython2.7.so.1.0(__PGOSF184_frame_dealloc+0x542)[0x7fa005221482]
/usr/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x1aa)[0x7fa005243bda]
/usr/local/lib/libpython2.7.so.1.0(__PGOSF292_function_call+0x4a)[0x7fa0051fe03a]
/usr/local/lib/libpython2.7.so.1.0(+0x115a9e)[0x7fa005184a9e]
/usr/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6b56)[0x7fa00523f046]
/usr/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x180)[0x7fa005243bb0]
/usr/local/lib/libpython2.7.so.1.0(+0x1c789c)[0x7fa00523689c]
/usr/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x1a10)[0x7fa005239f00]
/usr/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x180)[0x7fa005243bb0]
/usr/local/lib/libpython2.7.so.1.0(+0x1c789c)[0x7fa00523689c]
/usr/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x1a10)[0x7fa005239f00]
/usr/local/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x147)[0x7fa0051756f7]
/usr/local/lib/libpython2.7.so.1.0(PyRun_InteractiveOneFlags+0x2c4)[0x7fa0051a62b4]
/usr/local/lib/libpython2.7.so.1.0(PyRun_InteractiveLoopFlags+0x143)[0x7fa0051a5f93]
/usr/local/lib/libpython2.7.so.1.0(PyRun_AnyFileExFlags+0x46)[0x7fa0051a57f6]
/usr/local/lib/libpython2.7.so.1.0(Py_Main+0x613)[0x7fa0051975e3]
python2.7(main+0x2f)[0x40088f]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x3d0881ed1d]
python2.7[0x400799]
======= Memory map: ========
00400000-00401000 r-xp 00000000 fd:00 2490380                            /usr/local/bin/python2.7
00600000-00601000 rw-p 00000000 fd:00 2490380                            /usr/local/bin/python2.7
020c2000-03bbd000 rw-p 00000000 00:00 0                                  [heap]
31a5a00000-31a5a83000 r-xp 00000000 fd:00 2359299                        /lib64/libm-2.12.so
31a5a83000-31a5c82000 ---p 00083000 fd:00 2359299                        /lib64/libm-2.12.so
31a5c82000-31a5c83000 r--p 00082000 fd:00 2359299                        /lib64/libm-2.12.so
31a5c83000-31a5c84000 rw-p 00083000 fd:00 2359299                        /lib64/libm-2.12.so
322fa00000-322fae8000 r-xp 00000000 fd:00 2522823                        /usr/lib64/libstdc++.so.6.0.13
322fae8000-322fce8000 ---p 000e8000 fd:00 2522823                        /usr/lib64/libstdc++.so.6.0.13
322fce8000-322fcef000 r--p 000e8000 fd:00 2522823                        /usr/lib64/libstdc++.so.6.0.13
322fcef000-322fcf1000 rw-p 000ef000 fd:00 2522823                        /usr/lib64/libstdc++.so.6.0.13
322fcf1000-322fd06000 rw-p 00000000 00:00 0
3230200000-3230225000 r-xp 00000000 fd:00 2522830                        /usr/lib64/libpng12.so.0.49.0
3230225000-3230425000 ---p 00025000 fd:00 2522830                        /usr/lib64/libpng12.so.0.49.0
3230425000-3230426000 rw-p 00025000 fd:00 2522830                        /usr/lib64/libpng12.so.0.49.0
3d08400000-3d08420000 r-xp 00000000 fd:00 2359322                        /lib64/ld-2.12.so
3d0861f000-3d08620000 r--p 0001f000 fd:00 2359322                        /lib64/ld-2.12.so
3d08620000-3d08621000 rw-p 00020000 fd:00 2359322                        /lib64/ld-2.12.so
3d08621000-3d08622000 rw-p 00000000 00:00 0
3d08800000-3d0898b000 r-xp 00000000 fd:00 2359343                        /lib64/libc-2.12.so
3d0898b000-3d08b8a000 ---p 0018b000 fd:00 2359343                        /lib64/libc-2.12.so
3d08b8a000-3d08b8e000 r--p 0018a000 fd:00 2359343                        /lib64/libc-2.12.so
3d08b8e000-3d08b8f000 rw-p 0018e000 fd:00 2359343                        /lib64/libc-2.12.so
3d08b8f000-3d08b94000 rw-p 00000000 00:00 0
3d09000000-3d09017000 r-xp 00000000 fd:00 2359420                        /lib64/libpthread-2.12.so
3d09017000-3d09217000 ---p 00017000 fd:00 2359420                        /lib64/libpthread-2.12.so
3d09217000-3d09218000 r--p 00017000 fd:00 2359420                        /lib64/libpthread-2.12.so
3d09218000-3d09219000 rw-p 00018000 fd:00 2359420                        /lib64/libpthread-2.12.so
3d09219000-3d0921d000 rw-p 00000000 00:00 0
3d09400000-3d09402000 r-xp 00000000 fd:00 2359418                        /lib64/libdl-2.12.so
3d09402000-3d09602000 ---p 00002000 fd:00 2359418                        /lib64/libdl-2.12.so
3d09602000-3d09603000 r--p 00002000 fd:00 2359418                        /lib64/libdl-2.12.so
3d09603000-3d09604000 rw-p 00003000 fd:00 2359418                        /lib64/libdl-2.12.so
3d09800000-3d09815000 r-xp 00000000 fd:00 2359437                        /lib64/libz.so.1.2.3
3d09815000-3d09a14000 ---p 00015000 fd:00 2359437                        /lib64/libz.so.1.2.3
3d09a14000-3d09a15000 r--p 00014000 fd:00 2359437                        /lib64/libz.so.1.2.3
3d09a15000-3d09a16000 rw-p 00015000 fd:00 2359437                        /lib64/libz.so.1.2.3
3d0a000000-3d0a01d000 r-xp 00000000 fd:00 2359516                        /lib64/libselinux.so.1
3d0a01d000-3d0a21c000 ---p 0001d000 fd:00 2359516                        /lib64/libselinux.so.1
3d0a21c000-3d0a21d000 r--p 0001c000 fd:00 2359516                        /lib64/libselinux.so.1
3d0a21d000-3d0a21e000 rw-p 0001d000 fd:00 2359516                        /lib64/libselinux.so.1
3d0a21e000-3d0a21f000 rw-p 00000000 00:00 0
3d0a800000-3d0a816000 r-xp 00000000 fd:00 2359426                        /lib64/libresolv-2.12.so
3d0a816000-3d0aa16000 ---p 00016000 fd:00 2359426                        /lib64/libresolv-2.12.so
3d0aa16000-3d0aa17000 r--p 00016000 fd:00 2359426                        /lib64/libresolv-2.12.so
3d0aa17000-3d0aa18000 rw-p 00017000 fd:00 2359426                        /lib64/libresolv-2.12.so
3d0aa18000-3d0aa1a000 rw-p 00000000 00:00 0
3d0b000000-3d0b016000 r-xp 00000000 fd:00 2359411                        /lib64/libgcc_s-4.4.7-20120601.so.1
3d0b016000-3d0b215000 ---p 00016000 fd:00 2359411                        /lib64/libgcc_s-4.4.7-20120601.so.1
3d0b215000-3d0b216000 rw-p 00015000 fd:00 2359411                        /lib64/libgcc_s-4.4.7-20120601.so.1
3d0bc00000-3d0bc03000 r-xp 00000000 fd:00 2359710                        /lib64/libcom_err.so.2.1
3d0bc03000-3d0be02000 ---p 00003000 fd:00 2359710                        /lib64/libcom_err.so.2.1
3d0be02000-3d0be03000 r--p 00002000 fd:00 2359710                        /lib64/libcom_err.so.2.1
3d0be03000-3d0be04000 rw-p 00003000 fd:00 2359710                        /lib64/libcom_err.so.2.1Aborted (core dumped)

So I tried running it in different ways:

Python 2.7.6 (default, May 29 2014, 17:32:27)
[GCC Intel(R) C++ gcc 4.4 mode] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> from skimage.io import ImageCollection
>>> imc = ImageCollection('/share/experiments/ahm/projections/Block_1_*.tiff')
>>> for i in xrange(len(imc)):
...  low = np.percentile(imc[i],0)
...  hi = np.percentile(imc[i],98)
...
*** glibc detected *** python2.7: double free or corruption (out): 0x0000000003525120 ***

But, I have no problem in running it outside loop:

Python 2.7.6 (default, May 29 2014, 17:32:27)
[GCC Intel(R) C++ gcc 4.4 mode] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> from skimage.io import ImageCollection
>>> imc=ImageCollection('/share/experiments/ahm/projections/Block_1_*.tiff')
>>> low, hi = np.percentile(imc[0],(0,98))
>>> low
13783.0
>>> hi
23991.0

It's just when I used np.percentile in loop then things got messy. I used numpy 1.9.0.dev-c24cc4e in this case, but on my other machine with numpy 1.8.0 has no problem at all.

Best regards,
Habib

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0