[Pkg-opencl-devel] Bug#913141: beignet: Segmentation fault while running opencv_perf_dnn

sander linux at eikelenboom.it
Wed Nov 7 13:06:19 GMT 2018


Package: beignet
Version: 1.3.2-4
Severity: normal

With the beignet packages from the Debian repository it get a segfault when running opencv_perf_dnn. When i recompile the source package with llvm 3.9 instead of 6.0 specified in the debian/rules file, no segmentation fault occurs.
I have a backtrace from GDB which i will attach, not sure if this is an issue with beignet or LLVM.

Thanks,
Sander

GDB backtrace:

gdb ./opencv_perf_dnn 
GNU gdb (Debian 8.1-4+b1) 8.1
Copyright (C) 2018 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:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./opencv_perf_dnn...(no debugging symbols found)...done.
(gdb) run
Starting program: /mnt/scratch/src/opencv/build/bin/opencv_perf_dnn 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe0ad9700 (LWP 27031)]
[New Thread 0x7fffe02d8700 (LWP 27032)]
[New Thread 0x7fffddad6700 (LWP 27033)]
[New Thread 0x7fffdd2d5700 (LWP 27034)]
[New Thread 0x7fffdcad4700 (LWP 27039)]
[New Thread 0x7fffdc6d3700 (LWP 27043)]
[New Thread 0x7fffd5ffe700 (LWP 27044)]
Time compensation is 0
[New Thread 0x7fffd5817700 (LWP 27057)]
[Thread 0x7fffd5817700 (LWP 27057) exited]
CTEST_FULL_OUTPUT
OpenCV version: 4.0.0-pre
OpenCV VCS version: 4.0.0-alpha-103-ga9c8a526c-dirty
Build type: Release
Compiler: /usr/bin/c++  (ver 8.2.0)
Parallel framework: tbb
CPU features: SSE SSE2 SSE3 *SSE4.1 *SSE4.2 *FP16 *AVX *AVX2 *AVX512-SKX?
Intel(R) IPP version: ippIP AVX2 (l9) 2017.0.3 (-) Jul 29 2017
OpenCL Platforms: 
    Intel Gen OCL Driver
        iGPU: Intel(R) HD Graphics Haswell Ultrabook GT2 Mobile (OpenCL 1.2 beignet 1.3)
Current OpenCL device: 
    Type = iGPU
    Name = Intel(R) HD Graphics Haswell Ultrabook GT2 Mobile
    Version = OpenCL 1.2 beignet 1.3
    Driver version = 1.3
    Address bits = 32
    Compute units = 20
    Max work group size = 512
    Local memory size = 64 KB
    Max memory allocation size = 1 GB 512 MB
    Double support = No
    Host unified memory = Yes
    Device extensions:
        cl_khr_global_int32_base_atomics
        cl_khr_global_int32_extended_atomics
        cl_khr_local_int32_base_atomics
        cl_khr_local_int32_extended_atomics
        cl_khr_byte_addressable_store
        cl_khr_3d_image_writes
        cl_khr_image2d_from_buffer
        cl_khr_depth_images
        cl_khr_spir
        cl_khr_icd
        cl_intel_accelerator
        cl_intel_subgroups
        cl_intel_subgroups_short
        cl_khr_gl_sharing
    Has AMD Blas = No
    Has AMD Fft = No
    Preferred vector width char = 16
    Preferred vector width short = 8
    Preferred vector width int = 4
    Preferred vector width long = 2
    Preferred vector width float = 4
    Preferred vector width double = 0
[==========] Running 363 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 300 tests from Conv
[ RUN      ] Conv.conv/0, where GetParam() = (GFLOPS=10.087, K=[3 x 3], IN={1, 576, 38, 50}, OCN=512, PM=SAME, BIAS, OCV/CPU)
IN=4275 Kb [ 1 576 38 50 ]    OUT=3800 Kb [ 1 512 38 50 ]    Weights(parameters): 10370 Kb    MFLOPS=10087
.
[ PERFSTAT ]    (samples=100   mean=171.30   median=168.30   min=124.36   stddev=26.23 (15.3%))
[       OK ] Conv.conv/0 (18135 ms)
[ RUN      ] Conv.conv/1, where GetParam() = (GFLOPS=10.087, K=[3 x 3], IN={1, 576, 38, 50}, OCN=512, PM=SAME, BIAS, OCV/OCL)
[New Thread 0x7fffd5817700 (LWP 27430)]
OpenCV(ocl4dnn): consider to specify kernel configuration cache directory 
                 via OPENCV_OCL4DNN_CONFIG_PATH parameter.

Thread 1 "opencv_perf_dnn" received signal SIGSEGV, Segmentation fault.
0x00007fffbb848da4 in llvm::Use::getImpliedUser() const () from /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
(gdb) bt
#0  0x00007fffbb848da4 in llvm::Use::getImpliedUser() const () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#1  0x00007fffbb848e19 in llvm::Use::getUser() const () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#2  0x00007fffbacf11b9 in  () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#3  0x00007fffbb582560 in llvm::LoopBase<llvm::BasicBlock, llvm::Loop>::getLoopLatch() const () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#4  0x00007fffbb5826c6 in llvm::Loop::getLoopID() const () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#5  0x00007fffb9bf3993 in  () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#6  0x00007fffbb58d14b in llvm::LPPassManager::runOnFunction(llvm::Function&) () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#7  0x00007fffbb80dc78 in llvm::FPPassManager::runOnFunction(llvm::Function&) () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#8  0x00007fffbb4ecd83 in  () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#9  0x00007fffbb80d5b6 in llvm::legacy::PassManagerImpl::run(llvm::Module&) () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#10 0x00007fffb9bef5c4 in  () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#11 0x00007fffb9bef9ad in  () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#12 0x00007fffb9b5ae1d in  () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#13 0x00007fffb9cbfd22 in  () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#14 0x00007fffb9b707ef in  () at /usr/lib/x86_64-linux-gnu/beignet//libgbe.so
#15 0x00007fffd5b8b939 in  () at /usr/lib/x86_64-linux-gnu/beignet//libcl.so
#16 0x00007fffd5b8084b in clBuildProgram () at /usr/lib/x86_64-linux-gnu/beignet//libcl.so
#17 0x00007ffff44a7abe in cv::ocl::Program::Impl::buildFromSources(cv::ocl::Context const&, cv::ocl::ProgramSource::Impl const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) ()
    at /mnt/scratch/src/opencv/build/lib/libopencv_core.so.4.0
