Bug 898 - [Anolis7.9-iso][rhck][x86_64/aarch_64]安装opencv软件包后执行opencv_traincascade、opencv_performance、opencv_haartraining二进制发生core dump
Summary: [Anolis7.9-iso][rhck][x86_64/aarch_64]安装opencv软件包后执行opencv_traincascade、openc...
Status: NEW
Alias: None
Product: Anolis OS 7
Classification: Anolis OS
Component: Others (show other bugs) Others
Version: 7.9
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: layne-yang
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-24 15:32 UTC by yunmeng365524
Modified: 2022-07-06 13:20 UTC (History)
3 users (show)

See Also:


Attachments
centos7.9 test pic (3.94 MB, image/jpeg)
2022-04-29 17:35 UTC, 刘小平
Details
centos7.9 test pic (1.53 MB, image/jpeg)
2022-05-05 17:47 UTC, 刘小平
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yunmeng365524 2022-04-24 15:32:14 UTC
Description of problem:
执行如下命令会产生coredump
/usr/bin/opencv_traincascade --help
/usr/bin/opencv_performance --help
/usr/bin/opencv_haartraining --help

Version-Release number of selected component (if applicable):

uname -r
4.18.0-193.28.1.an7.aarch64

cat /etc/anolis-release
Anolis OS release 7.9

cat /etc/os-release
NAME="Anolis OS"
VERSION="7.9"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="7.9"
PRETTY_NAME="Anolis OS 7.9"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugs.openanolis.cn/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

问题发生概率:必现

How reproducible:
1、安装opencv软件包
2、执行如下命令
/usr/bin/opencv_traincascade --help
/usr/bin/opencv_performance --help
/usr/bin/opencv_haartraining --help

Steps to Reproduce:
# gdb /usr/bin/opencv_traincascade -c core-opencv_traincas-34575
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.an7
Copyright (C) 2013 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 "aarch64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/opencv_traincascade...Reading symbols from /usr/bin/opencv_traincascade...(no debugging symbols found)...done.
(no debugging symbols found)...done.

warning: core file may not match specified executable file.
[New LWP 34575]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/bin/opencv_traincascade --help'.
Program terminated with signal 6, Aborted.
#0  0x0000ffff915d5238 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install opencv-2.4.5-3.an7.aarch64
(gdb) bt
#0  0x0000ffff915d5238 in raise () at /lib64/libc.so.6
#1  0x0000ffff915d68b0 in abort () at /lib64/libc.so.6
#2  0x0000ffff918916ec in __gnu_cxx::__verbose_terminate_handler() () at /lib64/libstdc++.so.6
#3  0x0000ffff9188f540 in  () at /lib64/libstdc++.so.6
#4  0x0000ffff9188f564 in  () at /lib64/libstdc++.so.6
#5  0x0000ffff9188f800 in __cxa_rethrow () at /lib64/libstdc++.so.6
#6  0x0000ffff918e29c0 in std::__throw_logic_error(char const*) () at /lib64/libstdc++.so.6
#7  0x0000ffff918ee89c in char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) () at /lib64/libstdc++.so.6
#8  0x0000ffff918eeca0 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) () at /lib64/libstdc++.so.6
#9  0x000000000040b6e8 in main ()
(gdb) quit
# gdb /usr/bin/opencv_performance -c core-opencv_performa-34790
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.an7
Copyright (C) 2013 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 "aarch64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/opencv_performance...Reading symbols from /usr/bin/opencv_performance...(no debugging symbols found)...done.
(no debugging symbols found)...done.

warning: core file may not match specified executable file.
[New LWP 34790]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/bin/opencv_performance --help'.
Program terminated with signal 6, Aborted.
#0  0x0000ffffa0195238 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install opencv-2.4.5-3.an7.aarch64
(gdb) bt
#0  0x0000ffffa0195238 in raise () at /lib64/libc.so.6
#1  0x0000ffffa01968b0 in abort () at /lib64/libc.so.6
#2  0x0000ffffa04516ec in __gnu_cxx::__verbose_terminate_handler() () at /lib64/libstdc++.so.6
#3  0x0000ffffa044f540 in  () at /lib64/libstdc++.so.6
#4  0x0000ffffa044f564 in  () at /lib64/libstdc++.so.6
#5  0x0000ffffa044f800 in __cxa_rethrow () at /lib64/libstdc++.so.6
#6  0x0000ffffa0ecefc8 in cv::error(cv::Exception const&) () at /lib64/libopencv_core.so.2.4
#7  0x0000ffffa0a67c3c in cvLoadHaarClassifierCascade () at /lib64/libopencv_objdetect.so.2.4
#8  0x000000000040175c in main ()
(gdb) quit
# gdb /usr/bin/opencv_haartraining -c core-opencv_haartrai-34808
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.an7
Copyright (C) 2013 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 "aarch64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/opencv_haartraining...Reading symbols from /usr/bin/opencv_haartraining...(no debugging symbols found)...done.
(no debugging symbols found)...done.

