Bug 1910121

Summary: Illegal instruction in libopencv_gapi.so.4.3
Product: [Fedora] Fedora Reporter: Selwyn Quan <selwynq>
Component: opencvAssignee: Nicolas Chauvet (kwizart) <kwizart>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: andrew, hhorak, jkucera, jmlich83, jridky, karlthered, kwizart, rakesh.pandit, sergio, viktor.vix.jancik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: opencv-4.3.0-10.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-14 01:39:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Selwyn Quan 2020-12-22 18:15:05 UTC
Description of problem:

When I run gmic on my very old AMD system I get the following message:

Illegal instruction (core dumped)

dmesg gives:

traps: gmic[58789] trap invalid opcode ip:7fe33ef11e22 sp:7fffd0097120 error:0 in libopencv_gapi.so.4.3.0[7fe33eeef000+16f000]

Believe this may be related to opencv compiled with AVX2 extensions but as a non-tech person, may be completely wrong (see additional info below)? This did not happen with my previous Fedora 32 installation.


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

gmic-2.9.4-1.fc33.x86_64

opencv-4.3.0-8.fc33.x86_64



How reproducible:

Always

Steps to Reproduce:
1. Run gmic from command line
2. 
3.

Actual results:
Illegal instruction (core dumped)

Expected results:
gmic should run without error

Additional info:

cat /proc/cpuinfo

processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 16
model		: 4
model name	: AMD Phenom(tm) II X3 710 Processor
stepping	: 2
microcode	: 0x10000db
cpu MHz		: 800.000
cache size	: 512 KB
physical id	: 0
siblings	: 3
core id		: 0
cpu cores	: 3
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 5
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs		: tlb_mmatch fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2
bogomips	: 5223.84
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 16
model		: 4
model name	: AMD Phenom(tm) II X3 710 Processor
stepping	: 2
microcode	: 0x10000db
cpu MHz		: 800.000
cache size	: 512 KB
physical id	: 0
siblings	: 3
core id		: 1
cpu cores	: 3
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 5
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs		: tlb_mmatch fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2
bogomips	: 5223.84
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor	: 2
vendor_id	: AuthenticAMD
cpu family	: 16
model		: 4
model name	: AMD Phenom(tm) II X3 710 Processor
stepping	: 2
microcode	: 0x10000db
cpu MHz		: 800.000
cache size	: 512 KB
physical id	: 0
siblings	: 3
core id		: 2
cpu cores	: 3
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 5
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs		: tlb_mmatch fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2
bogomips	: 5223.84
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate


opencv_version -v

