Intel® Distribution for Python*
Engage in discussions with community peers related to Python* applications and core computational packages.

Crash on np array copy

William_S_8
Beginner
775 Views

On a Haswell system (Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz) running Red Hat Enterprise Linux Server release 6.7 (Santiago) with 384 GB of memory, and Intel Python updated to the latest release via conda, a crash occurs running the following code:

import numpy as np

A=np.zeros((780,780,600),dtype=np.float64)
B=A.copy()

resulting in a segfault. This occurs whenever the total number of array values is equal to or larger than 2**28 and smaller than 2**29. This does not occur when using float16, float32, or complex128 datatypes. This does not occur if using B=A[:]. Might this be an issue with the optimized version of memmove? 

Installed conda packages include:
<pre>
icc_rt                    16.0.3                  intel_3  [intel]  intel
intelpython               2017.0.0                      0    intel
intelpython2_core         2017.0.0                      2    intel
mkl                       2017.0.0                intel_3  [intel]  intel
mkl_rt                    2017.0.1b1              intel_2  [intel]  intel

numpy                     1.11.1             py27_intel_4  [intel]  intel
python                    2.7.12                  intel_4  [intel]  intel
tbb                       2017.0             py27_intel_4  [intel]  intel
</pre>


gdb session:
<pre>

Program received signal SIGSEGV, Segmentation fault.
0x00007fffed83b50b in __intel_ssse3_rep_memmove () from /myinstall/anaconda/2/envs/ws-mt-crashtest/lib/python2.7/site-packages/numpy/core/../../../../libintlc.so.5
(gdb) bt
#0  0x00007fffed83b50b in __intel_ssse3_rep_memmove () from /myinstall/anaconda/2/envs/ws-mt-crashtest/lib/python2.7/site-packages/numpy/core/../../../../libintlc.so.5
#1  0x00007fffeff098f8 in _contig_to_contig () from /myinstall/anaconda/2/envs/ws-mt-crashtest/lib/python2.7/site-packages/numpy/core/multiarray.so
#2  0x00007fffefe083f6 in PyArray_AssignArray () from /myinstall/anaconda/2/envs/ws-mt-crashtest/lib/python2.7/site-packages/numpy/core/multiarray.so
#3  0x00007fffefe1cf9e in PyArray_NewCopy () from /myinstall/anaconda/2/envs/ws-mt-crashtest/lib/python2.7/site-packages/numpy/core/multiarray.so
#4  0x00007ffff004756c in array_copy () from /myinstall/anaconda/2/envs/ws-mt-crashtest/lib/python2.7/site-packages/numpy/core/multiarray.so
#5  0x00007ffff7ac6c81 in call_function (f=Unhandled dwarf expression opcode 0xf3
) at Python/ceval.c:4351
#6  PyEval_EvalFrameEx (f=Unhandled dwarf expression opcode 0xf3
) at Python/ceval.c:2988
#7  0x00007ffff7aca60d in PyEval_EvalCodeEx (co=Unhandled dwarf expression opcode 0xf3
) at Python/ceval.c:3583
#8  0x00007ffff7aca742 in PyEval_EvalCode (co=Unhandled dwarf expression opcode 0xf3
) at Python/ceval.c:669
#9  0x00007ffff7af6217 in run_mod (fp=0x7ffff710d6c0, filename=Unhandled dwarf expression opcode 0xf3
) at Python/pythonrun.c:1378
#10 PyRun_InteractiveOneFlags (fp=0x7ffff710d6c0, filename=Unhandled dwarf expression opcode 0xf3
) at Python/pythonrun.c:859
#11 0x00007ffff7af641e in PyRun_InteractiveLoopFlags (fp=0x7ffff710d6c0, filename=0x7ffff7b42d10 "<stdin>", flags=0x7fffffffd770) at Python/pythonrun.c:779
#12 0x00007ffff7af6c0e in PyRun_AnyFileExFlags (fp=0x7ffff710d6c0, filename=0x7ffff7b42d10 "<stdin>", closeit=0, flags=0x7fffffffd770) at Python/pythonrun.c:748
#13 0x00007ffff7b0c49f in Py_Main (argc=Unhandled dwarf expression opcode 0xf3
) at Modules/main.c:645
#14 0x00007ffff6d9dd5d in __libc_start_main (main=0x4006e0 <main>, argc=1, ubp_av=0x7fffffffd928, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fffffffd918) at libc-start.c:226
#15 0x0000000000400711 in _start ()
</pre>

0 Kudos
1 Solution
Oleksandr_P_Intel
775 Views

Dear William, 

Thank you for the detailed report. The cause of the issue has already been fixed in sources, and should become available in the imminent Update 1 to the Intel Distribution for Python within several days. 

If you need the fix sooner than that, please let us know.

Oleksandr

View solution in original post

0 Kudos
1 Reply
Oleksandr_P_Intel
776 Views

Dear William, 

Thank you for the detailed report. The cause of the issue has already been fixed in sources, and should become available in the imminent Update 1 to the Intel Distribution for Python within several days. 

If you need the fix sooner than that, please let us know.

Oleksandr

0 Kudos
Reply