warning: core file may not match specified executable file.
[New LWP 34808]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/bin/opencv_haartraining --help'.
Program terminated with signal 6, Aborted.
#0  0x0000ffffa52f5238 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install opencv-2.4.5-3.an7.aarch64
(gdb) bt
#0  0x0000ffffa52f5238 in raise () at /lib64/libc.so.6
#1  0x0000ffffa52f68b0 in abort () at /lib64/libc.so.6
#2  0x0000ffffa55b16ec in __gnu_cxx::__verbose_terminate_handler() () at /lib64/libstdc++.so.6
#3  0x0000ffffa55af540 in  () at /lib64/libstdc++.so.6
#4  0x0000ffffa55af564 in  () at /lib64/libstdc++.so.6
#5  0x0000ffffa55af800 in __cxa_rethrow () at /lib64/libstdc++.so.6
#6  0x0000ffffa602efc8 in cv::error(cv::Exception const&) () at /lib64/libopencv_core.so.2.4
#7  0x0000ffffa602f160 in cvError () at /lib64/libopencv_core.so.2.4
#8  0x000000000040b930 in cvCreateTreeCascadeClassifier(char const*, char const*, char const*, int, int, int, int, int, float, float, float, int, int, int, int, int, int, int, int, int, bool) ()
#9  0x0000000000404640 in main ()
(gdb) quit

Actual results:
产生coredump

Expected results:
不应该coredmp

Additional info:
软件包信息:
# yum info opencv
已加载插件:fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Loading mirror speeds from cached hostfile
已安装的软件包
名称    :opencv
架构    :aarch64
版本    :2.4.5
发布    :3.an7
大小    :25 M
源    :installed
来自源:os
简介    : Collection of algorithms for computer vision
网址    :http://opencv.org
协议    : BSD
描述    : OpenCV means Intel® Open Source Computer Vision Library. It is a collection of
         : C functions and a few C++ classes that implement some popular Image Processing
         : and Computer Vision algorithms.

x86 也有相同问题
Comment 1 刘小平 alibaba_cloud_group 2022-04-29 17:35:19 UTC
Created attachment 203 [details]
centos7.9 test pic

centos7.9 x86_64/aarch64存在相同问题 暂时降低优先级
Comment 2 刘小平 alibaba_cloud_group 2022-05-05 17:47:15 UTC
Created attachment 225 [details]
centos7.9 test pic

centos7.9 x86_64/aarch64存在相同问题 暂时降低优先级
Comment 3 pq12345 uniontech_group 2022-05-07 17:40:27 UTC
1. 没有/usr/bin/opencv_traincascade --help命令,--help被认为是一个指针,默认对一个空指针进行操作所以传入std::logic_error中报出了basic_string::_S_construct null not valid错误
2. 没有/usr/bin/opencv_performance --help命令, --help被认为是一个指针,传入cvLoadHaarClassifierCascade中后>没有获取到help指针因此出现Null pointer (Null path is passed)报错
3. 没有/usr/bin/opencv_haartraining --help命令,--help被认为是一个图像文件,传入cvCreateTreeCascadeClassifier中后被认为图像文件错误因此出现Unspecified error报错
Comment 4 pq12345 uniontech_group 2022-05-07 17:51:31 UTC
(In reply to pq12345 from comment #3)
> 1. 没有/usr/bin/opencv_traincascade
> --help命令,--help被认为是一个指针,默认对一个空指针进行操作所以传入std::logic_error中报出了basic_string::
> _S_construct null not valid错误
> 2. 没有/usr/bin/opencv_performance --help命令,
> --help被认为是一个指针,传入cvLoadHaarClassifierCascade中后>没有获取到help指针因此出现Null pointer
> (Null path is passed)报错
> 3. 没有/usr/bin/opencv_haartraining
> --help命令,--
> help被认为是一个图像文件,传入cvCreateTreeCascadeClassifier中后被认为图像文件错误因此出现Unspecified
> error报错
opencv_traincascade,opencv_performance,opencv_haartraining都没有--help参数请正确使用
Comment 5 pq12345 uniontech_group 2022-05-07 17:52:35 UTC
(In reply to pq12345 from comment #4)
> (In reply to pq12345 from comment #3)
> > 1. 没有/usr/bin/opencv_traincascade
> > --help命令,--help被认为是一个指针,默认对一个空指针进行操作所以传入std::logic_error中报出了basic_string::
> > _S_construct null not valid错误
> > 2. 没有/usr/bin/opencv_performance --help命令,
> > --help被认为是一个指针,传入cvLoadHaarClassifierCascade中后>没有获取到help指针因此出现Null pointer
> > (Null path is passed)报错
> > 3. 没有/usr/bin/opencv_haartraining
> > --help命令,--
> > help被认为是一个图像文件,传入cvCreateTreeCascadeClassifier中后被认为图像文件错误因此出现Unspecified
> > error报错
> opencv_traincascade,opencv_performance,opencv_haartraining都没有--help参数请正确使用