Bug 2268800

Summary: Crash in openQA testing when changing wallpaper to solid color and clicking on the color picker
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: mesaAssignee: Adam Jackson <ajax>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: airlied, ajax, ales.astone, bskeggs, fzatlouk, igor.raits, jexposit, jgrulich, j, kde-sig, lyude, npopov, rdieter, rhughes, rstrode, than, tstellar, walter.pete
Target Milestone: ---Flags: tstellar: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: openqa
Fixed In Version: mesa-24.0.3-1.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-03-14 12:50:17 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:
Attachments:
Description Flags
backtrace of the crash none

Description Adam Williamson 2024-03-10 17:07:27 UTC
We have a test in openQA which starts out by trying to set the wallpaper to solid black (for more screenshot matching consistency). It goes to the wallpaper settings, changes from "Image" to "Plain Color", then clicks on the little color square that should launch the color picker.

Since Fedora-Rawhide-20240307.n.0 , doing this seems to consistently cause plasmashell to crash. I have backtraced the crash, and it's a bunch of LLVM stuff I can't make head or tail of. Attaching the backtrace.

Comment 1 Adam Williamson 2024-03-10 17:08:20 UTC
Created attachment 2020992 [details]
backtrace of the crash

Comment 2 Alessandro Astone 2024-03-10 17:53:39 UTC
Caused by mesa-24.0.2

Since it works in mesa-24.0.0 it should be easy to git blame.

Comment 3 Alessandro Astone 2024-03-10 18:18:05 UTC
Unfortunately it's not a change in mesa, but rather mesa-24.0.2 was the first built against LLVM18.

Mesa @ git main compiled against LLVM18 is also broken

Comment 4 Nikita Popov 2024-03-11 13:41:29 UTC
I believe this patch to mesa should fix the issue:

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index cd2108f3a08..1345d85b224 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -609,7 +609,11 @@ gallivm_compile_module(struct gallivm_state *gallivm)
    LLVMRunPasses(gallivm->module, passes, LLVMGetExecutionEngineTargetMachine(gallivm->engine), opts);
 
    if (!(gallivm_perf & GALLIVM_PERF_NO_OPT))
+#if LLVM_VERSION_MAJOR >= 18
+      strcpy(passes, "sroa,early-cse,simplifycfg,reassociate,mem2reg,instsimplify,instcombine<no-verify-fixpoint>");
+#else
       strcpy(passes, "sroa,early-cse,simplifycfg,reassociate,mem2reg,instsimplify,instcombine");
+#endif
    else
       strcpy(passes, "mem2reg");

Comment 5 Nikita Popov 2024-03-11 13:55:31 UTC
I went ahead and submitted a mesa PR with that change here: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28101

I hope someone else can verify that this indeed resolves the problem, as I'm not familiar with how to test mesa changes.

Comment 6 Alessandro Astone 2024-03-11 14:02:45 UTC
Yes, that fixes the issue; thank you.

Comment 7 Nikita Popov 2024-03-11 16:39:08 UTC
Thanks for confirming!

I've opened a PR with this patch against dist-git here: https://src.fedoraproject.org/rpms/mesa/pull-request/46

Comment 8 Fedora Update System 2024-03-14 11:08:47 UTC
FEDORA-2024-f0e8a6a5d8 (mesa-24.0.3-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-f0e8a6a5d8

Comment 9 Fedora Update System 2024-03-14 12:50:17 UTC
FEDORA-2024-f0e8a6a5d8 (mesa-24.0.3-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.