Forums - snpe-1.35.0.698/examples/NativeCpp/SampleCode/obj/local/x86_64-linux-clang/snpe-sample Program terminated with signal SIGSEGV, S

1 post / 0 new
snpe-1.35.0.698/examples/NativeCpp/SampleCode/obj/local/x86_64-linux-clang/snpe-sample Program terminated with signal SIGSEGV, S
hkwan72
Join Date: 17 Dec 19
Posts: 1
Posted: Mon, 2020-02-17 21:47

Hi,

I'm using snpe-1.35.0.698 now and  model data is inception_v3 which is downloaded by using "python $SNPE_ROOT/models/inception_v3/scripts/setup_inceptionv3.py -a ~/tmpdir -d " for CPU.

I got a problem as below while execute snpe-sample which is compiled with x86_64-linux-clang.

VirtualBox:~/work_root/extHDD/snpe-1.35.0.698/models/inception_v3/data$ ~/work_root/extHDD/snpe-1.35.0.698/examples/NativeCpp/SampleCode/obj/local/x86_64-linux-clang/snpe-sample -b ITENSOR -d ../dlc/inception_v3.dlc -i target_raw_list.txt -o output
Segmentation fault. (core dumped)
hkwan72@hkwan72-VirtualBox:~/work_root/extHDD/snpe-1.35.0.698/models/inception_v3/data$ gdb /home/hkwan72/work_root/extHDD/snpe-1.35.0.698/examples/NativeCpp/SampleCode/obj/local/x86_64-linux-clang/snpe-sample ./core 
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/hkwan72/work_root/extHDD/snpe-1.35.0.698/examples/NativeCpp/SampleCode/obj/local/x86_64-linux-clang/snpe-sample...done.
[New LWP 13970]
[New LWP 13973]
[New LWP 13971]
[New LWP 13972]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/home/hkwan72/work_root/extHDD/snpe-1.35.0.698/examples/NativeCpp/SampleCode/ob'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:148
148 ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: No such file or directory.
[Current thread is 1 (Thread 0x7ffb58189780 (LWP 13970))]
(gdb) bt
#0  __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:148
#1  0x00007ffb5758f3c2 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x00007ffb5758f6e9 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x000000000041c085 in main (argc=9, argv=0x7ffc87dc3e88) at jni/main.cpp:331
(gdb) up
#1  0x00007ffb5758f3c2 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) up
#2  0x00007ffb5758f6e9 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) up
#3  0x000000000041c085 in main (argc=9, argv=0x7ffc87dc3e88) at jni/main.cpp:331
331     opts.LogFileDirectory = OutputDir;
(gdb) up
Initial frame selected; you cannot go up.
(gdb) up
Initial frame selected; you cannot go up.
(gdb) down
#2  0x00007ffb5758f6e9 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) down
#1  0x00007ffb5758f3c2 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) down
#0  __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:148
148 ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: No such file or directory.

 

#3  0x000000000041c085 in main (argc=9, argv=0x7ffc87dc3e88) at jni/main.cpp:331
331     opts.LogFileDirectory = OutputDir;
(gdb) list
326     auto logger_opt = snpe->getDiagLogInterface();
327     if (!logger_opt) throw std::runtime_error("SNPE failed to obtain logging interface");
328     auto logger = *logger_opt;
329     auto opts = logger->getOptions();
330
331     opts.LogFileDirectory = OutputDir;
332     if(!logger->setOptions(opts)) {
333         std::cerr << "Failed to set options" << std::endl;
334         return EXIT_FAILURE;
335     }
(gdb) f 2
#2  0x00007ffb5758f6e9 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) list
336     if (!logger->start()) {
337         std::cerr << "Failed to start logger" << std::endl;
338         return EXIT_FAILURE;
339     }
340
341     // Check the batch size for the container
342     // SNPE 1.16.0 (and newer) assumes the first dimension of the tensor shape
343     // is the batch size.
344     zdl::DlSystem::TensorShape tensorShape;
345     tensorShape = snpe->getInputDimensions();
(gdb) f 1
#1  0x00007ffb5758f3c2 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) list
346     size_t batchSize = tensorShape.getDimensions()[0];
347 #ifdef ANDROID
348     size_t bufSize = 0;
349     if (userBufferSourceType == GLBUFFER) {
350         if(batchSize > 1) {
351             std::cerr << "GL buffer source mode does not support batchsize larger than 1" << std::endl;
352             return EXIT_FAILURE;
353         }
354         bufSize = calcSizeFromDims(tensorShape.getDimensions(), tensorShape.rank(), sizeof(float));
355     }
(gdb) f 0
#0  __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:148
148 ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: No such file or directory..
(gdb) list
143 in ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S
 

< ldd info >

VirtualBox:~/work_root/extHDD/snpe-1.35.0.698/examples/NativeCpp/SampleCode/obj/local/x86_64-linux-clang$ ldd snpe-sample 
linux-vdso.so.1 =>  (0x00007ffd74eb6000)
libSNPE.so => /home/hkwan72/work_root/extHDD/snpe-1.34.0.659/lib/x86_64-linux-clang/libSNPE.so (0x00007fc8796ea000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc879368000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc87905f000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc878e49000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc878a7f000)
libsymphony-cpu.so => /home/hkwan72/work_root/extHDD/snpe-1.34.0.659/lib/x86_64-linux-clang/libsymphony-cpu.so (0x00007fc877f88000)
libatomic.so.1 => /usr/lib/x86_64-linux-gnu/libatomic.so.1 (0x00007fc877d80000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc877b7c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc87795f000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc879e3a000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fc877757000)
 

now i'm trying to debug this error by using Gdb but it is not easy to fix it by myself.

is there any solution or a patch regard to this problem ?

if we get additional information regarding this issue, it would be very helpful for us to investigate this matter .

Thanks.

 

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.