Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 835394

Summary: >media-libs/mesa-21.1.7 AMDGPU free() invalid pointer
Product: Gentoo Linux Reporter: Brian Denton <gentoo>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED INVALID    
Severity: normal CC: jstein, vityokster
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
URL: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6164
See Also: https://bugs.gentoo.org/show_bug.cgi?id=884231
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: lxdm log
xorg log
dmesg from the crash
emerge info

Description Brian Denton 2022-03-16 06:54:22 UTC
All versions of  >media-libs/mesa-21.1.7 crash with "free(): invalid pointer".

I haven't had time to troubleshoot other than trying to rebuild with various CFLAGS, which didn't help. I've been hoping it would magically get fixed in an update (which has happened before). Reproducible on all 4 of my AMD computers.

Reproducible: Always

Steps to Reproduce:
1. Attempt to start X/Attempt to start Wayland
Actual Results:  
Crash

Expected Results:  
Not Crash
Comment 1 Brian Denton 2022-03-16 06:58:37 UTC
Created attachment 767131 [details]
lxdm log

log from an lxde X11 computer attempting to run mesa-22.0.0

line 22: "free(): invalid pointer"
Comment 2 Brian Denton 2022-03-16 06:59:22 UTC
Created attachment 767132 [details]
xorg log

xorg log from lxde x11 computer
Comment 3 Brian Denton 2022-03-16 07:00:52 UTC
Created attachment 767133 [details]
dmesg from the crash

dmesg recovered from /var/log/dmesg

After mesa/x11 crashes I have to ctrl-f2 and type blindly (since the screen no longer works) to get it to shutdown.
Comment 4 Brian Denton 2022-03-16 07:05:44 UTC
Created attachment 767134 [details]
emerge info

emerge --info from the laptop of the Excavator "twins" (this machine has ">media-libs/mesa-21.1.7" added to package.mask, other than that the config is identical and it is a binpkg consumer of the machine that generated the other logs.
Comment 5 Matt Turner gentoo-dev 2022-03-17 00:13:41 UTC
Please file an issue upstream (at https://gitlab.freedesktop.org/mesa/mesa/) and link it here. Thanks!
Comment 6 Brian Denton 2022-03-17 01:16:16 UTC
Reported upstream
https://gitlab.freedesktop.org/mesa/mesa/-/issues/6164
Comment 7 Brian Denton 2022-04-01 17:03:32 UTC
This has been fixed for me.

I'll leave closing this to someone else because I'm not sure what to select (FIXED/INVALID).

Turns out llvm-13+ with lto enabled doesn't actually work. After rebuilding without lto it works again.

Older versions of mesa had LLVM_MAX_SLOT set to 12 so they did not use the newer broken llvm leading me to believe that it was mesa that was the problem.
Comment 8 Joonas Niilola gentoo-dev 2022-04-02 05:38:08 UTC
I'm running stable mesa, but for me the linux-firmware-20220310 update started crashing X. Downgrading to 20220209 helped. 
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/amdgpu?id=4a597a3fd2a023203e6ebe9ebbb788be15de7def this is what happened in-between these version releases. 

So people with problems out there, check your linux-firmware too.