Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1910121
Summary: | Illegal instruction in libopencv_gapi.so.4.3 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Selwyn Quan <selwynq> |
Component: | opencv | Assignee: | Nicolas Chauvet (kwizart) <kwizart> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 33 | CC: | 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
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 (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] > FEDORA-2020-3fbc89e507 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-3fbc89e507 FEDORA-2020-430178b761 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-430178b761 (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. 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. 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. 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. 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? 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. (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 ? (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. OK , Selwyn it is possible test https://koji.fedoraproject.org/koji/taskinfo?taskID=58968273 ? Thank you 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? OK found the rpms to test. Yes this version does indeed fix the problems for me. opencv-4.3.0-10.fc33.x86_64 FEDORA-2021-004c43da38 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-004c43da38 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. 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. |