Bug 10815 - lib64opencv compiled with unsupported sse3 instructions
Summary: lib64opencv compiled with unsupported sse3 instructions
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL: http://www.mageialinux-online.org/for...
Whiteboard: has_procedure advisory MGA4-32-OK mga...
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2013-07-22 16:00 CEST by dominique Chabanet
Modified: 2015-01-21 18:15 CET (History)
7 users (show)

See Also:
Source RPM: opencv
CVE:
Status comment:


Attachments

Description dominique Chabanet 2013-07-22 16:00:39 CEST
Description of problem: digikam no start with "$ digikam
Instruction non permise"


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


How reproducible:
every time on Single core AMD Athlon 64 3200+

Steps to Reproduce:
1.
2.
3.


Reproducible: 

Steps to Reproduce:
Adrien D 2013-07-22 16:18:43 CEST

CC: (none) => adrien_d

Comment 1 Adrien D 2013-07-22 16:21:33 CEST
I would add the result of the debug output:

echo run | gdb digikam
GNU gdb (GDB) 7.5.1-7.mga3 (Mageia release 3)
Copyright (C) 2012 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-mageia-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/digikam...Reading symbols from /usr/bin/digikam...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Missing separate debuginfos, use: debuginfo-install digikam-3.1.0-2.mga3.x86_64
(gdb) Starting program: /usr/bin/digikam
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0x00007fffeeb19260 in cv::initInterTab2D(int, bool) ()
from /lib64/libopencv_imgproc.so.2.4
(gdb) quit
A debugging session is active.

Inferior 1 [process 5037] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

More information in french on MLO forums  :http://www.mageialinux-online.org/forum/topic-15933-2+impossible-de-lancer-digikam.php
Comment 2 Manuel Hiebel 2013-07-22 20:22:21 CEST
as gdb said it you need to install the debug package
"Missing separate debuginfos, use: debuginfo-install digikam-3.1.0-2.mga3.x86_64"
(I guess you need to enable the debug repository but not sure)
Comment 3 dominique Chabanet 2013-07-23 14:58:16 CEST
debuginfo-install digikam-3.1.0-2.mga3.x86_64
Pas de paquetage nommé digikam-debuginfo
Something went wrong, make sure your Debug media are configured properly

que faire?
Comment 4 dominique Chabanet 2013-07-23 18:37:22 CEST
# gdb digikam
GNU gdb (GDB) 7.5.1-7.mga3 (Mageia release 3)
Copyright (C) 2012 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-mageia-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/digikam...Reading symbols from /usr/lib/debug/usr/bin/digikam.debug...done.
done.
(gdb) r
Starting program: /usr/bin/digikam 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0x00007fffeeb19260 in cv::initInterTab2D(int, bool) ()
   from /lib64/libopencv_imgproc.so.2.4
Sylvain ZUCCA 2013-07-24 11:01:10 CEST

CC: (none) => sylvainsjc

Comment 5 barry marchant 2014-04-07 01:51:59 CEST
I have same problem with digikam. Mine is a new install with all updates.
version release number is lib64opencv_imgproc2 2.4.6.1-2.mga4
Reproduc1ble every time as follows:-

As user I get....

[barry@TheBox ~]$ digikam
Illegal instruction

Then as root and gdb I get ....

[root@TheBox barry]$ gdb /usr/bin/digikam
GNU gdb (GDB) 7.6-6.mga4 (Mageia release 4)
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 "x86_64-mageia-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/digikam...Reading symbols from /usr/bin/digikam...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Missing separate debuginfos, use: debuginfo-install digikam-3.5.0-3.mga4.x86_64
(
gdb) run
Starting program: /usr/bin/digikam
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0x00007fffee7ad562 in cv::initInterTab2D(int, bool) () from /lib64/libopencv_imgproc.so.2.4

(gdb) where
#0  0x00007fffee7ad562 in cv::initInterTab2D(int, bool) () from /lib64/libopencv_imgproc.so.2.4
#1  0x00007fffee763bf2 in _GLOBAL__sub_I_imgwarp.cpp () from /lib64/libopencv_imgproc.so.2.4
#2  0x00007ffff7decaba in call_init.part.0 () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7decba3 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7ddf1ea in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#5  0x0000000000000001 in ?? ()
#6  0x00007fffffffe37d in ?? ()
#7  0x0000000000000000 in ?? ()
(gdb)

CC: (none) => barry-m

Rémi Verschelde 2014-06-21 16:27:24 CEST

CC: (none) => remi
Summary: compilation lib64opencv avec des instructions sse3 non supportées => lib64opencv compiled with unsupported sse3 instructions

Christiaan Welvaart 2014-11-27 15:27:31 CET

CC: (none) => cjw
Status: NEW => ASSIGNED
Version: 3 => Cauldron
Assignee: bugsquad => cjw
Whiteboard: (none) => MGA4TOO

Comment 6 Christiaan Welvaart 2014-11-27 16:08:35 CET
This problem should be fixed in the opencv packages with version 2.4.6.1-2.1.mga4 in mga4 updates_testing. Please test if this is the case. My 2 x86-64 machines with linux installed do support sse3 ("pni") so I don't think I can test here.

The same for cauldron with opencv-2.4.9-8.mga5.
Comment 7 David Walser 2014-11-30 17:27:46 CET
Please don't forget to assign this to the QA team :o)

Severity: critical => normal
Hardware: x86_64 => All
Version: Cauldron => 4
Source RPM: lib64opencv => opencv
Whiteboard: MGA4TOO => (none)