#18 0x00007ffff44ae1e4 in cv::ocl::Program::Impl::compileWithCache(cv::ocl::Context const&, cv::ocl::ProgramSource::Impl const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) ()
    at /mnt/scratch/src/opencv/build/lib/libopencv_core.so.4.0
#19 0x00007ffff44b8dcc in cv::ocl::Program::Impl::Impl(cv::ocl::ProgramSource const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () at /mnt/scratch/src/opencv/build/lib/libopencv_core.so.4.0
#20 0x00007ffff44b9288 in cv::ocl::Program::create(cv::ocl::ProgramSource const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () at /mnt/scratch/src/opencv/build/lib/libopencv_core.so.4.0
#21 0x00007ffff44bb3a0 in cv::ocl::Context::Impl::getProg(cv::ocl::ProgramSource const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () at /mnt/scratch/src/opencv/build/lib/libopencv_core.so.4.0
#22 0x00007ffff44bb581 in cv::ocl::Context::getProg(cv::ocl::ProgramSource const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () at /mnt/scratch/src/opencv/build/lib/libopencv_core.so.4.0
#23 0x00007ffff7b99727 in cv::dnn::ocl4dnn::OCL4DNNConvSpatial<float>::compileKernel() () at /mnt/scratch/src/opencv/build/lib/libopencv_dnn.so.4.0
#24 0x00007ffff7b9a6a4 in cv::dnn::ocl4dnn::OCL4DNNConvSpatial<float>::createGEMMLikeConvKernel(int, int, int) () at /mnt/scratch/src/opencv/build/lib/libopencv_dnn.so.4.0
#25 0x00007ffff7b9ab12 in cv::dnn::ocl4dnn::OCL4DNNConvSpatial<float>::createConvolutionKernel(int, int, int, int) () at /mnt/scratch/src/opencv/build/lib/libopencv_dnn.so.4.0
#26 0x00007ffff7b9e183 in cv::dnn::ocl4dnn::OCL4DNNConvSpatial<float>::useFirstAvailable(cv::UMat const&, cv::UMat&, cv::UMat const&, cv::UMat const&, int, cv::UMat&) () at /mnt/scratch/src/opencv/build/lib/libopencv_dnn.so.4.0
#27 0x00007ffff7b9f631 in cv::dnn::ocl4dnn::OCL4DNNConvSpatial<float>::prepareKernel(cv::UMat const&, cv::UMat&, cv::UMat const&, cv::UMat const&, int) () at /mnt/scratch/src/opencv/build/lib/libopencv_dnn.so.4.0
#28 0x00007ffff7b9f8d7 in cv::dnn::ocl4dnn::OCL4DNNConvSpatial<float>::Forward(cv::UMat const&, cv::UMat const&, cv::UMat const&, cv::UMat const&, cv::UMat&, int) () at /mnt/scratch/src/opencv/build/lib/libopencv_dnn.so.4.0
#29 0x00007ffff7af233b in cv::dnn::ConvolutionLayerImpl::forward(cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&) () at /mnt/scratch/src/opencv/build/lib/libopencv_dnn.so.4.0
#30 0x00007ffff7abffff in cv::dnn::dnn4_v20180917::Net::Impl::forwardLayer(cv::dnn::dnn4_v20180917::LayerData&) () at /mnt/scratch/src/opencv/build/lib/libopencv_dnn.so.4.0
#31 0x00007ffff7ac0e9a in cv::dnn::dnn4_v20180917::Net::Impl::forwardToLayer(cv::dnn::dnn4_v20180917::LayerData&, bool) () at /mnt/scratch/src/opencv/build/lib/libopencv_dnn.so.4.0
#32 0x00007ffff7ad6e2e in cv::dnn::dnn4_v20180917::Net::forward(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () at /mnt/scratch/src/opencv/build/lib/libopencv_dnn.so.4.0
#33 0x0000555555579103 in opencv_test::Conv_conv_Test::PerfTestBody() ()
#34 0x00005555555ad9a1 in perf::TestBase::RunPerfTestBody() ()
#35 0x000055555556f48a in opencv_test::Conv_conv_Test::TestBody() ()
#36 0x00005555555aab7a in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ()
#37 0x00005555555aad8a in testing::Test::Run() ()
#38 0x00005555555ab070 in testing::TestInfo::Run() ()
#39 0x00005555555ab145 in testing::TestCase::Run() ()
#40 0x00005555555ab66c in testing::internal::UnitTestImpl::RunAllTests() ()
#41 0x00005555555ab78e in testing::UnitTest::Run() ()
#42 0x000055555556e982 in main ()




-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-t440s-20181022 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages beignet depends on:
ii  beignet-opencl-icd  1.3.2-4

beignet recommends no packages.

beignet suggests no packages.

-- no debconf information



More information about the Pkg-opencl-devel mailing list