Bug 110472 - Graphical Fault (Desktop Freeze) on Specific OpenGL Application
Summary: Graphical Fault (Desktop Freeze) on Specific OpenGL Application
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
Depends on:
Reported: 2019-04-19 17:26 UTC by gpizarro
Modified: 2019-09-25 18:49 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

syslog errors (1.31 KB, text/plain)
2019-04-19 17:26 UTC, gpizarro

Description gpizarro 2019-04-19 17:26:59 UTC
Created attachment 144048 [details]
syslog errors

While using yuzu (yuzu-emu.org), an OpenGL-based emulator, the desktop freezes. I can SSH in with another computer, but not use the keyboard/mouse. REISUB works to reboot semi-safely. Other OpenGL games work properly.

OS: Ubuntu 19.04 (or at least since 18.04 LTS -> now)
 - Manjaro also crashed, latest version
Mesa: 19.1.0-dev1 (or at least since 18 -> now)
Kernel: 5.0.0-13-generic 
Driver: amdgpu
CPU: AMD Ryzen 5 1600
Wayland vs. X makes no difference

The devs directed me here; by their logic, if it were an application bug, only the emulator application would be frozen, not the whole desktop.

I have no idea if I submitted this report correctly, so please let me know if I should change anything.
Comment 1 gpizarro 2019-04-30 02:48:50 UTC
Bump? Thanks to someone for moving my thread to the correct category, so hopefully I'll get some sort of response soon :)
Comment 2 gpizarro 2019-05-08 15:59:49 UTC
I really hope someone sees this. Bump x2?
Comment 3 Timothy Arceri 2019-05-09 02:24:58 UTC
It would be helpful if you were able to get an apitrace [1] of the problem.

[1] https://github.com/apitrace/apitrace
Comment 4 gpizarro 2019-05-09 03:12:34 UTC
(In reply to Timothy Arceri from comment #3)
> It would be helpful if you were able to get an apitrace [1] of the problem.
> [1] https://github.com/apitrace/apitrace

Thank you for replying!

My apitrace file is unnaturally large (418MB) so I uploaded it to Google Drive instead of this site. The apitrace log is also large (24MB), so it's also in the shared folder.

Link: https://drive.google.com/drive/folders/1rulVIW3dIB3RYA3RlIorLFufdQxLOYrn?usp=sharing
Comment 5 Timothy Arceri 2019-05-27 02:49:47 UTC
There is a bug in one of their generated shaders.

 error: #extension directive is not allowed in the middle of a shader

Some other drivers allow extension to be defined mid shader but this is invalid according to the OpenGL spec. You can see the problemn shader below:

#define CBUF_BINDING_1 5
#define CBUF_BINDING_4 6
#define CBUF_BINDING_12 7
layout (lines) in;           <--- This needs to be after #extension
#extension GL_ARB_separate_shader_objects : enable

This should be reported to the yuzu devs. For now you can try work around it by setting the below environment variable when running yuzu. Let me know if this fixes the issue for you.

Comment 6 Timothy Arceri 2019-05-27 02:56:12 UTC
I've reported it here: https://github.com/yuzu-emu/yuzu/issues/2523
Comment 7 GitLab Migration User 2019-09-25 18:49:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1388.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.