Skip to content

1.15.2 Segmentation fault on import numpy in docker on VM #13059

Description

@Syps

Importing numpy from a Docker container running on a virtual machine results in a segfault. GDB trace is similar to #10787 (please see below).

Reproducing code example:

import numpy as np

Error message (GDB trace):

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007fffeddfda92 in npy_cpu_supports ()
   from /opt/conda/envs/xxxx/lib/python3.5/site-packages/numpy/core/umath.cpython-35m-x86_64-linux-gnu.so
(gdb) bt
#0  0x00007fffeddfda92 in npy_cpu_supports ()
   from /opt/conda/envs/xxxx/lib/python3.5/site-packages/numpy/core/umath.cpython-35m-x86_64-linux-gnu.so
#1  0x00007fffedd18e95 in PyInit_umath ()
   from /opt/conda/envs/xxxx/lib/python3.5/site-packages/numpy/core/umath.cpython-35m-x86_64-linux-gnu.so
#2  0x000055555575c064 in _PyImport_LoadDynamicModuleWithSpec ()
#3  0x000055555575c265 in _imp_create_dynamic ()
#4  0x00005555556a4367 in PyCFunction_Call ()
#5  0x00005555557017bc in PyEval_EvalFrameEx ()
#6  0x00005555556ff351 in PyEval_EvalFrameEx ()
#7  0x00005555556fac20 in PyEval_EvalFrameEx ()
#8  0x00005555556fac20 in PyEval_EvalFrameEx ()
#9  0x00005555556fac20 in PyEval_EvalFrameEx ()
#10 0x00005555556fac20 in PyEval_EvalFrameEx ()
#11 0x00005555557052ad in PyEval_EvalCodeEx ()
#12 0x0000555555706b84 in function_call ()
#13 0x000055555565861a in PyObject_Call ()
#14 0x000055555566e502 in _PyObject_CallMethodIdObjArgs ()
#15 0x00005555556ba873 in PyImport_ImportModuleLevelObject ()
#16 0x00005555556ceb4a in builtin___import__ ()
#17 0x00005555556a42d8 in PyCFunction_Call ()
#18 0x00005555557017bc in PyEval_EvalFrameEx ()

Numpy/Python version information:

Numpy version: 1.15.2
Python: 3.5.6 |Anaconda, Inc.| [GCC 7.3.0]
CPU: GenuineIntel Intel(R) Xeon(R) CPU E5-2660 v3

Activity

  1. eric-wieser commented on Mar 4, 2019

    @eric-wieser
    Member

    Looks related to gh-10814

  2. eric-wieser commented on Mar 4, 2019

    @eric-wieser
    Member

    cc @juliantaylor

    It looks to me like HAVE_XGETBV is being set incorrectly.

  3. seberg commented on Mar 7, 2019

    @seberg
    Member

    Isn't the issue that __builtin_cpu_supports does not return 0? The CPU does seem to support AVX, but if a xgetbv fails is that really an issue with calling xgetbv or an issue of the VM claiming to support AVX when it does not?

  4. ryandesign commented on Jun 26, 2020

    @ryandesign

    Does 1.19.0 fix this for you?

  5. seberg commented on Jan 28, 2024

    @seberg
    Member

    Closing, old segfault in VM: presumably fixed, but if not a new issue is needed anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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