Comment 8 David Walser 2014-12-03 04:50:47 CET
If someone could confirm that the updated opencv packages in core/updates_testing fix this issue, that would helpful.  Thanks.  Also include which architecture you tested, if you wouldn't mind.
Comment 9 Christiaan Welvaart 2014-12-03 09:56:38 CET
This problem only exists for x86-64; in the i568 build SSE* was already disabled.

Hardware: All => x86_64

Comment 10 David Walser 2014-12-04 21:47:10 CET
Christiaan, I think you can go ahead and assign to QA, and just note that it needs testing on an x86_64 machine that doesn't support SSE3.  The original issue reporters haven't commented in a long time.
Comment 11 Christiaan Welvaart 2014-12-06 14:58:32 CET
Updated packages are ready for testing:

MGA4
Source RPM:
opencv-2.4.6.1-2.1.mga4.src.rpm

Binary RPMS:
libopencv_calib3d2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_contrib2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_core2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_features2d2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_flann2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_gpu2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_highgui2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_imgproc2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_legacy2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_ml2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_nonfree2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_objdetect2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_photo2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_stitching2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_superres2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_ts2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_video2-2.4.6.1-2.1.mga4.i586.rpm
libopencv_videostab2-2.4.6.1-2.1.mga4.i586.rpm
opencv-devel-2.4.6.1-2.1.mga4.i586.rpm
opencv-doc-2.4.6.1-2.1.mga4.noarch.rpm
opencv-samples-2.4.6.1-2.1.mga4.i586.rpm
python-opencv-2.4.6.1-2.1.mga4.i586.rpm

lib64opencv_calib3d2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_contrib2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_core2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_features2d2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_flann2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_gpu2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_highgui2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_imgproc2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_legacy2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_ml2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_nonfree2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_objdetect2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_photo2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_stitching2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_superres2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_ts2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_video2-2.4.6.1-2.1.mga4.x86_64.rpm
lib64opencv_videostab2-2.4.6.1-2.1.mga4.x86_64.rpm
opencv-devel-2.4.6.1-2.1.mga4.x86_64.rpm
opencv-doc-2.4.6.1-2.1.mga4.noarch.rpm
opencv-samples-2.4.6.1-2.1.mga4.x86_64.rpm
python-opencv-2.4.6.1-2.1.mga4.x86_64.rpm


Proposed bugfix advisory:

The x86-64 opencv packages in Mageia 4 made use of SSE3 instructions which are not available in all x86-64 processors. The updated packages were configured not to make use of SSE3.

Assignee: cjw => qa-bugs

Comment 12 Christiaan Welvaart 2014-12-06 15:10:35 CET
Possible test procedure:

1. install opencv-samples opencv-devel gcc-c++
2. as regular user, in some temp dir like /tmp, build the sample program :
g++ -lopencv_core -lopencv_imgproc -lopencv_highgui -o edge /usr/share/OpenCV/samples/cpp/edge.cpp
3. run the sample program:
./edge /usr/share/OpenCV/samples/cpp/fruits.jpg

This should display a window containing the image (fruits.jpg which is default for this sample) with edges detected (hard lines).

If someone happens to have a x86-64 machine that does not support SSE3, running digikam would indicate that the bug has really been fixed. AFAIK such a machine would have an old AMD athlon64 CPU. SSE3 support can be checked in /proc/cpuflags - the flag is called "pni".
Christiaan Welvaart 2014-12-06 15:11:32 CET

Whiteboard: (none) => has_procedure

Comment 13 claire robinson 2014-12-09 14:59:48 CET
To check your processor..
]
$ grep pni /proc/cpuinfo
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 lm constant_tsc **pni** ssse3 lahf_lm

**'s added here for clarity.
Comment 14 Herman Viaene 2014-12-10 15:57:44 CET
MGA4-64 on HP Probook 6555b
Check processor
$ grep pni /proc/cpuinfo
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 extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate npt lbrv svm_lock nrip_save

Followed test as described in Comment 12: works OK

Not OK-ing since my machine supports SSE3 according to the processor info above.

CC: (none) => herman.viaene

Comment 15 Herman Viaene 2014-12-30 14:33:02 CET
MGA-32 on Acer D620 Xfce
Check processor
]# grep pni /proc/cpuinfo
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow extd_apicid pni cx16 lahf_lm svm extapic cr8_legacy 3dnowprefetch lbrv
Followed test as described in Comment 12: works OK

Not OK-ing since my machine supports SSE3 according to the processor info above.
Comment 16 Christiaan Welvaart 2015-01-17 20:03:20 CET
Can we OK this update? I would prefer to have it tested on old hardware but it looks like this isn't going to happen. Apparently qemu only changes the CPU info flags, not the emulated instruction set. I did not manage to have a test program fail due to using SSE3 instructions while qemu was configured to emulate a x86-64 CPU without SSE3 support.

Whiteboard: has_procedure => has_procedure MGA4-32-OK

Comment 17 claire robinson 2015-01-19 23:06:09 CET
I have a machine which should be suited for this. I'll need to install mga4 on it (been used for ISOs) will have a look tomorrow.
Comment 18 claire robinson 2015-01-20 17:21:50 CET
Checking the athlon I have, it does support sse3 (pni) so it's no benefit to testing. I'll validate this one from previous tests.
Comment 19 claire robinson 2015-01-20 17:26:48 CET
Validating. Advisory uploaded.

Please push to 4 updates

Thanks

Whiteboard: has_procedure MGA4-32-OK => has_procedure advisory MGA4-32-OK mga4-64-ok
Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 20 Mageia Robot 2015-01-21 18:15:52 CET
An update for this issue has been pushed to Mageia Updates repository.

http://advisories.mageia.org/MGAA-2015-0005.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.