Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

MXNet crashes when scipy.stats is imported first #9098

Closed
sxjscience opened this issue Dec 16, 2017 · 3 comments
Closed

MXNet crashes when scipy.stats is imported first #9098

sxjscience opened this issue Dec 16, 2017 · 3 comments

Comments

@sxjscience
Copy link
Member

Note: Providing complete information in the most concise form is the best way to get help. This issue template serves as the checklist for essential information to most of the technical issues and bug reports. For non-technical issues and feature requests, feel free to present the information in what you believe is the best form.

For Q & A and discussion, please start a discussion thread at https://discuss.mxnet.io

Description

MXNet crashes when scipy.stats is imported first

Environment info (Required)

----------Python Info----------
Version : 3.5.2
Compiler : GCC 5.4.0 20160609
Build : ('default', 'Nov 23 2017 16:37:01')
Arch : ('64bit', 'ELF')
------------Pip Info-----------
Version : 9.0.1
Directory : /usr/local/lib/python3.5/dist-packages/pip
----------MXNet Info-----------
Version : 1.0.0
Directory : /home/ubuntu/mxnet/python/mxnet
Hashtag not found. Not installed from pre-built package.
----------System Info----------
Platform : Linux-4.4.0-1044-aws-x86_64-with-Ubuntu-16.04-xenial
system : Linux
node : ip-172-31-42-70
release : 4.4.0-1044-aws
version : #53-Ubuntu SMP Mon Dec 11 13:49:57 UTC 2017
----------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): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz
Stepping: 1
CPU MHz: 2710.585
CPU max MHz: 3000.0000
CPU min MHz: 1200.0000
BogoMIPS: 4600.04
Hypervisor vendor: Xen
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 46080K
NUMA node0 CPU(s): 0-3
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx xsaveopt
----------Network Test----------
Setting timeout: 10
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0818 sec, LOAD: 0.3255 sec.
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0009 sec, LOAD: 0.4925 sec.
Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0270 sec, LOAD: 0.0870 sec.
Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.2989 sec, LOAD: 0.1235 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.1669 sec, LOAD: 0.2414 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0109 sec, LOAD: 0.2220 sec.

Build info (Required if built from source)

Compiler (gcc/clang/mingw/visual studio): gcc

MXNet commit hash: 5540ee9

Build config:
USE_GPERFTOOLS = 1
USE_JEMALLOC = 0

Error Message:

src/tcmalloc.cc:284] Attempt to free invalid pointer 0x23fe780
Aborted (core dumped)

Minimum reproducible example

import scipy.stats
import mxnet

Steps to reproduce

Just run these two commands

What have you tried to solve it?

Not yet. But I'll try to disable the GPERFTOOL and test again.

@sxjscience
Copy link
Member Author

sxjscience commented Dec 16, 2017

The error looks similar to #9096. I'll test again with GPERFTOOLS disabled.

@sxjscience
Copy link
Member Author

I can confirm that the problem does not exist if I compile with GPERFTOOLS=0.

@sxjscience
Copy link
Member Author

It's because the scipy loads the libs related to malloc first. One solution is to import mxnet and then import scipy.stats as ss.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant