Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383965 - OpenCV 2.3.0: Illegal Instruction on AMD Phenom II
Summary: OpenCV 2.3.0: Illegal Instruction on AMD Phenom II
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-21 15:19 UTC by jannis
Modified: 2011-09-25 22:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info opencv (emerge-info,18.55 KB, text/plain)
2011-09-21 15:21 UTC, jannis
Details
part of /proc/cpuinfo (cpuinfo,1.09 KB, text/plain)
2011-09-21 15:23 UTC, jannis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jannis 2011-09-21 15:19:25 UTC
Using OpenCV 2.3.0 from portage tree:
LC_ALL=C opencv_stitching --output DSC_4340-4346-OpenCV.jpg DSC_4340.JPG DSC_4341.JPG DSC_4342.JPG DSC_4343.JPG DSC_4344.JPG DSC_4345.JPG DSC_4346.JPG
Finding features...
Ungültiger Maschinenbefehl (= "Illegal Instruction")

Reducing the CFLAGS to "-O0" does not help. Setting USE="-sse -sse2 -sse3 -ssse3" emerge -1av opencv "fixes" the problem. I still need to figure out which one exactly causes the failure but I don't have the time right now.

Last output of strace:
read(6, "", 4096)                       = 0
brk(0x19c1000)                          = 0x19c1000
brk(0x19c0000)                          = 0x19c0000
close(6)                                = 0
munmap(0x7f9410c6f000, 4096)            = 0
brk(0x19bf000)                          = 0x19bf000
mmap(NULL, 1802240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f93fd9e0000
--- {si_signo=SIGILL, si_code=ILL_ILLOPN, si_addr=0x7f94102c07b6} (Illegal instruction) ---
+++ killed by SIGILL +++


Could this be Gentoo or GCC-related or is this an upstream-bug?

Reproducible: Always
Comment 1 jannis 2011-09-21 15:21:49 UTC
Created attachment 287297 [details]
emerge --info opencv

Forgot this info in initial comment:

Kernel-log has these lines afterwards:
Sep 21 16:57:20 [kernel] [ 1882.690313] opencv_stitchin[27961] trap invalid opcode ip:7fd526c3c7b6 sp:7fff0c6be530 error:0 in libopencv_imgproc.so.2.3.0[7fd526b68000+1cc000]
Sep 21 16:57:35 [kernel] [ 1897.574356] opencv_stitchin[13037] trap invalid opcode ip:7f4e7a8327b6 sp:7fff600dc120 error:0 in libopencv_imgproc.so.2.3.0[7f4e7a75e000+1cc000]
Sep 21 17:06:06 [kernel] [ 2407.687372] opencv_stitchin[10576] trap invalid opcode ip:7fb565d5d7b6 sp:7fff7b5b6af0 error:0 in libopencv_imgproc.so.2.3.0[7fb565c89000+1cc000]
Sep 21 17:15:09 [kernel] [ 2950.238969] opencv_stitchin[7189] trap invalid opcode ip:7fc0e0be27b6 sp:7fff1e6fedd0 error:0 in libopencv_imgproc.so.2.3.0[7fc0e0b0e000+1cc000]
Comment 2 jannis 2011-09-21 15:23:10 UTC
Created attachment 287299 [details]
part of /proc/cpuinfo

part of /proc/cpuinfo
Comment 3 jannis 2011-09-21 15:32:21 UTC
Hm, this is a little bit awkward to me now: My cpu doesn't even support SSSE3 (but SSE3). Setting USE="-ssse3" fixes it for me. Look like it's my fault. But: shouldn't this be caught by the ebuild or by gcc?

Recompiling world w/o ssse3 now :)
Comment 4 Tony Vroon (RETIRED) gentoo-dev 2011-09-24 11:09:49 UTC
(In reply to comment #3)
> Hm, this is a little bit awkward to me now: My cpu doesn't even support SSSE3
> (but SSE3). Setting USE="-ssse3" fixes it for me. Look like it's my fault. But:
> shouldn't this be caught by the ebuild or by gcc?

No, your Gentoo system does not filter what you tell it to. If you tell it to jump off a bridge, it will do that.
Comment 5 jannis 2011-09-25 12:55:32 UTC
Point taken :)
"RESOLVED INVALID" is perfectly fine. Thanks