Skip to content

Layer_Einsum_Test.Accuracy_01D test crashes on 32-bit Linux systems #26008

@asmorkalov

Description

@asmorkalov

System Information

OpenCV: 5.x branch
OS: Linux
Platform: armv7

Detailed description

Debug build (with NEON) + gdb:

ubuntu@jetson1:~/Projects/opencv-build$ ./bin/opencv_test_dnn --gtest_filter=Layer_Einsum_Test.Accuracy_01D*
[ INFO:0@0.062] global ocl.cpp:1185 haveOpenCL Initialize OpenCL runtime...
CTEST_FULL_OUTPUT
OpenCV version: 5.0.0-pre
OpenCV VCS version: 4.10.0-570-g7e8f2a1
Build type: Debug
Compiler: /usr/bin/c++  (ver 5.4.0)
Algorithm hint: ALGO_HINT_ACCURATE
HAL: YES (carotene (ver 0.0.1, Auto detected))
[ INFO:0@0.299] global registry_parallel.impl.hpp:96 ParallelBackendRegistry core(parallel): Enabled backends(3, sorted by priority): ONETBB(1000); TBB(990); OPENMP(980)
Parallel framework: pthreads (nthreads=1)
CPU features: NEON
OpenCL is disabled
TEST: Skip tests with tags: 'mem_2gb', 'verylong', 'debug_verylong', 'dnn_skip_opencv_backend', 'dnn_skip_cpu', 'dnn_skip_cpu_fp16', 'dnn_skip_ocl', 'dnn_skip_ocl_fp16', 'dnn_skip_onnx_conformance', 'dnn_skip_parser'
Note: Google Test filter = Layer_Einsum_Test.Accuracy_01D*
[==========] Running 13 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 13 tests from Layer_Einsum_Test
[ RUN      ] Layer_Einsum_Test.Accuracy_01D/0, where GetParam() = ({}, {}, ",->")
[       OK ] Layer_Einsum_Test.Accuracy_01D/0 (4 ms)
[ RUN      ] Layer_Einsum_Test.Accuracy_01D/1, where GetParam() = ({ 1 }, {}, "i,->i")
Segmentation fault
ubuntu@jetson1:~/Projects/opencv-build$ gdb ./bin/opencv_test_dnn
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 "arm-linux-gnueabihf".
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 ./bin/opencv_test_dnn...done.
(gdb) run --gtest_filter=Layer_Einsum_Test.Accuracy_01D*
Starting program: /home/ubuntu/Projects/opencv-build/bin/opencv_test_dnn --gtest_filter=Layer_Einsum_Test.Accuracy_01D*
Cannot parse expression `.L1185 4@r4'.
warning: Probes-based dynamic linker interface failed.
Reverting to original interface.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[ INFO:0@0.023] global ocl.cpp:1185 haveOpenCL Initialize OpenCL runtime...
CTEST_FULL_OUTPUT
OpenCV version: 5.0.0-pre
OpenCV VCS version: 4.10.0-570-g7e8f2a1
Build type: Debug
Compiler: /usr/bin/c++  (ver 5.4.0)
Algorithm hint: ALGO_HINT_ACCURATE
HAL: YES (carotene (ver 0.0.1, Auto detected))
[ INFO:0@0.157] global registry_parallel.impl.hpp:96 ParallelBackendRegistry core(parallel): Enabled backends(3, sorted by priority): ONETBB(1000); TBB(990); OPENMP(980)
Parallel framework: pthreads (nthreads=1)
CPU features: NEON
OpenCL is disabled
TEST: Skip tests with tags: 'mem_2gb', 'verylong', 'debug_verylong', 'dnn_skip_opencv_backend', 'dnn_skip_cpu', 'dnn_skip_cpu_fp16', 'dnn_skip_ocl', 'dnn_skip_ocl_fp16', 'dnn_skip_onnx_conformance', 'dnn_skip_parser'
Note: Google Test filter = Layer_Einsum_Test.Accuracy_01D*
[==========] Running 13 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 13 tests from Layer_Einsum_Test
[ RUN      ] Layer_Einsum_Test.Accuracy_01D/0, where GetParam() = ({}, {}, ",->")
[       OK ] Layer_Einsum_Test.Accuracy_01D/0 (1 ms)
[ RUN      ] Layer_Einsum_Test.Accuracy_01D/1, where GetParam() = ({ 1 }, {}, "i,->i")

Program received signal SIGSEGV, Segmentation fault.
0xb5b745a6 in cv::Mat::total (this=0x4eb628) at /home/ubuntu/Projects/opencv/modules/core/src/matrix.cpp:602
602             p *= size[i];
(gdb) bt
#0  0xb5b745a6 in cv::Mat::total (this=0x4eb628) at /home/ubuntu/Projects/opencv/modules/core/src/matrix.cpp:602
#1  0xb5b74554 in cv::Mat::empty (this=0x4eb628) at /home/ubuntu/Projects/opencv/modules/core/src/matrix.cpp:593
#2  0xb6b3fd84 in cv::dnn::LayerEinsumImpl::forward (this=0x535f2c, inputs_arr=..., outputs_arr=..., internals_arr=...) at /home/ubuntu/Projects/opencv/modules/dnn/src/layers/einsum_layer.cpp:544
#3  0x000ce834 in opencv_test::runLayer (layer=..., inpBlobs=std::vector of length 2, capacity 2 = {...}, outBlobs=std::vector of length 0, capacity 0) at /home/ubuntu/Projects/opencv/modules/dnn/test/test_common.cpp:36
#4  0x001728f6 in opencv_test::(anonymous namespace)::Layer_Einsum_Test_Accuracy_01D_Test::Body (this=0x4f9580) at /home/ubuntu/Projects/opencv/modules/dnn/test/test_layers_1d.cpp:1591
#5  0x001721f0 in opencv_test::(anonymous namespace)::Layer_Einsum_Test_Accuracy_01D_Test::TestBody (this=0x4f9580) at /home/ubuntu/Projects/opencv/modules/dnn/test/test_layers_1d.cpp:1567
#6  0x002a6ae0 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> (object=0x4f9580, method=&virtual testing::Test::TestBody(), location=0x31c088 "the test body") at /home/ubuntu/Projects/opencv/modules/ts/src/ts_gtest.cpp:3919
#7  0x002a32e4 in testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> (object=0x4f9580, method=&virtual testing::Test::TestBody(), location=0x31c088 "the test body") at /home/ubuntu/Projects/opencv/modules/ts/src/ts_gtest.cpp:3955
#8  0x00292b06 in testing::Test::Run (this=0x4f9580) at /home/ubuntu/Projects/opencv/modules/ts/src/ts_gtest.cpp:3994
#9  0x0029313e in testing::TestInfo::Run (this=0x4a2098) at /home/ubuntu/Projects/opencv/modules/ts/src/ts_gtest.cpp:4169
#10 0x002935f2 in testing::TestCase::Run (this=0x4a1ff8) at /home/ubuntu/Projects/opencv/modules/ts/src/ts_gtest.cpp:4287
#11 0x0029ae08 in testing::internal::UnitTestImpl::RunAllTests (this=0x3d0e20) at /home/ubuntu/Projects/opencv/modules/ts/src/ts_gtest.cpp:6662
#12 0x002a72b4 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x3d0e20, 
    method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x29ac05 <testing::internal::UnitTestImpl::RunAllTests()>, location=0x31c9fc "auxiliary test code (environments or event listeners)")
    at /home/ubuntu/Projects/opencv/modules/ts/src/ts_gtest.cpp:3919
#13 0x002a3b9c in testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x3d0e20, 
    method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x29ac05 <testing::internal::UnitTestImpl::RunAllTests()>, location=0x31c9fc "auxiliary test code (environments or event listeners)")
    at /home/ubuntu/Projects/opencv/modules/ts/src/ts_gtest.cpp:3955
#14 0x00299f16 in testing::UnitTest::Run (this=0x3b8d2c <testing::UnitTest::GetInstance()::instance>) at /home/ubuntu/Projects/opencv/modules/ts/src/ts_gtest.cpp:6271
#15 0x0019ea92 in RUN_ALL_TESTS () at /home/ubuntu/Projects/opencv/modules/ts/include/opencv2/ts/ts_gtest.h:22240
#16 0x0019ec14 in main (argc=1, argv=0xbefff5c4) at /home/ubuntu/Projects/opencv/modules/dnn/test/test_main.cpp:7
(gdb) Quit

Steps to reproduce

bin/opencv_test_dnn --gtest_filter=Layer_Einsum_Test.Accuracy_01D*

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions