Bug 101384 - [Hero Siege] si_shader: segfault in libLLVM-5.0.so.1
Summary: [Hero Siege] si_shader: segfault in libLLVM-5.0.so.1
Status: RESOLVED MOVED
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
URL:
Whiteboard:
Keywords:
Depends on: 105797
Blocks: 77449
  Show dependency treegraph
 
Reported: 2017-06-12 09:24 UTC by Christian Lanig
Modified: 2019-09-25 17:59 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
R600_DEBUG="vs,tcs,tes,gs,ps,cs" ./runner (54.97 KB, text/plain)
2017-06-12 18:54 UTC, Christian Lanig
Details
R600_DEBUG="vs,tcs,tes,gs,ps,cs" ./runner (348.04 KB, text/plain)
2017-06-12 19:24 UTC, Christian Lanig
Details
Debugger backtrace info. (5.61 KB, text/plain)
2017-06-12 19:56 UTC, Christian Lanig
Details
possible fix (5.62 KB, patch)
2017-06-12 20:40 UTC, Nicolai Hähnle
Details | Splinter Review
Pixel shader debug only. (2.47 KB, text/plain)
2017-06-12 20:44 UTC, Christian Lanig
Details
Vertex shaders only. (384 bytes, text/plain)
2017-06-12 20:45 UTC, Christian Lanig
Details
possible fix (4.19 KB, patch)
2017-06-19 11:41 UTC, Nicolai Hähnle
Details | Splinter Review

Description Christian Lanig 2017-06-12 09:24:10 UTC
Ubuntu 17.04
Padoka-PPA
RX 480
Ryzen 7 1700X
32GiB RAM

Hero Siege doesn't start. The kernel message is:
si_shader:1[3325]: segfault at 0 ip 00000000e17b64f5 sp 00000000df6addf0 error 6 in libLLVM-5.0.so.1[e10c3000+360b000]

The error number differs for each attempt.

To reproduce this issue you might have to install these dependencies firstly:
- libopenal-dev:i386
- libxrandr-dev:i386
- libglu-dev:i386
Comment 1 Nicolai Hähnle 2017-06-12 17:29:02 UTC
Could you please provide a log when running the game with environment variable R600_DEBUG=vs,tcs,tes,gs,ps,cs?

Also, could you please run with a debugger and debug symbols installed, and provide a backtrace? Thank you!
Comment 2 Christian Lanig 2017-06-12 18:54:52 UTC
Created attachment 131895 [details]
R600_DEBUG="vs,tcs,tes,gs,ps,cs" ./runner
Comment 3 Christian Lanig 2017-06-12 19:24:02 UTC
Created attachment 131897 [details]
R600_DEBUG="vs,tcs,tes,gs,ps,cs" ./runner

Previous log was incorrect.
Comment 4 Christian Lanig 2017-06-12 19:56:08 UTC
Created attachment 131899 [details]
Debugger backtrace info.
Comment 5 Nicolai Hähnle 2017-06-12 20:40:30 UTC
Created attachment 131900 [details] [review]
possible fix

As discussed on IRC, the error goes away when dumping shaders, which means that the bug might be related to multi-threading. This suggests the attached patch.
Comment 6 Christian Lanig 2017-06-12 20:44:30 UTC
Created attachment 131901 [details]
Pixel shader debug only.
Comment 7 Christian Lanig 2017-06-12 20:45:46 UTC
Created attachment 131902 [details]
Vertex shaders only.
Comment 8 Nicolai Hähnle 2017-06-19 11:41:59 UTC
Created attachment 132057 [details] [review]
possible fix

Did you get around to testing with the provided patch? That would still be useful, though please use the newly attached instead if you do. Thanks!
Comment 9 Christian Lanig 2017-06-19 22:21:17 UTC
Thanks a lot for your help!

I am still trying to give you the requested info as soon as possible but I ran into several issues trying to compile Mesa and I am also a bit busy sometimes.
However, I know how to fix the remaining issues and it will just be a matter of time to fix the whole string to the end. It's also pretty educational.

But I would also be happy when someone who owns this game and compiles Mesa regularly could test this patch on his own to accelerate the procedure.

The only thing I could find out so far was that it also crashes with 17.0.3 which is the standard version of Ubuntu 17.04 and it also runs fine while the shaders are dumped.
Comment 10 Christian Lanig 2017-06-28 16:18:11 UTC
Sorry that it took so long.

I have been able to compile Mesa from git and noticed that the patch has already been applied. Unfortunately Hero Siege still doesn't run without dumping both vertex and pixel shaders.
Comment 11 GitLab Migration User 2019-09-25 17:59:25 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/1269.


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.