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/05/16 09:25:58 UTC
[GitHub] GSanchis opened a new issue #10971: Segmentation fault with custom
operator
GSanchis opened a new issue #10971: Segmentation fault with custom operator
URL: https://github.com/apache/incubator-mxnet/issues/10971
## Description
Hi all. I've just recently stumbled into a segmentation fault, which I can't really explain. Creating a new operator (even the softmax in the example) leads to it.
## Environment info (Required)
```
----------Python Info----------
Version : 3.5.2
Compiler : GCC 5.4.0 20160609
Build : ('default', 'Nov 17 2016 17:05:23')
Arch : ('64bit', 'ELF')
------------Pip Info-----------
Version : 9.0.3
Directory : /home/exx/.local/lib/python3.5/site-packages/pip
----------MXNet Info-----------
Version : 1.2.0
Directory : /home/exx/.local/lib/python3.5/site-packages/mxnet
Commit Hash : b2ccd34ad2801b6c87c957c28ad718562a4c5b6e
----------System Info----------
Platform : Linux-4.4.0-92-generic-x86_64-with-Ubuntu-16.04-xenial
system : Linux
node : tensorflow
release : 4.4.0-92-generic
version : #115-Ubuntu SMP Thu Aug 10 09:04:33 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): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
Stepping: 1
CPU MHz: 1268.449
CPU max MHz: 3000.0000
CPU min MHz: 1200.0000
BogoMIPS: 4191.30
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 20480K
NUMA node0 CPU(s): 0-7,16-23
NUMA node1 CPU(s): 8-15,24-31
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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm
pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
----------Network Test----------
Setting timeout: 10
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0764 sec, LOAD: 0.0217 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0028 sec, LOAD: 0.2659 sec.
Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0201 sec, LOAD: 0.3272 sec.
Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.1216 sec, LOAD: 0.3743 sec.
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0022 sec, LOAD: 0.4305 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.2415 sec, LOAD: 0.3285 sec.
```
I'm using mxnet-cu80 for Python 3.5.
## Build info (Required if built from source)
Downloaded via `pip install --user mxnet-cu80==1.2.0b20180516`. I was using mxnet-cu80-1.0.0, but ran into this same problem, and tried updating.
## Error Message:
```
Segmentation fault: 11
Stack trace returned 10 entries:
[bt] (0) /home/exx/.local/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x331d6a) [0x7f3b7618fd6a]
[bt] (1) /home/exx/.local/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x2968b06) [0x7f3b787c6b06]
[bt] (2) /lib/x86_64-linux-gnu/libc.so.6(+0x354b0) [0x7f3be81064b0]
[bt] (3) /home/exx/.local/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x4b7589) [0x7f3b76315589]
[bt] (4) /home/exx/.local/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x4b8655) [0x7f3b76316655]
[bt] (5) /home/exx/.local/lib/python3.5/site-packages/mxnet/libmxnet.so(+0x684bf8a) [0x7f3b7c6a9f8a]
[bt] (6) /home/exx/.local/lib/python3.5/site-packages/mxnet/libmxnet.so(MXSymbolCreateAtomicSymbol+0x6e1) [0x7f3b782e66a1]
[bt] (7) /usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(ffi_call_unix64+0x4c) [0x7f3be6ef9e20]
[bt] (8) /usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(ffi_call+0x2eb) [0x7f3be6ef988b]
[bt] (9) /usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(_ctypes_callproc+0x49a) [0x7f3be6ef401a]
## Minimum reproducible example
I believe this is the core of what is leading me to the error:
``` user_embed = mx.symbol.Embedding(name="user_embed", data=user,
input_dim=max_users, output_dim=embed_size)
item_embed = mx.symbol.Embedding(name="item_embed", data=item,
input_dim=max_items, output_dim=embed_size)
user = mx.symbol.L2Normalization(user_embed)
item = mx.symbol.L2Normalization(item_embed)
dot = user * item
dot = mx.symbol.sum_axis(dot, axis=1)
cosine = mx.symbol.Flatten(dot)
pred = mx.symbol.Custom(data=cosine, label=[score], name='ce', op_type='softmax')
```
The `softmax` operator is implemented as in the example (copy-paste).
----------------------------------------------------------------
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