You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/08/26 18:20:18 UTC
[GitHub] DatCorno opened a new issue #12364: Importing PyTorch when using
ONNX causes a segmentation fault
DatCorno opened a new issue #12364: Importing PyTorch when using ONNX causes a segmentation fault
URL: https://github.com/apache/incubator-mxnet/issues/12364
## Description
Having `import torch` inside a script calling `mxnet.contrib.onnx.import_model` causes a segmentation fault.
## Environment info (Required)
```
----------Python Info----------
Version : 3.6.5
Compiler : GCC
Build : ('default', 'Mar 31 2018 19:45:04')
Arch : ('64bit', '')
------------Pip Info-----------
Version : 18.0
Directory : /home/corneau/.virtualenvs/mxnet/lib/python3.6/site-packages/pip
----------MXNet Info-----------
Version : 1.3.0
Directory : /home/corneau/.virtualenvs/mxnet/lib/python3.6/site-packages/mxnet
Commit Hash : cc30fabe2f36278f2e251d49f72edee107eb5496
----------System Info----------
Platform : Linux-4.12.14-lp150.12.4-default-x86_64-with-glibc2.3.4
system : Linux
node : linux-xdgl
release : 4.12.14-lp150.12.4-default
version : #1 SMP Tue May 22 05:17:22 UTC 2018 (66b2eda)
----------Hardware Info----------
machine : x86_64
processor : x86_64
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 94
Model name: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Stepping: 3
CPU MHz: 2600.000
CPU max MHz: 3500.0000
CPU min MHz: 800.0000
BogoMIPS: 5184.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
NUMA node0 CPU(s): 0-7
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves ibpb ibrs stibp dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
----------Network Test----------
Setting timeout: 10
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0182 sec, LOAD: 0.5547 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.0886 sec, LOAD: 0.7211 sec.
Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.9211 sec, LOAD: 0.6286 sec.
Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0719 sec, LOAD: 0.7321 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0249 sec, LOAD: 0.6183 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0264 sec, LOAD: 0.3489 sec.
```
I'm using :
```
Package Version
----------------- --------------
certifi 2018.8.24
chardet 3.0.4
graphviz 0.8.4
idna 2.6
mxnet 1.3.0b20180824
numpy 1.15.1
onnx 1.2.2
Pillow 5.2.0
pip 18.0
protobuf 3.6.1
requests 2.18.4
setuptools 40.2.0
six 1.11.0
torch 0.4.1
torchvision 0.2.1
typing 3.6.4
typing-extensions 3.6.5
urllib3 1.22
wheel 0.31.1
```
## Error Message:
```
Segmentation fault: 11
Stack trace returned 10 entries:
[bt] (0) /home/corneau/.virtualenvs/mxnet/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x1e4e4a) [0x7f73514f8e4a]
[bt] (1) /home/corneau/.virtualenvs/mxnet/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x2f77af6) [0x7f735428baf6]
[bt] (2) /lib64/libc.so.6(+0x36160) [0x7f73a20a4160]
[bt] (3) /home/corneau/.virtualenvs/mxnet/lib/python3.6/site-packages/onnx/onnx_cpp2py_export.cpython-36m-x86_64-linux-gnu.so(+0x63bfd) [0x7f7348a27bfd]
[bt] (4) /home/corneau/.virtualenvs/mxnet/lib/python3.6/site-packages/onnx/onnx_cpp2py_export.cpython-36m-x86_64-linux-gnu.so(+0x6f82f) [0x7f7348a3382f]
[bt] (5) /home/corneau/.virtualenvs/mxnet/lib/python3.6/site-packages/onnx/onnx_cpp2py_export.cpython-36m-x86_64-linux-gnu.so(+0x54019) [0x7f7348a18019]
[bt] (6) /home/corneau/.virtualenvs/mxnet/lib/python3.6/site-packages/onnx/onnx_cpp2py_export.cpython-36m-x86_64-linux-gnu.so(PyInit_onnx_cpp2py_export+0x10f) [0x7f7348a1ba1f]
[bt] (7) /usr/lib64/libpython3.6m.so.1.0(_PyImport_LoadDynamicModuleWithSpec+0x181) [0x7f73a1d29921]
[bt] (8) /usr/lib64/libpython3.6m.so.1.0(+0x21eb10) [0x7f73a1d29b10]
[bt] (9) /usr/lib64/libpython3.6m.so.1.0(PyCFunction_Call+0x130) [0x7f73a1c8bb20]
```
## Minimum reproducible example
Using the `ONNX` model from the tutorial : `https://s3.amazonaws.com/onnx-mxnet/examples/super_resolution.onnx`
```
#!/usr/bin/env python
import torch
import mxnet.contrib.onnx as onnx_mxnet
_, _, _ = onnx_mxnet.import_model("super_resolution.onnx")
```
## Steps to reproduce
(Paste the commands you ran that produced the error.)
1. `./import_onnx.py`
## What have you tried to solve it?
1. I tried using version 1.2.0 from `pip install mxnet`
2. Then I installed version 1.3.0 from `pip install mxnet --pre`
3. Tried using `import_to_gluon`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services