Various segfaults/problems in qt/plasma
https://bugs.freedesktop.org/show_bug.cgi?id=104762
Bug ID: 104762
Summary: Various segfaults/problems in qt/plasma
Product: Mesa
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Created attachment 136931
--> https://bugs.freedesktop.org/attachment.cgi?id=136931&action=edit
mostly useless gdb backtrace
I think it's related to the series that ended with this commit "st/glsl_to_tgsi: add ARB_get_program_binary support using TGSI"
https://cgit.freedesktop.org/mesa/mesa/commit/?id=a20016d8277f9cd68620784417a57ae227783a04
but I have to try around a bit more.
It doesn't always happen. I think it's related to the shader cache. Sometimes deleting the shader cache helps, sometimes it doesn't. I think MESA_EXTENSION_OVERRIDE=-GL_ARB_get_program_binary helps.
Usually export LD_LIBRARY_PATH=... LIBGL_DRIVERS_PATH=... to another mesa build, starting the application once and then starting it with the system mesa again helps. It could be related to mesa first deleting the other shader cache before making a new one. Some weird race condition?
Applications I've seen affected:
sddm-greeter (segfaulting)
plasmashell (segfaulting
systemsettings (rendering black window content, segfaulting) krunner (rendering breaking, segfaulting)
As far as I can tell it doesn't happen with mesa debug builds...
More investigation is needed.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
Michel Dänzer <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #1 from Michel Dänzer <[email protected]> ---
Can you try running an affected application in valgrind (either with a debug build of radeonsi_dri.so, or at least a release build with -g)?
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
--- Comment #2 from Christoph Haag <[email protected]> --- Created attachment 136932
--> https://bugs.freedesktop.org/attachment.cgi?id=136932&action=edit
systemsettings black
I think I have tried running with valgrind before. I tried valgrind with -Og mesa rendering the black window, but no (relevant) errors comes up.
To describe one case:
I just tried a mesa debug build and everything worked normal. Then with the same options, but a release build with additionally CFLAGS=-Og CXXFLAGS=-Og renders systemsettings5 and plasmashell completely black. No segfaults this time. Starting plasmashell and systemsettings with MESA_EXTENSION_OVERRIDE=-GL_ARB_get_program_binary makes it display normally. But starting it without the variable after that makes it black again. Deleting the shader cache does not help in this case.
But after starting systemsettings5 with another mesa installation once, it starts working normally with the mesa build that produced the black window just before too.
It's possible the segfaults and the black windows are different problems but they started happening at the same time.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
Mike Lothian <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #3 from Mike Lothian <[email protected]> --- I made this go away by deleting ~/.cache/qtshadercache and ~/.cache/mesa_shader_cache
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
Christoph Haag <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #136931|0 |1
is obsolete| |
--- Comment #4 from Christoph Haag <[email protected]> --- Created attachment 136940
--> https://bugs.freedesktop.org/attachment.cgi?id=136940&action=edit
better gdb backtrace
Managed to get a segfault (happens every time now) with the same mesa build that previously was just showing a black screen, now with a better backtrace.
Deleting only the qt shadercache (TIL that's a thing) doesn't help. Deleting only the mesa shader cache doesn't help. Deleting both does help. Weird.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
--- Comment #5 from Timothy Arceri <[email protected]> --- Created attachment 136950
--> https://bugs.freedesktop.org/attachment.cgi?id=136950&action=edit
possible fix
I wasn't able to reproduce the issue, but can you give this patch a try?
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
[email protected]
Tested-by Dieter Nützelhttps://bugs.freedesktop.org/show_bug.cgi?id=104762
--- Comment #6 from Dieter Nützel <[email protected]> ---
I got it since the commit went in.
Deleting both like Mike suggested worked here since that time, too. I ignored it 'cause I thought that I'm running devel stuff and my son's account switched daily from Mesa devel to release back and forth...;-)
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
--- Comment #7 from Christoph Haag <[email protected]> --- (In reply to Timothy Arceri from comment #5)
Quoted 4 lines
Created attachment 136950 [details] [review]
possible fixI wasn't able to reproduce the issue, but can you give this patch a try?
Preliminary result: It does not help, after booting today with the patch plasmashell was segfaulting again until
rm -rf ~/.cache/mesa_shader_cache/ ~/.cache/qtshadercache
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
--- Comment #8 from Dieter Nützel <[email protected]> --- Sometimes I wiped this, too.
.cache/plasmashell/qmlcache/
.cache/ksycoca5_de_***
.cache/plasma-svgelements-***
.cache/plasma_theme_***
.cache/icon-cache.kcache
All above files would be regenerated automatically.
After this KDE5/Plasma5 started all the time with a nice/clean desktop, again.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
--- Comment #9 from Mike Lothian <[email protected]> ---
It might be worth keeping these somewhere rather than deleting. Once everything is working, copy them back see if they issue can be reproduced that way
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
--- Comment #10 from Timothy Arceri <[email protected]> --- I was able to reproduce the problem. Fix sent to list:
https://patchwork.freedesktop.org/series/37147/
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
[email protected]
Reviewed-by Gert Wollnyhttps://bugs.freedesktop.org/show_bug.cgi?id=104762
Timothy Arceri <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED--- Comment #11 from Timothy Arceri <[email protected]> --- Shoul be fixed by the following commit. Please reopen if the issue continues.
commit 041b18cf23a0acf7b0eddf63cd7a2a10192432a1
Author: Timothy Arceri <[email protected]> Date: Fri Jan 26 11:56:50 2018 +1100
st/shader_cache: restore num_tgsi_tokens when loading from cache
Without this we will fail to correctly serialise programs when using glGetProgramBinary() if the program was retrieved from the disk cache rather than freshly compiled.
st_*_program"
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104762
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
Michel Dänzer <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #12 from Michel Dänzer <[email protected]> --- *** Bug 104806 has been marked as a duplicate of this bug. ***
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
--- Comment #13 from Mike Lothian <[email protected]> --- That commit needs to be cherry picked to the 18.0 branch
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
--- Comment #14 from Dennis Schridde <[email protected]> ---
Confirming: 041b18cf23a0acf7b0eddf63cd7a2a10192432a1 applied to 18.0.0_rc3, followed by cleaning ~/.cache of root, sddm and my user stops the crashes.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
Fireball <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |------ Comment #15 from Fireball <[email protected]> ---
I still experience this with mesa 18.0.0_rc3 and r600 driver. Resolution first looked ok, user processes (plasmashell etc.) stopped crashing, but screen locker and logout screen crash (not right away, after a few hours of working).
As always, clearing caches in /root/.cache and /var/lib/sddm/.cache helps, but this problem would occur again.
I use Qt 5.9.4.
Backtrace of /usr/lib64/libexec/ksmserver-logout-greeter mentions /usr/lib64/dri/r600_dri.so.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
--- Comment #16 from Dennis Schridde <[email protected]> --- (In reply to Fireball from comment #15)
Quoted 1 line
I still experience this with mesa 18.0.0_rc3 and r600 driver.
It is not supposed to be fixed by rc3, since Timothy's patch 041b18cf23a0acf7b0eddf63cd7a2a10192432a1 only got applied after that version was released. It also was not yet backported to the 18.0 branch [1], so for now you need to apply it manually (e.g. by placing it in /etc/portage/patches/media-libs/mesa-18.0.0_rc3, if you are on Gentoo).
[1]: https://cgit.freedesktop.org/mesa/mesa/log/?h=18.0
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
Timothy Arceri <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|REOPENED |RESOLVED--- Comment #17 from Timothy Arceri <[email protected]> --- Please don't reopen this bug, the fix is already in master and has been tagged as a fix in the commit message so it will be picked up in the next stable version.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
--- Comment #18 from Christoph Haag <[email protected]> ---
To be fair, the segfaults are fixed, but sddm and plasmashell randomly not working/rendering until the shader cache(s) are deleted is still happening. Unfortunately that's a bit harder to debug, but there might still be a similar issue hiding somewhere.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104762
--- Comment #19 from Christoph Haag <[email protected]> --- (In reply to Christoph Haag from comment #18)
Quoted 4 lines
To be fair, the segfaults are fixed, but sddm and plasmashell randomly not working/rendering until the shader cache(s) are deleted is still happening. Unfortunately that's a bit harder to debug, but there might still be a similar issue hiding somewhere.
This may be rather bug 105065, which is really a QT bug:
https://bugreports.qt.io/browse/QTBUG-66420
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel