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

pure virtual function call #10513

Closed
idealboy opened this issue Apr 12, 2018 · 4 comments
Closed

pure virtual function call #10513

idealboy opened this issue Apr 12, 2018 · 4 comments

Comments

@idealboy
Copy link

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

(Brief description of the problem in no more than 2 sentences.)
when I predict the image with resnet-18 in java jni(jdk 1.8), the problem occure at random in release mode.

Environment info (Required)

pure virtual method called
terminate called without an active exception
run.sh: line 2: 14921 Aborted (core dumped) java test

What to do:
1. Download the diagnosis script from https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py
2. Run the script using `python diagnose.py` and paste its output here.
----------Python Info----------
('Version      :', '2.7.12')
('Compiler     :', 'GCC 4.4.7 20120313 (Red Hat 4.4.7-1)')
('Build        :', ('default', 'Jul  2 2016 17:42:40'))
('Arch         :', ('64bit', 'ELF'))
------------Pip Info-----------
('Version      :', '9.0.1')
('Directory    :', '/**/anaconda2/lib/python2.7/site-packages/pip')
----------MXNet Info-----------
('Version      :', '1.2.0')
('Directory    :', '/**/anaconda2/lib/python2.7/site-packages/mxnet-1.2.0-py2.7.egg/mxnet')
Hashtag not found. Not installed from pre-built package.
----------System Info----------
('Platform     :', 'Linux-3.10.0-123.el7.x86_64-x86_64-with-centos-7.0.1406-Core')
('system       :', 'Linux')
('node         :', '**')
('release      :', '3.10.0-123.el7.x86_64')
('version      :', '#1 SMP Mon Jun 30 12:09:22 UTC 2014')
----------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:                 63
Model name:            Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
Stepping:              2
CPU MHz:               2599.968
BogoMIPS:              4804.68
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
----------Network Test----------
Setting timeout: 10
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0699 sec, LOAD: 1.4575 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0792 sec, LOAD: 0.5487 sec.
Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.2705 sec, LOAD: 1.4616 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.1860 sec, LOAD: 1.0033 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.5776 sec, LOAD: 0.1848 sec.
Error open Gluon Tutorial(cn): https://zh.gluon.ai, <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>, DNS finished in 0.693331956863 sec.