General configuration for OpenCV 4.3.0 =====================================
  Version control:               unknown

  Extra modules:
    Location (extra):            /builddir/build/BUILD/opencv-4.3.0/opencv_contrib-4.3.0/modules
    Version control (extra):     unknown

  Platform:
    Timestamp:                   2020-07-24T00:00:00Z
    Host:                        Linux 5.6.15-300.fc32.x86_64 x86_64
    CMake:                       3.18.1
    CMake generator:             Unix Makefiles
    CMake build tool:            /usr/bin/gmake
    Configuration:               ReleaseWithDebInfo

  CPU/HW features:
    Baseline:                    SSE SSE2
      requested:                 SSE2
    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
      SSE4_1 (17 files):         + SSE3 SSSE3 SSE4_1
      SSE4_2 (2 files):          + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2
      FP16 (1 files):            + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
      AVX (5 files):             + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2 AVX
      AVX2 (30 files):           + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
      AVX512_SKX (6 files):      + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX

  C/C++:
    Built as dynamic libs?:      YES
    C++ standard:                11
    C++ Compiler:                /usr/bin/g++  (ver 10.2.1)
    C++ flags (Release):         -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,--as-needed   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -DNDEBUG  -DNDEBUG
    C++ flags (Debug):           -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,--as-needed   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -g  -DDEBUG -D_DEBUG
    C Compiler:                  /usr/bin/gcc
    C flags (Release):           -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,--as-needed   -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -fvisibility=hidden -fopenmp -DNDEBUG  -DNDEBUG
    C flags (Debug):             -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,--as-needed   -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -fvisibility=hidden -fopenmp -g  -DDEBUG -D_DEBUG
    Linker flags (Release):      -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -Wl,--gc-sections -Wl,--as-needed  
    Linker flags (Debug):        -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -Wl,--gc-sections -Wl,--as-needed  
    ccache:                      NO
    Precompiled headers:         NO
    Extra dependencies:          dl m pthread rt /lib64/libOpenGL.so /lib64/libGLX.so /lib64/libGLU.so /lib64/libClpSolver.so /lib64/libClp.so /lib64/libCoinUtils.so
    3rdparty dependencies:

  OpenCV modules:
    To be built:                 alphamat aruco bgsegm bioinspired calib3d ccalib core cvv datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc intensity_transform java line_descriptor ml objdetect optflow phase_unwrapping photo plot python3 quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab viz ximgproc xobjdetect xphoto
    Disabled:                    world
    Disabled by dependency:      sfm
    Unavailable:                 cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev js matlab ovis python2
    Applications:                tests perf_tests examples apps
    Documentation:               javadoc
    Non-free algorithms:         NO

  GUI: 
    QT:                          YES (ver 5.14.2)
      QT OpenGL support:         YES (Qt5::OpenGL 5.14.2)
    GTK+:                        NO
    OpenGL support:              YES (/lib64/libOpenGL.so /lib64/libGLX.so /lib64/libGLU.so)
    VTK support:                 YES (ver 8.2.0)

  Media I/O: 
    ZLib:                        /lib64/libz.so (ver 1.2.11)
    JPEG:                        /lib64/libjpeg.so (ver 62)
    WEBP:                        /lib64/libwebp.so (ver encoder: 0x020f)
    PNG:                         /lib64/libpng.so (ver 1.6.37)
    TIFF:                        /lib64/libtiff.so (ver 42 / 4.1.0)
    JPEG 2000:                   /lib64/libjasper.so (ver 2.0.16)
    OpenEXR:                     /usr/lib64/libImath.so /usr/lib64/libIlmImf.so /usr/lib64/libIex.so /usr/lib64/libHalf.so /usr/lib64/libIlmThread.so (ver 2_3)
    GDAL:                        YES (/lib64/libgdal.so)
    GDCM:                        YES (3.0.7)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      YES (2.2.6)
    GStreamer:                   YES (1.17.2)
    v4l/v4l2:                    YES (linux/videodev2.h)
    Intel Media SDK:             NO

  Parallel framework:            TBB (ver 2020.3 interface 11103)

  Other third-party libraries:
    VA:                          YES
    Lapack:                      YES (/lib64/libopenblas.so)
    Eigen:                       YES (ver 3.3.7)
    Custom HAL:                  NO
    Protobuf:                    /lib64/libprotobuf.so (3.12.3)

  Vulkan:                        YES
    Include path:                /usr/include/vulkan
    Link libraries:              Dynamic load

  OpenCL:                        YES (no extra features)
    Include path:                /usr/include/CL
    Link libraries:              Dynamic load

  Python 3:
    Interpreter:                 /usr/bin/python3 (ver 3.9)
    Libraries:                   /lib64/libpython3.9.so (ver 3.9.0b5)
    numpy:                       /usr/lib64/python3.9/site-packages/numpy/core/include (ver 1.19.1)
    install path:                /usr/lib64/python3.9/site-packages

  Python (for build):            /usr/bin/python3
    Pylint:                      /usr/bin/pylint (ver: 3.9.0, checks: 174)
    Flake8:                      /usr/bin/flake8 (ver: 3.8.3)

  Java:                          
    ant:                         /bin/ant (ver 1.10.8)
    JNI:                         /usr/lib/jvm/java/include /usr/lib/jvm/java/include/linux /usr/lib/jvm/java/include
    Java wrappers:               YES
    Java tests:                  YES

  Install to:                    /usr
-----------------------------------------------------------------


gdb gmic

bt 

  >0x7ffff7535e22 <_sub_I_65535_0.0+658>   vpxor  %xmm0,%xmm0,%xmm0                                   │
