[Numpy-discussion] Seg. fault when running tests

Charles R Harris charlesr.harris at gmail.com
Sat Jun 15 16:17:42 EDT 2013


On Sat, Jun 15, 2013 at 2:03 PM, Warren Weckesser <
warren.weckesser at gmail.com> wrote:

>
> On Sat, Jun 15, 2013 at 3:57 PM, Warren Weckesser <
> warren.weckesser at gmail.com> wrote:
>
>>
>> On Sat, Jun 15, 2013 at 3:15 PM, Julian Taylor <
>> jtaylor.debian at googlemail.com> wrote:
>>
>>> On 15.06.2013 21:12, Charles R Harris wrote:
>>> >
>>> >
>>> > On Sat, Jun 15, 2013 at 9:50 AM, Warren Weckesser
>>> > <warren.weckesser at gmail.com <mailto:warren.weckesser at gmail.com>>
>>> wrote:
>>> >
>>> >
>>> >     On Sat, Jun 15, 2013 at 11:43 AM, Warren Weckesser
>>> >     <warren.weckesser at gmail.com <mailto:warren.weckesser at gmail.com>>
>>> wrote:
>>> >
>>> >         I'm getting a seg. fault in master when I run the tests.  I'm
>>> on
>>> >         Ubuntu 12.04 64 bit, with Python 3.3.2 (64 bits):
>>> >
>>> >         $ python3 -c "import numpy as np; np.test('full')"
>>> >         Running unit tests for numpy
>>> >         NumPy version 1.8.0.dev-fa5bc1c
>>> >         NumPy is installed in
>>> >         /home/warren/local_py332/lib/python3.3/site-packages/numpy
>>> >         Python version 3.3.2 (default, Jun 14 2013, 12:12:22) [GCC
>>> 4.6.3]
>>> >         nose version 1.3.0
>>> >
>>> .............................S.........................................................................................................................................................S.......................................................................................................................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
>>>  .........
>>>
>>> .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K............................................................................................................................................................................................SSS.
>>>  .........
>>>
>>> .......................................................................................K.....................................................................................................................................................................................Segmentation
>>> >         fault
>>> >
>>> >         The seg. fault is occurring in ma/tests/test_mrecords.py:
>>> >
>>> >         $ nosetests test_mrecords.py
>>> >         .Segmentation fault
>>> >
>>> >         More info:
>>> >
>>> >         $ python3
>>> >         Python 3.3.2 (default, Jun 14 2013, 12:12:22)
>>> >         [GCC 4.6.3] on linux
>>> >         Type "help", "copyright", "credits" or "license" for more
>>> >         information.
>>> >         >>> import numpy as np
>>> >         >>> np.show_config()
>>> >         atlas_threads_info:
>>> >             library_dirs = ['/usr/lib/atlas-base/atlas',
>>> >         '/usr/lib/atlas-base']
>>> >             include_dirs = ['/usr/include/atlas']
>>> >             language = f77
>>> >             libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
>>> >             define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')]
>>> >         atlas_blas_threads_info:
>>> >             library_dirs = ['/usr/lib/atlas-base']
>>> >             include_dirs = ['/usr/include/atlas']
>>> >             language = c
>>> >             libraries = ['ptf77blas', 'ptcblas', 'atlas']
>>> >             define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')]
>>> >         mkl_info:
>>> >           NOT AVAILABLE
>>> >         lapack_opt_info:
>>> >             library_dirs = ['/usr/lib/atlas-base/atlas',
>>> >         '/usr/lib/atlas-base']
>>> >             include_dirs = ['/usr/include/atlas']
>>> >             language = f77
>>> >             libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
>>> >             define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')]
>>> >         blas_opt_info:
>>> >             library_dirs = ['/usr/lib/atlas-base']
>>> >             include_dirs = ['/usr/include/atlas']
>>> >             language = c
>>> >             libraries = ['ptf77blas', 'ptcblas', 'atlas']
>>> >             define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')]
>>> >         lapack_mkl_info:
>>> >           NOT AVAILABLE
>>> >         blas_mkl_info:
>>> >           NOT AVAILABLE
>>> >         >>>
>>> >
>>> >         gdb:
>>> >
>>> >         $ gdb python3
>>> >         GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
>>> >         Copyright (C) 2012 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".
>>> >         For bug reporting instructions, please see:
>>> >         <http://bugs.launchpad.net/gdb-linaro/>...
>>> >         Reading symbols from
>>> /home/warren/local_py332/bin/python3...done.
>>> >         (gdb) run test_mrecords.py
>>> >         Starting program: /home/warren/local_py332/bin/python3
>>> >         test_mrecords.py
>>> >         [Thread debugging using libthread_db enabled]
>>> >         Using host libthread_db library
>>> >         "/lib/x86_64-linux-gnu/libthread_db.so.1".
>>> >         .
>>> >         Program received signal SIGSEGV, Segmentation fault.
>>> >         0x00007ffff5f080a4 in
>>> >         _aligned_strided_to_contig_size8_srcstride0 (dst=<optimized
>>> out>,
>>> >             dst_stride=<optimized out>, src=<optimized out>,
>>> >         __NPY_UNUSED_TAGGEDsrc_stride=<optimized out>,
>>> >             N=<optimized out>,
>>> >         __NPY_UNUSED_TAGGEDsrc_itemsize=<optimized out>,
>>> >         __NPY_UNUSED_TAGGEDdata=0x0)
>>> >             at
>>> numpy/core/src/multiarray/lowlevel_strided_loops.c.src:190
>>> >         190            *((@type@ *)dst) = temp;
>>> >         (gdb)
>>> >
>>> >
>>> >
>>> >
>>> > Is this repeatable? Just asking as I don't see that here with gcc
>>> 4.7.2.
>>> > Looks like Julian's changes to lowlevel_strided_loops may be
>>> responsible.
>>> >
>>> > Chuck
>>> >
>>>
>>> I can't reproduce it on ubuntu 12.04 with python 3.2 (don't have 3.3.2)
>>> the changes made are very minimal, from looking at them again I don't
>>> see how they could cause this (especially on a x86 platform).
>>>
>>> @warren, can you please bisect the commit causing this?
>>>
>>
>>
>> Here's the culprit:
>>
>> aef286debfd11a62f1c337dea55624cee7fd4d9e is the first bad commit
>> commit aef286debfd11a62f1c337dea55624cee7fd4d9e
>> Author: Julian Taylor <jtaylor.debian at googlemail.com>
>> Date:   Mon Jun 10 19:38:58 2013 +0200
>>
>>     ENH: enable unaligned loads on x86
>>
>>     x86 can handle unaligned load and there is no hand vectorized code in
>>     this file. It would be a serious compiler bug if it adds vectorization
>>     without checking for alignment.
>>     Enables fast complex128 copies which are unaligned on 32 bit gcc
>> unless
>>     compiled with -malign-double.
>>
>> :040000 040000 d0948d1e1d942d41d50ce9e57bdc430db9a16f9e
>> 45a48f383353857b8d0dd24e542c7ab6f137448c M  numpy
>>
>> Link:
>> https://github.com/numpy/numpy/commit/aef286debfd11a62f1c337dea55624cee7fd4d9e
>>
>>
> If I undo that change in master, I don't get the seg. fault.
>

OK, I can duplicate this with -O3 along with another error that shows up.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130615/68ff9135/attachment.html>


More information about the NumPy-Discussion mailing list