apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
https://mxnet.apache.org
Apache License 2.0
20.78k stars 6.79k forks source link

mxnet.ndarray.op.sample_negative_binomial aborts #20049

Open DNXie opened 3 years ago

DNXie commented 3 years ago

Description

mxnet.ndarray.op.sample_negative_binomial crashes(aborts)

Error Message


Segmentation fault: 11

terminate called without an active exception
Aborted (core dumped)

To Reproduce

The reproducing code can be found in this gist

import mxnet
import numpy as np
mxnet.ndarray.op.sample_negative_binomial(p=mxnet.nd.array(np.ones((0,))),k=mxnet.nd.ones((3)))

Environment

OS: ubuntu 18.04 Python: 3.7.6 pip: 20.0.2 numpy: 1.18.5 mxnet: 1.7.0

Related

20051 #20052

DNXie commented 3 years ago

Btw, mxnet.ndarray.op.sample_gamma, mxnet.ndarray.op.sample_normal and mxnet.ndarray.sample_generalized_negative_binomial have similar crash

mxnet.ndarray.op.sample_gamma(alpha=mxnet.nd.ones((4,)), beta=mxnet.nd.array(np.ones((0,))))

Error Message:

Segmentation fault: 11

Stack trace:
  [bt] (0) /root/miniconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x3c27360) [0x7f159d475360]
terminate called after throwing an instance of 'std::system_error'
  what():  Resource deadlock avoided
Aborted (core dumped)
mxnet.ndarray.op.sample_normal(mu=mxnet.nd.ones((4,)) sigma=mxnet.nd.array(np.ones((0,))))

Error Message:


Segmentation fault: 11

Stack trace:
  [bt] (0) /root/miniconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x3c27360) [0x7fc7f27cb360]
terminate called after throwing an instance of 'std::system_error'
  what():  Resource deadlock avoided
Aborted (core dumped)
import mxnet
import numpy as np
mxnet.ndarray.sample_generalized_negative_binomial(alpha=mxnet.nd.array(np.ones((0,))), mu=mxnet.nd.ones((4,)))

Error Message:


Segmentation fault: 11

Stack trace:
  [bt] (0) /root/miniconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x3c27360) [0x7f37260e7360]
terminate called after throwing an instance of 'std::system_error'
  what():  Resource deadlock avoided
Aborted (core dumped)