│   0x7ffff7535e26 <_sub_I_65535_0.0+662>   lea    0x1c029b(%rip),%rdi        # 0x7ffff76f60c8         │
│   0x7ffff7535e2d <_sub_I_65535_0.0+669>   movq   $0x0,0x1c0288(%rip)        # 0x7ffff76f60c0         │
│   0x7ffff7535e38 <_sub_I_65535_0.0+680>   vmovdqa %xmm0,0x1c0260(%rip)        # 0x7ffff76f60a0       │
│   0x7ffff7535e40 <_sub_I_65535_0.0+688>   vmovdqa %xmm0,0x1c0268(%rip)        # 0x7ffff76f60b0       │
│   0x7ffff7535e48 <_sub_I_65535_0.0+696>   call   0x7ffff7515e10 <_ZNSt18condition_variableC1Ev@plt>  │
│   0x7ffff7535e4d <_sub_I_65535_0.0+701>   lea    0x1c02a4(%rip),%rdi        # 0x7ffff76f60f8         │
│   0x7ffff7535e54 <_sub_I_65535_0.0+708>   movq   $0x0,0x1c0299(%rip)        # 0x7ffff76f60f8         │
│   0x7ffff7535e5f <_sub_I_65535_0.0+719>   movq   $0x0,0x1c0296(%rip)        # 0x7ffff76f6100         │
│   0x7ffff7535e6a <_sub_I_65535_0.0+730>   movq   $0x0,0x1c0293(%rip)        # 0x7ffff76f6108         │
│   0x7ffff7535e75 <_sub_I_65535_0.0+741>   movq   $0x0,0x1c0290(%rip)        # 0x7ffff76f6110         │
│   0x7ffff7535e80 <_sub_I_65535_0.0+752>   movq   $0x0,0x1c028d(%rip)        # 0x7ffff76f6118         │
│   0x7ffff7535e8b <_sub_I_65535_0.0+763>   movq   $0x0,0x1c028a(%rip)        # 0x7ffff76f6120         │
│   0x7ffff7535e96 <_sub_I_65535_0.0+774>   movq   $0x0,0x1c0287(%rip)        # 0x7ffff76f6128         │
└──────────────────────────────────────────────────────────────────────────────────────────────────────┘
multi-thre Thread 0x7fffdffc34 In: _sub_I_65535_0.0                            L??   PC: 0x7ffff7535e22 
#0  0x00007ffff7535e22 in _sub_I_65535_0.0 () from /lib64/libopencv_gapi.so.4.3
#1  0x00007ffff7fe18ee in call_init.part () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7fe19d8 in _dl_init () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7fd20ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#4  0x0000000000000001 in ?? ()
#5  0x00007fffffffe14b in ?? ()
#6  0x0000000000000000 in ?? ()

Comment 1 Sergio Basto 2020-12-24 14:58:48 UTC
I'm fixing [1] a opencv FTBFS on F32 and F33 because libjasper has recently changed `jas_matrix_get` from a macro to an inline function
(389951d071 in https://github.com/jasper-software/jasper), causing the build to fail.


I ask if it can be related ? 


[1]
/builddir/build/BUILD/opencv-4.2.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp: In member function 'bool cv::Jpeg2KDecoder::readComponent8u(uchar*, void*, int, int, int, int, int)':
/builddir/build/BUILD/opencv-4.2.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp:381:48: error: lvalue required as unary '&' operand
  381 |         jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 );
      |                                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/opencv-4.2.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp: In member function 'bool cv::Jpeg2KDecoder::readComponent16u(short unsigned int*, void*, int, int, int, int, int)':
/builddir/build/BUILD/opencv-4.2.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp:447:48: error: lvalue required as unary '&' operand
  447 |         jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 );
      |                                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/build.make:203: modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/grfmt_jpeg2000.cpp.o] Error 1

Comment 2 Selwyn Quan 2020-12-24 20:06:45 UTC
(In reply to Sergio Basto from comment #1)
> I'm fixing [1] a opencv FTBFS on F32 and F33 because libjasper has recently
> changed `jas_matrix_get` from a macro to an inline function
> (389951d071 in https://github.com/jasper-software/jasper), causing the build
> to fail.
> 
> 
> I ask if it can be related ? 
> 
> 
> [1]
> /builddir/build/BUILD/opencv-4.2.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp:
> In member function 'bool cv::Jpeg2KDecoder::readComponent8u(uchar*, void*,
> int, int, int, int, int)':
> /builddir/build/BUILD/opencv-4.2.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp:
> 381:48: error: lvalue required as unary '&' operand
>   381 |         jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep,
> 0 );
>       |                                 
> ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
> /builddir/build/BUILD/opencv-4.2.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp:
> In member function 'bool cv::Jpeg2KDecoder::readComponent16u(short unsigned
> int*, void*, int, int, int, int, int)':
> /builddir/build/BUILD/opencv-4.2.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp:
> 447:48: error: lvalue required as unary '&' operand
>   447 |         jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep,
> 0 );
>       |                                 
> ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
> make[2]: ***
> [modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/build.make:203:
> modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/grfmt_jpeg2000.cpp.o]
> Error 1

