Skip to content

Segfaults in the conda-forge numpy and scipy traced to 0.3.10 #2728

@martin-frbg

Description

@martin-frbg

Recently a segfault in the scipy testsuite was reported to occur in conda packages for x86_64 based on 0.3.10 conda-forge/scipy-feedstock#130 - this was initially suspected to be related to PR#2516 as the only major change affecting AVX2 code in that release. However more recent events conda-forge/openblas-feedstock#101 with the simple reproducer #2516 (comment)

    $ python
    Python 3.7.6 | packaged by conda-forge | (default, Jun 1 2020, 18:57:50)
    [GCC 7.5.0] on linux
            import numpy as np
            t = np.array([[1, 0.5], [-1, 0.5]])
            matrix_a = np.dot([(1,2) for i in range(1000000)], t)

make it more likely to be either a more general memory management problem or a fault in the Haswell DGEMM kernel that appears to occur in DYNAMIC_ARCH builds only. In my test (currently with python 3.6.4), valgrind reports an attempt by the python parser code to free an unallocated memory region shortly before the segfault occurs ostensibly in line 255 of the DGEMM_ONCOPY kernel. Replacing the Haswell/SkylakeX dgemm_ncopy_8_skylakex.c with its generic gemm_ncopy_8.c counterpart has no effect.

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