Closed folke closed 4 months ago
I have the same issue, official build from the Arch repo is not working, but if you build it from source everything works fine, well, except for lf, it has some weird glitches in preview (polite mode on/off not helping)
Hi, thanks for reporting this! Seems pretty serious, and likely due to the AVX2 optimization indeed. Which branch (or tarball) works when you build it from source?
I tried to build master branch and 1.14.1tag, both work fine.
Maybe there's something in the Arch build's CFLAGS that it's sensitive to. @felixonmars, do you have a build log/specifics on how it was built? The package info I could find seems vanilla, but maybe there are Arch-global build flags I can look at?
except for lf, it has some weird glitches in preview (polite mode on/off not helping)
I suspect this is due to something else. Maybe lf doesn't understand the REP sequence. Running with -O 0
or -O 1
might help.
I suspect this is due to something else. Maybe lf doesn't understand the REP sequence. Running with
-O 0
or-O 1
might help.
These options didn't help, but you're right, it's not chafa, I tried running the previous version of lf (r31) and there are no glitches, so it seems the bug was introduced in lf r32
UPD: Looks like the bug has already been fixed https://github.com/gokcehan/lf/issues/1736
I've been racking my brain trying to figure this issue out. I'd just switched from an Nvidia gpu to AMD on my desktop, so I thought the answer lay somewhere there, but it didn't seem likely. My older laptop with nearly the exact same configuration (but intel igpu) worked fine. After reading these comments I checked my laptop and confirmed that it doesn't even support AVX2, which could be why it's been spared the issue. My desktop does support AVX2, but it's not normally something I have to be conscious of. I tried to replace Arch's chafa package with chafa-git from AUR, but that didn't resolve it, so I guess I'll just wait till the official package gets updated.
This is proving a bit hard to track down, since the issue can't be reproduced when building from source. Do any of you know which compiler version was used to produce the faulty Chafa in Arch?
I don't know. I would try to make a bug report on the Arch package, but new user registration is closed there at the moment. If anyone else has credentials I'd ask that they make the report for us.
@hpjansson see my build log from the AUR package.
$ gcc --version
gcc (GCC) 14.1.1 20240522
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Thanks! Real progress: Can repro with CFLAGS='-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -flto=auto -ffat-lto-objects'
.
Minimal repro flags: ./autogen.sh CFLAGS='-flto -O2'
Pretty sure that solves it. Fix will be in the next release (next week at the latest).
Can confirm that rebuilding chafa-git
in the AUR works now. ty!
I just released the fix in version 1.14.2. Thanks all!
Since the new
1.14.1
release, symbols mode no longer works for me.Other modes work perfectly fine, so maybe it has something to do with the new AVX2 optims for symbols?
I'm on Arch Linux.
I'm aware that there's not a lot of info in this bug report, so do let me know if there's any information I can provide.
Probably not that helpful, but I've attached an example output below.
example output
``` [?25l[0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [38;2;0;0;0m [0m [?25h ```lscpu
``` Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 39 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Vendor ID: GenuineIntel Model name: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz CPU family: 6 Model: 140 Thread(s) per core: 2 Core(s) per socket: 4 Socket(s): 1 Stepping: 1 Frequency boost: enabled CPU(s) scaling MHz: 73% CPU max MHz: 2801.0000 CPU min MHz: 400.0000 BogoMIPS: 5608.00 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdt scp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk dtherm ida arat pln pts vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpc lmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear ibt flush_l1d arch_capabilities Virtualization features: Virtualization: VT-x Caches (sum of all): L1d: 192 KiB (4 instances) L1i: 128 KiB (4 instances) L2: 5 MiB (4 instances) L3: 12 MiB (1 instance) NUMA: NUMA node(s): 1 NUMA node0 CPU(s): 0-7 Vulnerabilities: Gather data sampling: Mitigation; Microcode Itlb multihit: Not affected L1tf: Not affected Mds: Not affected Meltdown: Not affected Mmio stale data: Not affected Reg file data sampling: Not affected Retbleed: Not affected Spec rstack overflow: Not affected Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop Srbds: Not affected Tsx async abort: Not affected ```