FS#79603 - [cctag] CCTAG_ENABLE_SIMD_AVX2 breaks baseline

Attached to Project: Arch Linux
Opened by Xeonacid (Xeonacid) - Thursday, 07 September 2023, 13:30 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:19 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

This includes avx2 instruction at compile time without runtime detection.
An older cpu without avx2 will refuse to work.

Steps to reproduce:

$ qemu-x86_64 -cpu Broadwell-v4 /usr/bin/detection
Program for detecting CCTags in one image, in a directory or in a video
For each image or video frame it detects the markers and it shows the image with a graphical overlayshowing the center of the tag, its ID and the outer ellipse:

Required input parameters:
-i [ --input ] arg Path to an image (JPG, PNG) or video (avi,
mov) or camera index for live capture (0,
1...) or to a directory containing the images
to process
-n [ --nbrings ] arg Number of rings of the CCTags to detect

Optional parameters:
-b [ --bank ] arg Path to a bank parameter file, e.g.
4Crowns/ids.txt
-p [ --params ] arg Path to configuration XML file
-o [ --output ] arg Output folder name
-s [ --save-detected-image ] Save an image with the graphical overlay of
the detected tags. For single images the saved
images will have a '_detected' suffix and it
will be placed either in the current directory
or in the directory given by --output. For
videos a file named #####.png will be saved
instead with the #s representing the
zero-padded frame number, either in the
current directory or in the directory given by
--output.
-u [ --show-unreliable ] Show the unreliable tags (marker id = -1)

$ qemu-x86_64 -cpu core2duo-v1 /usr/bin/detection
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
fish: Job 1, 'qemu-x86_64 -cpu core2duo-v1 /u…' terminated by signal SIGILL (Illegal instruction)
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:19 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/cctag/issues/1
Comment by Toolybird (Toolybird) - Thursday, 07 September 2023, 21:05 GMT
> without runtime detection

Yeah, appears to be missing from upstream implementation.
Comment by Caham Everan (olcammy) - Tuesday, 26 September 2023, 17:08 GMT
Think I've also been bit by this bug. Getting SIGILL in libatomic.so.1.2.0 on instruction vmovdqa which seems to be an AVX instruction. My old i5 cpus don't support AVX (cat /proc/cpuinfo | grep avx -- shows nothing). Tried downgrading libgcc (which owns this library) from 13 to 12 to 11 to no avail. A number of applications including Firefox and Gimp now are unusable following some recent upgrade as a result of this Illegal Instruction. Sorry m8s. Thanks for looking into it.
Comment by loqs (loqs) - Tuesday, 26 September 2023, 17:22 GMT
@olcammy is the system you experienced the issue on using linux-hardened?
Comment by Caham Everan (olcammy) - Tuesday, 26 September 2023, 17:29 GMT
Oh right, forgot to mention: 6.5.4-hardened1-1-hardened
Thanks!
Comment by loqs (loqs) - Tuesday, 26 September 2023, 17:42 GMT
@olcammy see  FS#79444 .
Comment by Caham Everan (olcammy) - Tuesday, 26 September 2023, 18:12 GMT
With hardened kernel:

./test
__builtin_cpu_supports ("avx"):0
__builtin_cpu_supports ("avx2"):0

Attempting to add 'gather_data_sampling=off' to grub config just now nearly bricked my system...
grub was rebooting the machine before I'd even had a chance to edit the options!
Had to boot a rescue CD and reinstall grub to get back to here.
Plain vanilla kernel avoids the issue, and the test.c gives:

./test
__builtin_cpu_supports ("avx"):512
__builtin_cpu_supports ("avx2"):1024


Not really sure where to go from here.

Comment by Sven-Hendrik Haase (Svenstaro) - Wednesday, 27 September 2023, 00:27 GMT
Please check package rel-13.

Loading...