Package used (Python/R/Scala/Julia):
(I'm using ...)

For Scala user, please provide:

  1. Java version: (java -version)
  2. Maven version: (mvn -version)
  3. Scala runtime if applicable: (scala -version)

For R user, please provide R sessionInfo():

Build info (Required if built from source)

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

MXNet commit hash:
(Paste the output of git rev-parse HEAD here.)

Build config:
(Paste the content of config.mk, or the build command.)

Error Message:

(Paste the complete error message, including stack trace.)

Minimum reproducible example

(If you are using your own code, please provide a short script that reproduces the error. Otherwise, please provide link to the existing example.)

Steps to reproduce

(Paste the commands you ran that produced the error.)

What have you tried to solve it?

@idealboy
Copy link
Author

(gdb) backtrace
#0 0x00007f29b8b844da in malloc_consolidate () from /lib64/libc.so.6
#1 0x00007f29b8b85087 in _int_free () from /lib64/libc.so.6
#2 0x00007f29bb1d8e2c in __gnu_cxx::new_allocator<std::_Sp_counted_ptr_inplace<mxnet::NDArray::Chunk, std::allocatormxnet::NDArray::Chunk, (__gnu_cxx::_Lock_policy)2> >::deallocate (this=0x7f2955a3fbaf,
__p=0x2c03220) at /usr/include/c++/4.8.2/ext/new_allocator.h:110
#3 0x00007f29bb1c4cec in std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<mxnet::NDArray::Chunk, std::allocatormxnet::NDArray::Chunk, (__gnu_cxx::_Lock_policy)2> > >::deallocate (__a=...,
__p=0x2c03220, __n=1) at /usr/include/c++/4.8.2/bits/alloc_traits.h:377
#4 0x00007f29bb1db3d2 in std::_Sp_counted_ptr_inplace<mxnet::NDArray::Chunk, std::allocatormxnet::NDArray::Chunk, (__gnu_cxx::_Lock_policy)2>::_M_destroy (this=0x2c03220)
at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:417
#5 0x00007f29ba72a016 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x2c03220) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:161
#6 0x00007f29ba723295 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count (this=0x305cca8, __in_chrg=) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:546
#7 0x00007f29baa27b44 in std::__shared_ptr<mxnet::NDArray::Chunk, (__gnu_cxx::_Lock_policy)2>::
__shared_ptr (this=0x305cca0, __in_chrg=) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:781
#8 0x00007f29baa27b5e in std::shared_ptrmxnet::NDArray::Chunk::shared_ptr (this=0x305cca0, __in_chrg=) at /usr/include/c++/4.8.2/bits/shared_ptr.h:93
#9 0x00007f29baa28dbc in mxnet::NDArray::NDArray (this=0x305cca0, __in_chrg=) at include/mxnet/./././ndarray.h:81
#10 0x00007f29bcc21ef4 in mxnet::__lambda36::
(void) (this=0x305cca0, __in_chrg=) at src/ndarray/ndarray.cc:1179
#11 0x00007f29bcc3420d in std::_Function_base::_Base_manager<mxnet::CopyFromTo(const mxnet::NDArray&, const mxnet::NDArray&, int)::__lambda36>::_M_destroy(std::_Any_data &, std::false_type) (__victim=...)
at /usr/include/c++/4.8.2/functional:1926
#12 0x00007f29bcc33046 in std::_Function_base::_Base_manager<mxnet::CopyFromTo(const mxnet::NDArray&, const mxnet::NDArray&, int)::__lambda36>::_M_manager(std::_Any_data &, const std::_Any_data &, std::_Manager_operation) (__dest=..., __source=..., __op=std::__destroy_functor) at /usr/include/c++/4.8.2/functional:1950
#13 0x00007f29ba720af5 in std::_Function_base::
_Function_base (this=0x322c438, __in_chrg=) at /usr/include/c++/4.8.2/functional:2030
#14 0x00007f29bc7ec398 in std::function<void (mxnet::RunContext, mxnet::engine::CallbackOnComplete)>::~function() (this=0x322c438, __in_chrg=) at /usr/include/c++/4.8.2/functional:2174
#15 0x00007f29bd26c802 in mxnet::engine::ThreadedOpr::~ThreadedOpr (this=0x322c438, _in_chrg=) at src/engine/./threaded_engine.h:224
#16 0x00007f29bd26c820 in mxnet::common::ObjectPoolmxnet::engine::ThreadedOpr::Delete (this=0x28fad20, ptr=0x322c438) at src/engine/./../common/object_pool.h:158
#17 0x00007f29bd26b7ae in mxnet::common::ObjectPoolAllocatablemxnet::engine::ThreadedOpr::Delete (ptr=0x322c438) at src/engine/./../common/object_pool.h:215
#18 0x00007f29bd26b057 in mxnet::engine::ThreadedEngine::OnComplete (this=0x290b830, threaded_opr=0x322c438) at src/engine/threaded_engine.cc:450
#19 0x00007f29bd2691a9 in mxnet::engine::ThreadedEngine::OnCompleteStatic (engine=0x290b830, opr_block
=0x28dd690) at src/engine/threaded_engine.cc:473
#20 0x00007f29bc7ec37d in mxnet::engine::CallbackOnComplete::operator() (this=0x7f2955a40090) at include/mxnet/././engine.h:61
#21 0x00007f29bcc21eb6 in mxnet::__lambda36::operator() (__closure=0x305cca0, ctx=..., on_complete=...) at src/ndarray/ndarray.cc:1181
#22 0x00007f29bcc32faa in std::_Function_handler<void(mxnet::RunContext, mxnet::engine::CallbackOnComplete), mxnet::CopyFromTo(const mxnet::NDArray&, const mxnet::NDArray&, int)::__lambda36>::_M_invoke(const std::_Any_data &, mxnet::RunContext, mxnet::engine::CallbackOnComplete) (__functor=..., __args#0=..., __args#1=...) at /usr/include/c++/4.8.2/functional:2071
#23 0x00007f29bd25dd79 in std::function<void (mxnet::RunContext, mxnet::engine::CallbackOnComplete)>::operator()(mxnet::RunContext, mxnet::engine::CallbackOnComplete) const (this=0x322c438, __args#0=...,
__args#1=...) at /usr/include/c++/4.8.2/functional:2464
#24 0x00007f29bd25fd64 in mxnet::engine::ThreadedEngine::ExecuteOprBlock (this=0x290b830, run_ctx=..., opr_block=0x28dd690) at src/engine/./threaded_engine.h:367
#25 0x00007f29bd271c8d in mxnet::engine::ThreadedEnginePerDevice::CPUWorker<(dmlc::ConcurrentQueueType)0> (this=0x290b830, ctx=..., block=0x2d895e0, ready_event=...)
at src/engine/threaded_engine_perdevice.cc:284
#26 0x00007f29bd26fce1 in mxnet::engine::ThreadedEnginePerDevice::PushToExecute(mxnet::engine::OprBlock*, bool)::{lambda()#1}::operator()() const::{lambda(std::shared_ptrdmlc::ManualEvent)#1}::operator()(dmlc::ManualEvent) const (__closure=0x2849670, ready_event=...) at src/engine/threaded_engine_perdevice.cc:129
#27 0x00007f29bd274490 in std::_Function_handler<void (std::shared_ptrdmlc::ManualEvent), mxnet::engine::ThreadedEnginePerDevice::PushToExecute(mxnet::engine::OprBlock*, bool)::{lambda()#1}::operator()() const::{lambda(std::shared_ptrdmlc::ManualEvent)#1}>::_M_invoke(std::_Any_data const&, std::shared_ptrdmlc::ManualEvent) (__functor=..., __args#0=...) at /usr/include/c++/4.8.2/functional:2071
#28 0x00007f29bd279428 in std::function<void (std::shared_ptrdmlc::ManualEvent)>::operator()(std::shared_ptrdmlc::ManualEvent) const (this=0x2d89a40, __args#0=...) at /usr/include/c++/4.8.2/functional:2464
#29 0x00007f29bd279358 in std::_Bind_simple<std::function<void (std::shared_ptrdmlc::ManualEvent)> (std::shared_ptrdmlc::ManualEvent)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0x2d89a30)
at /usr/include/c++/4.8.2/functional:1732
#30 0x00007f29bd279243 in std::_Bind_simple<std::function<void (std::shared_ptrdmlc::ManualEvent)> (std::shared_ptrdmlc::ManualEvent)>::operator()() (this=0x2d89a30) at /usr/include/c++/4.8.2/functional:1720
#31 0x00007f29bd2791dc in std::thread::_Impl<std::_Bind_simple<std::function<void (std::shared_ptrdmlc::ManualEvent)> (std::shared_ptrdmlc::ManualEvent)> >::_M_run() (this=0x2d89a18)
at /usr/include/c++/4.8.2/thread:115
#32 0x00007f29b9495da0 in ?? () from /lib64/libstdc++.so.6
#33 0x00007f29b88f3df3 in start_thread () from /lib64/libpthread.so.0
#34 0x00007f29b8bfe1ad in clone () from /lib64/libc.so.6

@Roshrini
Copy link
Member

Roshrini commented May 1, 2018

@idealboy Can you provide the script you are trying to run to better understand the issue you are facing? Are you calling scala APIs from java in your example?

@nswamy Can you add label-
UnclearError/Doc

@lanking520
Copy link
Member

lanking520 commented May 11, 2018

I think you are trying to call Python API for Java right? We are currently working on the Java support. I recommend you to start with Scala library that already existed as you can import that to Java directly.

@nswamy
Copy link
Member

nswamy commented Jul 25, 2018

Since we do not have information to reproduce, I will close this issue. Please feel free to create a new Issue if there is still a problem.

@nswamy nswamy closed this as completed Jul 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants