Bug 101747 - Steam-Game Turmoil, Segfault on start
Summary: Steam-Game Turmoil, Segfault on start
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: 13.0
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on: 105797
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-10 20:54 UTC by famo
Modified: 2019-09-25 17:59 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description famo 2017-07-10 20:54:45 UTC
Turmoil:
http://store.steampowered.com/app/361280/Turmoil/
Crashes on startup (see terminal output below)

Judging from this forum thread:
http://steamcommunity.com/app/361280/discussions/0/135511027313938924/

It is working under mesa+intel, but not under mesa+radeonsi.


Terminal output:
$ ./run.sh 
./runner: /usr/lib32/libcrypto.so.1.0.0: no version information available (required by ./runner)
./runner: /usr/lib32/libssl.so.1.0.0: no version information available (required by ./runner)

***************************************
*     YoYo Games Linux Runner V1.3    *
***************************************  
CommandLine: -game game.unx
ExeName= /run/media/richard/mmedia/Steam/steamapps/common/Turmoil/runner
MemoryManager allocated: 1722124

***************************************
*     YoYo Games Runner v1.0(999)[r32908]    *
***************************************  
RunnerLoadGame: game.unx
RunnerLoadGame() - assets/game.unx
Checking if INIFile assets/options.ini Exists
assets/options.ini file contents: [Linux]
DisplayName="TurmoilSteam"
NewDebugger=0

INI DisplayName=TurmoilSteam
Reading File assets/game.unx
Loaded File assets/game.unx(40091152)
IFF wad found
Get Resolution
Get Header Information
InitGMLFunctions
HighScore..SavePrePend /home/richard/.config/TurmoilSteam/ 
Game..Math..Graphic..Action..File..Resource..Interaction..3D..Particle..Misc..DS..Sound..Physics..Gamepad..GAMEPAD: Initialising Ubuntu support
GAMEPAD: 4 axis values (last) at 0xf7778580
GAMEPAD: 4 axis values (last) at 0xf7778560
GAMEPAD: 4 axis values (last) at 0xf7778540
GAMEPAD: 4 axis values (last) at 0xf7778520
Buffers..Networking..Shaders..Steam being initialised with appId 361280
Steam_Init
Steam - SteamAPI_RestartAppIfNecessary
szCmd: /bin/sh -c '"/home/richard/.local/share/Steam/steam.sh" "steam://run/361280"' &
Steam - Restart required
Steam_Init
SteamInit failed with no msg
InitPushFunctions...YoYo..Fini
Code_Load()
VARI_Load()
got 51 global variables
got 898 instance variables
got 171 local variables
ID_STRG
Steam restarting via client
Running Steam on chakra 2017.02 64-bit
STEAM_RUNTIME is enabled automatically
./run.sh: line 3:  8130 Segmentation fault      (core dumped) LD_LIBRARY_PATH=./lib:$LD_LIBRARY_PATH ./runner
Comment 1 famo 2017-09-13 22:31:54 UTC
Still crashes with Mesa 17.1.5


Graphics:  Card: Advanced Micro Devices [AMD/ATI] Fiji [Radeon R9 FURY / NANO Series]
           Display Server: x11 (X.Org 1.19.3) driver: amdgpu Resolution: 2560x1440@143.86hz
           OpenGL: renderer: Gallium 0.4 on AMD FIJI (DRM 3.15.0 / 4.12.4-1-CHAKRA, LLVM 4.0.1)
           version: 4.5 Mesa 17.1.5
Comment 2 John 2017-09-14 08:46:42 UTC
Same issue here on mesa dev with a 280X using the amdgpu kernel module on 4.13.1.

In dmesg we can see this:

[18506.679448] si_shader:2[21842]: segfault at f133abd4 ip 000000000834e6fc sp 00000000e8efcc60 error 7 in runner[8048000+423000]
[18527.013339] runner[21858]: segfault at 4d0 ip 00000000f7824c02 sp 00000000ffd7e120 error 4 in libX11.so.6.3.0[f77fa000+148000]
[18527.706432] runner[21946]: segfault at f0f24b70 ip 000000000834e6fc sp 00000000ffd74050 error 7 in runner[8048000+423000]
[18527.706438] si_shader:2[21951]: segfault at ee7b62a4 ip 000000000834e6fc sp 00000000e8efcb10 error 7 in runner[8048000+423000]
[18613.585254] si_shader:2[22020]: segfault at 54657369 ip 00000000f04f9739 sp 00000000ebbfa610 error 4 in libLLVM-6.0svn.so[efdb8000+3

I've never played it before so I don't know if it's a somewhat recent breakage or something that never worked. It works fine with "LIBGL_ALWAYS_SOFTWARE=1" though.
Comment 3 Samuel Pitoiset 2017-09-14 16:06:20 UTC
I guess it shouldn't crash with R600_DEBUG="vs,ps,gs,tcs,tes,cs" ?
Comment 4 John 2017-09-14 17:26:50 UTC
That's right it does not!

Out of curiosity why is a debug print command preventing the crash?
Comment 5 John 2017-09-14 17:29:13 UTC
In case it helps, this is the minimum needed: R600_DEBUG="vs,ps" to not crash. The others don't seem to matter.
Comment 6 Samuel Pitoiset 2017-09-15 08:15:19 UTC
(In reply to John from comment #4)
> That's right it does not!
> 
> Out of curiosity why is a debug print command preventing the crash?

RadeonSI can compile shaders using multithreads internally, but this feature is disabled when you dump the shaders. All YoYO based games are affected by this issue.
Comment 7 John 2017-09-15 10:04:48 UTC
Oh I see, that makes sense. 
Thank you for the easy explanation!

Should we stick with the R600_DEBUG var or is there something only for the threading compilation? I've tried multithread_glsl_compiler, GALLIUM_THREAD and mesa_glthread but none changed anything.

Is this an issue in the YoYo engine or in radeonsi?
The game in question does not require high performance so the current workaround is good enough, I'm just curious.
Thank you for the quick replies!
Comment 8 Samuel Pitoiset 2017-09-15 10:43:10 UTC
I don't know where the issue is, but this really needs investigation beause it affects many small games.
Comment 9 Samuel Pitoiset 2017-09-15 12:27:21 UTC
Note that you can also use R600_DEBUG=mono to workaround the issue for now.
Comment 10 John 2017-09-15 12:31:49 UTC
Great, thank you!

I'd be happy to test patches or anything to help.
Comment 11 GitLab Migration User 2019-09-25 17:59:36 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/1272.


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.