Thanks - just updated with this version of OpenCV and error remains:

> rpm -q opencv
> opencv-4.3.0-9.fc33.x86_64
> gmic
> Illegal instruction (core dumped)
> dmesg |tail -1
> traps: gmic[10656] trap invalid opcode ip:7f2845d0cdd2 sp:7fffcf821710 error:0 in libopencv_gapi.so.4.3.0[7f2845cea000+16f000]

>

Comment 3 Fedora Update System 2020-12-26 22:08:22 UTC
FEDORA-2020-3fbc89e507 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-3fbc89e507

Comment 4 Fedora Update System 2020-12-26 22:09:32 UTC
FEDORA-2020-430178b761 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-430178b761

Comment 5 Sergio Basto 2020-12-27 00:27:04 UTC
(In reply to Selwyn Quan from comment #0)
> Description of problem:
> 
> When I run gmic on my very old AMD system I get the following message:
> 
> Illegal instruction (core dumped)
> 
> dmesg gives:
> 
> traps: gmic[58789] trap invalid opcode ip:7fe33ef11e22 sp:7fffd0097120
> error:0 in libopencv_gapi.so.4.3.0[7fe33eeef000+16f000]
> 
> Believe this may be related to opencv compiled with AVX2 extensions but as a
> non-tech person, may be completely wrong (see additional info below)? This
> did not happen with my previous Fedora 32 installation.


Hi, as sanity check rebuild gmic against opencv-4.3.0-9.fc33 , fix anything ? I will try reproduce the error in a vm , since I use F32 yet  

Thank you for the report.

Comment 6 Fedora Update System 2020-12-27 01:12:01 UTC
FEDORA-2020-3fbc89e507 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-3fbc89e507`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-3fbc89e507

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2020-12-27 01:53:55 UTC
FEDORA-2020-430178b761 has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-430178b761`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-430178b761

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2020-12-31 02:02:44 UTC
FEDORA-2020-3fbc89e507 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Selwyn Quan 2020-12-31 03:30:59 UTC
Recompiled gmic against opencv-4.3.0-9.fc33.x86_64 and am still getting the same error message.

Taking a look at the build log of opencv-4.3.0-9.fc33.x86_64 seems that, as the original bug report suggested, opencv is getting built with AVX2 extensions, even though not explicitly requested in the cmake. This causes it to segfault on a processor without AVX2 extensions.


Although not the same version of opencv, there seems to be a bugreport describing something very similar here:

https://github.com/opencv/opencv/issues/19020

So maybe a problem with opencv and its cmake configuration?

Comment 10 Fedora Update System 2021-01-04 01:17:51 UTC
FEDORA-2020-430178b761 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Sergio Basto 2021-01-05 10:45:40 UTC
(In reply to Selwyn Quan from comment #9)

> Although not the same version of opencv, there seems to be a bugreport
> describing something very similar here:
> 
> https://github.com/opencv/opencv/issues/19020

Ii is suggested there , that can be lto , kwizart may I build opencv with lto disabled ?

Comment 12 Nicolas Chauvet (kwizart) 2021-01-05 11:43:45 UTC
(In reply to Sergio Basto from comment #11)
..
> Ii is suggested there , that can be lto , kwizart may I build opencv with
> lto disabled ?

Please only submit a scratch build for Selwyn to test. There is no need to push a new build without lto if it doesn't fix any issue.

Comment 13 Sergio Basto 2021-01-05 16:48:44 UTC
OK , Selwyn it is possible test https://koji.fedoraproject.org/koji/taskinfo?taskID=58968273 ? 

Thank you

Comment 14 Selwyn Quan 2021-01-05 17:39:25 UTC
Thank you Sergio for checking with OpenCV upstream. Can certainly check a scratch build without lto. Sorry not too familiar with koji builds, but the link you provide is to a src build. Can I expect an rpm at some point to test?

Comment 15 Selwyn Quan 2021-01-05 18:46:05 UTC
OK found the rpms to test. 

Yes this version does indeed fix the problems for me.

opencv-4.3.0-10.fc33.x86_64

Comment 16 Fedora Update System 2021-01-11 22:20:02 UTC
FEDORA-2021-004c43da38 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-004c43da38

Comment 17 Fedora Update System 2021-01-12 01:26:49 UTC
FEDORA-2021-004c43da38 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-004c43da38`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-004c43da38

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 18 Fedora Update System 2021-01-14 01:39:26 UTC
FEDORA-2021-004c43da38 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.