Bug 86196

Summary: Massive Chalice crashes on startup
Product: Mesa Reporter: Elad Alfassa <elad>
Component: Drivers/Gallium/radeonsiAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: backtrace
output with R600_DEBUG=ps

Description Elad Alfassa 2014-11-12 13:03:40 UTC
Created attachment 109335 [details]
backtrace

Trying to play Massive Chalice (http://store.steampowered.com/app/246110/), it crashes on startup after the logos.

My video card is Radeon HD 7770
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde XT [Radeon HD 7770/8760 / R7 250X]

Running Fedora 21, 64bit.

When it crashes, I can see this in the terminal:

LLVM ERROR: Cannot select: 0xdd82a2cc: i32 = truncate 0xdd818230 [ORD=47] [ID=184]
  0xdd818230: i128 = srl 0xdd81cc14, 0xdd81cca0 [ORD=47] [ID=164]
    0xdd81cc14: i128 = bitcast 0xdd81b6f4 [ORD=47] [ID=150]
      0xdd81b6f4: v4i32,ch = load 0xe02affdc, 0xdd817f74, 0xdd8189d8<LD16[%54](tbaa=!"const")> [ORD=34] [ID=119]
        0xdd817f74: i64,ch = CopyFromReg 0xe02affdc, 0xdd817ee8 [ID=110]
          0xdd817ee8: i64 = Register %vreg111 [ID=2]
        0xdd8189d8: i64 = undef [ID=8]
    0xdd81cca0: i32 = Constant<64> [ID=107]
In function: main
ERROR: Passed a NULL mutex
ERROR: Passed a NULL mutex

Installed mesa packages:

mesa-libEGL-10.3.3-1.20141110.fc21.i686
mesa-libxatracker-10.3.3-1.20141110.fc21.x86_64
mesa-dri-drivers-10.3.3-1.20141110.fc21.x86_64
mesa-libGL-devel-10.3.3-1.20141110.fc21.x86_64
mesa-libglapi-10.3.3-1.20141110.fc21.i686
mesa-libGLES-10.3.3-1.20141110.fc21.x86_64
mesa-filesystem-10.3.3-1.20141110.fc21.x86_64
mesa-libgbm-devel-10.3.3-1.20141110.fc21.x86_64
mesa-demos-8.2.0-2.fc21.x86_64
mesa-libEGL-devel-10.3.3-1.20141110.fc21.x86_64
mesa-libGLU-9.0.0-7.fc21.i686
mesa-libwayland-egl-devel-10.3.3-1.20141110.fc21.x86_64
mesa-libGLU-9.0.0-7.fc21.x86_64
mesa-libwayland-egl-10.3.3-1.20141110.fc21.x86_64
mesa-dri-drivers-10.3.3-1.20141110.fc21.i686
mesa-libEGL-10.3.3-1.20141110.fc21.x86_64
mesa-libgbm-10.3.3-1.20141110.fc21.i686
mesa-libglapi-10.3.3-1.20141110.fc21.x86_64
mesa-libOpenCL-10.3.3-1.20141110.fc21.x86_64
mesa-vdpau-drivers-10.3.3-1.20141110.fc21.x86_64
mesa-libGLES-devel-10.3.3-1.20141110.fc21.x86_64
mesa-filesystem-10.3.3-1.20141110.fc21.i686
mesa-libGL-10.3.3-1.20141110.fc21.x86_64
mesa-libgbm-10.3.3-1.20141110.fc21.x86_64
mesa-libGL-10.3.3-1.20141110.fc21.i686
mesa-debuginfo-10.3.3-1.20141110.fc21.x86_64


I attached a backtrace of the game that systemd's coredumpctl helpfully generated for me - I tried using gdb to get more info but gdb crashes when processing the coredump.

I'm not 100% sure it's a driver bug, but it probably is because it seems the developer tested this on the propritary drivers and it worked for them.
Comment 1 Michel Dänzer 2014-11-13 07:30:54 UTC
(In reply to Elad Alfassa from comment #0)
> LLVM ERROR: Cannot select: 0xdd82a2cc: i32 = truncate 0xdd818230 [ORD=47]
> [ID=184]
>   0xdd818230: i128 = srl 0xdd81cc14, 0xdd81cca0 [ORD=47] [ID=164]
[...]
> I'm not 100% sure it's a driver bug, [...]

It's most definitely an LLVM R600 backend bug.

Please run the game with the environment variable R600_DEBUG=ps , capture its stderr output to a file and attach that file here after the game crashed.
Comment 2 Elad Alfassa 2014-11-13 10:40:23 UTC
Created attachment 109397 [details]
output with R600_DEBUG=ps

Attached. I hope this is helpful.
Comment 3 Michel Dänzer 2014-11-18 07:39:06 UTC
Which version of LLVM are you using? The failing shader seems to compile fine with a current LLVM SVN snapshot (which will in time be released as 3.6).
Comment 4 Felix Schwarz 2014-12-18 12:26:03 UTC
Elad: You could also try testing llvm 3.5 which is available in updates-testing (https://admin.fedoraproject.org/updates/gambas3-3.6.1-2.fc21,julia-0.3.3-2.fc21,llvm-3.5.0-4.fc21,mesa-10.4.0-1.20141214.fc21,pocl-0.10-2.fc21,pure-0.62-2.fc21). I think the update will not be pushed to stable due to dependency errors but there is a follow-up build already in the making.
Comment 5 Elad Alfassa 2014-12-20 11:24:39 UTC
Seems to work now with llvm-3.5.0-4.fc21.x86_64

Thanks.

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.