Bug 72228 - Painkiller: Hell and Damnation segfaults intermittently on radeonsi
Summary: Painkiller: Hell and Damnation segfaults intermittently on radeonsi
Status: RESOLVED FIXED
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:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-02 14:58 UTC by Itzamna
Modified: 2014-01-20 06:26 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Log file of crashed Painkiller: Hell and Damnation run (4.75 KB, text/plain)
2013-12-02 14:58 UTC, Itzamna
Details
gdb backtrace of Painkiller: Hell and Damnation after crash (6.90 KB, text/plain)
2013-12-03 01:17 UTC, Itzamna
Details
Full gdb backtrace of Painkiller: Hell and Damnation after crash (56.69 KB, text/plain)
2013-12-03 10:46 UTC, Itzamna
Details

Description Itzamna 2013-12-02 14:58:49 UTC
Created attachment 90108 [details]
Log file of crashed Painkiller: Hell and Damnation run

Overview: 
    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

Actual results:
    A random crash 2-3 minutes into playtime.

Expected results:
    No crash.

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)

Additional information:
    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).
Comment 1 Tom Stellard 2013-12-02 17:17:01 UTC
Can you rebuild LLVM with debuging symbols: --enable-debug and repost the backtrace?
Comment 2 Itzamna 2013-12-03 01:17:37 UTC
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.
Comment 3 Tom Stellard 2013-12-03 01:42:12 UTC
Thanks, could you also run the game with environment variable R600_DEBUG=ps,vs and post the output.
Comment 4 Itzamna 2013-12-03 10:30:42 UTC
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?
Comment 5 Itzamna 2013-12-03 10:46:22 UTC
Created attachment 90146 [details]
Full gdb backtrace of Painkiller: Hell and Damnation after crash

Here is a full backtrace (bt full).
Comment 6 Leszek Godlewski 2014-01-06 13:06:47 UTC
(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
Comment 7 Leszek Godlewski 2014-01-06 13:13:31 UTC
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.
Comment 8 Itzamna 2014-01-19 05:18:20 UTC
Hello Leszek,

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.
Comment 9 Leszek Godlewski 2014-01-19 11:27:39 UTC
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: freedesktop.org@inequation.org) so I can follow it, too. Thanks!
Comment 10 Itzamna 2014-01-19 23:19:32 UTC
Hello Leszek,

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.
Comment 11 Michel Dänzer 2014-01-20 06:26:32 UTC
Resolving per comment #8 (BTW, you can do this yourself :).


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.