Skip to content

Importing scipy.misc after torch causes segfault #786

@wkentaro

Description

@wkentaro

As shown in below. Is this something expected?
This seems most closely related to #595, but it is closed without any specific solutions.

(venv) $ pip freeze
appdirs==1.4.0
numpy==1.12.0
packaging==16.8
pyparsing==2.1.10
PyYAML==3.12
scipy==0.18.1
six==1.10.0
torch==0.1.9.post2

(venv) $ python -c 'import torch, scipy.misc'
Segmentation fault (core dumped)

(venv) $ python -c 'import scipy.misc, torch'

(venv) $ echo 'import torch, scipy.misc' > spam.py

(venv) $ python spam.py
Segmentation fault (core dumped)

(venv) $ gdb --args python spam.py
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...(no debugging symbols found)...done.
(gdb) run
Starting program: /tmp/venv/bin/python spam.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffc7088700 (LWP 5549)]
[New Thread 0x7fffc6887700 (LWP 5550)]
[New Thread 0x7fffc4086700 (LWP 5551)]
[New Thread 0x7fffc1885700 (LWP 5552)]
[New Thread 0x7fffbf084700 (LWP 5553)]
[New Thread 0x7fffbc883700 (LWP 5554)]
[New Thread 0x7fffba082700 (LWP 5555)]
[New Thread 0x7fffb7881700 (LWP 5556)]
[New Thread 0x7fffb5080700 (LWP 5557)]
[New Thread 0x7fffb287f700 (LWP 5558)]
[New Thread 0x7fffb007e700 (LWP 5559)]

Program received signal SIGSEGV, Segmentation fault.
0x00007fffc9d65fc0 in PyArray_API () from /tmp/venv/local/lib/python2.7/site-packages/numpy/core/multiarray.so

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