-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TestCase SegementFault, Testing MNN in ARM32v7REV0 , Linux #181
Comments
Does "set MNN_USE_THREAD_POOL = off |
set MNN_USE_THREAD_POOL OFF compile failed PEK1000248505:/home/MNN-master/build # make -j4 |
set MNN_USE_THREAD_POOL OFF still compile failed PEK1000248505:/home/MNN-master/build # make -j4 |
update: copy omp.h to ./include then recompile MNN ok (cp /opt/cross_tools/sysroot-bcm_armv7a-glibc_small/x86_64-wrlinuxsdk-linux/usr/toolchain/lib/gcc/arm-wrs-linux-gnueabi/4.8.1/include/omp.h include/) this time MNNV2Basic.out worked fine. maybe MNN should place a omp.h in ./include ? |
set MNN_FORBID_MULTI_THREAD ON then it worked. |
The bug in thread pool has been fixed, you can try set MNN_USE_THREAD_POOL ON |
stack and registers
using gcc cross-tools 4.9.3
not showing every time , mostly no stack trace is printed.
Save AllTensors to output/*.txt
Open Model wlan_model.mnn
[New Thread 0xb694f450 (LWP 12463)]
[New Thread 0xb614f450 (LWP 12464)]
[New Thread 0xb594f450 (LWP 12469)]
test_main, 199, cost time: 83.486000 ms
===========> Session Resize Done.
===========> Session Start running...
Input: 1, 6, 0, 0
W,H,C,B: 0 X 64 X 0 X 1, L1/MatMul : 0
W,H,C,B: 0 X 64 X 0 X 1, L1/BiasAdd : 0
W,H,C,B: 0 X 64 X 0 X 1, L1/Relu : 0
W,H,C,B: 0 X 128 X 0 X 1, L2/MatMul : 0
W,H,C,B: 0 X 128 X 0 X 1, L2/BiasAdd : 0
W,H,C,B: 0 X 128 X 0 X 1, L2/Relu : 0
W,H,C,B: 0 X 64 X 0 X 1, L3/MatMul : 0
W,H,C,B: 0 X 64 X 0 X 1, L3/BiasAdd : 0
W,H,C,B: 0 X 64 X 0 X 1, L3/Relu : 0
W,H,C,B: 0 X 2 X 0 X 1, logits/MatMul : 0
W,H,C,B: 0 X 2 X 0 X 1, logits/BiasAdd : 0
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb594f450 (LWP 12469)]
0xb6f25eec in MNN::ThreadPool::ThreadPool(int)::{lambda()#1}::operator()() const () at /home/MNN-master/source/backend/cpu/ThreadPool.cpp:176
176 /home/MNN-master/source/backend/cpu/ThreadPool.cpp: No such file or directory.
(gdb) bt
#0 0xb6f25eec in MNN::ThreadPool::ThreadPool(int)::{lambda()#1}::operator()() const () at /home/MNN-master/source/backend/cpu/ThreadPool.cpp:176
#1 0xb6f2c4e4 in std::_Bind_simple<MNN::ThreadPool::ThreadPool(int)::<lambda()>()>::_M_invoke<>(std::_Index_tuple<>) (this=0xd7714)
at /opt/cross_tools/arm32le_4.1_ek/gcc/arm-linux-gnueabi/include/c++/4.9.3/functional:1700
#2 0xb6f2c40c in std::_Bind_simple<MNN::ThreadPool::ThreadPool(int)::<lambda()>()>::operator()(void) (this=0xd7714) at /opt/cross_tools/arm32le_4.1_ek/gcc/arm-linux-gnueabi/include/c++/4.9.3/functional:1688
#3 0xb6f2c374 in std::thread::_Impl<std::_Bind_simple<MNN::ThreadPool::ThreadPool(int)::<lambda()>()> >::_M_run(void) (this=0xd7708) at /opt/cross_tools/arm32le_4.1_ek/gcc/arm-linux-gnueabi/include/c++/4.9.3/thread:115
#4 0xb6c74a40 in ?? () from /usr/lib/libstdc++.so.6
#5 0xb6cb22e8 in start_thread () from /lib/libpthread.so.0
#6 0xb6a4a54c in ?? () from /lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) info registers
r0 0xb594ede4 3046436324
r1 0x81 129
r2 0x0 0
r3 0x736e6f43 1936617283
r4 0xd76f0 882416
r5 0xb6ca4000 3066707968
r6 0xb594f668 3046438504
r7 0x152 338
r8 0x0 0
r9 0xb594ef90 3046436752
r10 0xb594f910 3046439184
r11 0xb594ef8c 3046436748
r12 0xb6cd5000 3066908672
sp 0xb594edd8 0xb594edd8
lr 0xb6e47280 3068424832
pc 0xb6f25eec 0xb6f25eec <MNN::ThreadPool::ThreadPool(int)::{lambda()#1}::operator()() const+408>
cpsr 0x20000010 536870928
(gdb)
The text was updated successfully, but these errors were encountered: