Created attachment 90108 [details]
Log file of crashed Painkiller: Hell and Damnation run
The game "Painkiller: Hell and Damnation" randomly crashes (segfaults) in-game, probably due to a LLVM-related bug.
Steps to reproduce:
1) Install the Painkiller: Hell and Damnation Linux client (resource: http://store.steampowered.com/app/214870/)
2) Start the game, enter a level
3) Play until it crashes
A random crash 2-3 minutes into playtime.
Build date and platform:
Build date of all components: 12/02/2013
Linux kernel version: 3.12.1-gentoo x86_64
Mesa: git (c4cf487315f1f5375534f1677177983fa496d577)
LLVM: 3.5-svn (bc134cb1f18e6870ccebbf03e40b7de11f274644)
The error log, including a backtrace, is attached. It strongly suggests the problem is related to LLVM.
There is no demo client available for Painkiller: Hell and Damnation, I will attempt to reproduce this bug in other programs (like Xonotic).
Can you rebuild LLVM with debuging symbols: --enable-debug and repost the backtrace?
Created attachment 90128 [details]
gdb backtrace of Painkiller: Hell and Damnation after crash
Hello mr. Stellard,
I have produced a useful backtrace this time, using gdb instead of relying on the game's own paltry debugging output (see attachment pkhd-crash-bt.txt). In addition to recompiling LLVM with the debug USE flag enabled, I also recompiled mesa with debug symbols (-ggdb added to CFLAGS).
If you need any more information, I'll be happy to oblige.
Thanks, could you also run the game with environment variable R600_DEBUG=ps,vs and post the output.
Hello mr. Stellard,
I attempted to run the binary with R600_DEBUG=ps,vs set, but Steam will not launch with this environment variable. Since PKHD will not run without Steam also running, I am unable to provide you with dumped shaders in this way. Is there another way for me to get the dumped shaders?
Created attachment 90146 [details]
Full gdb backtrace of Painkiller: Hell and Damnation after crash
Here is a full backtrace (bt full).
(In reply to comment #4)
> Hello mr. Stellard,
> I attempted to run the binary with R600_DEBUG=ps,vs set, but Steam will not
> launch with this environment variable. Since PKHD will not run without Steam
> also running, I am unable to provide you with dumped shaders in this way. Is
> there another way for me to get the dumped shaders?
You can run the game manually, you just need Steam running. For instance, if your Steam library is in the standard location:
$ cd ~/.steam/steam/SteamApps/common/Painkiller\ Hell\ \& \Damnation
$ R600_DEBUG=ps,vs ./PKHDGame.sh
Also, I would like to state I can provide PKHD Steam keys for free to Mesa developers, if it can help the resolution of the bug. Just shoot me an email.
First, thanks for porting PKHD to Linux! And of course for offering free PKHD keys for mesa developers.
Second, I can report PKHD no longer crashes, though there are still rendering bugs (lighting on surfaces is garbled and point lights are often rendered as black boxes). I will file a new bug report for that.
This bug can be marked as resolved.
Does that mean that a fix has been made?
Also, Remco, I would greatly appreciate it if you would add me to CC on that new bug (email: firstname.lastname@example.org) so I can follow it, too. Thanks!
Of course, I will CC you.
A patch dealing specifically with this bug has not been merged to LLVM upstream to my knowing; but LLVM is so much in flux that it was probably fixed "by accident".
I will submit the new bug report tomorrow.
Resolving per comment #8 (BTW, you can do this yourself :).