Bug 86089 - [r600g][mesa 10.4.0-dev] shader failure - r600_sb::bc_finalizer::cf_peephole() when starting Second Life
Summary: [r600g][mesa 10.4.0-dev] shader failure - r600_sb::bc_finalizer::cf_peephole(...
Status: CLOSED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
: 86418 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-10 05:05 UTC by Shawn Starr
Modified: 2015-02-02 22:03 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Crash from gdb stacktrace (8.78 KB, text/plain)
2014-11-10 05:06 UTC, Shawn Starr
Details
fix loops with no repeat. (1.49 KB, patch)
2014-11-28 03:37 UTC, Dave Airlie
Details | Splinter Review

Description Shawn Starr 2014-11-10 05:05:44 UTC
Compiling November 10th build of git master for rv6xx:

kernel: 3.18.0-0.rc3.git2.2.fc22.1.x86_64
mesa-dri-drivers-10.4-0.devel.100.20141110.fc21.x86_64 (custom using Fedora's .spec file)

I am using R600_DEBUG=hyperz

I get the following crash:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe916bb4e in r600_sb::bc_finalizer::cf_peephole (this=this@entry=0x7fffffffb350) at sb/sb_bc_finalize.cpp:877
877                             c->jump_target = static_cast<cf_node*>(c->jump_target->next);


Full stack dump attached
Comment 1 Shawn Starr 2014-11-10 05:06:52 UTC
Created attachment 109185 [details]
Crash from gdb stacktrace
Comment 2 Shawn Starr 2014-11-10 21:51:33 UTC
Bisecting came up with this as bad commit:

73dd50acf6d244979c2a657906aa56d3ac60d550 is the first bad commit
commit 73dd50acf6d244979c2a657906aa56d3ac60d550
Author: Tapani Pälli <tapani.palli@intel.com>
Date:   Wed Aug 6 09:46:54 2014 +0300

    glsl: implement switch flow control using a loop
    
    Patch removes old variable based logic for handling a break inside
    switch. Switch is put inside a loop so that existing infrastructure
    for loop flow control can be used for the switch, now also dead code
    elimination works properly.
    
    Possible 'continue' call inside a switch needs now special handling
    which is taken care of by detecting continue, breaking out and calling
    continue for the outside loop.
    
    v2: remove one unnecessary ir_expression (Curro)
    
    Fixes following Piglit tests:
    
       fs-exec-after-break.shader_test
       fs-conditional-break.shader_test
    
    No Piglit or es3conform regressions.
    
    Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
    Reviewed-by: Francisco Jerez <currojerez@riseup.net>

:040000 040000 eac8a47066723ff804317ef11bb006dd0bb80d0f b73ed6cc78a66c54d684635f69a358fd54f65929 M      src
Comment 3 Shawn Starr 2014-11-12 04:10:36 UTC
A second bisect, repeated this. So this is the commit that breaks r600 SB compiler.
Comment 4 Emil Velikov 2014-11-18 00:42:26 UTC
*** Bug 86418 has been marked as a duplicate of this bug. ***
Comment 5 Emil Velikov 2014-11-18 00:43:39 UTC
From bug 86418:
I tried launching the Second Life viewer (Kokua 3.7.8 x64) using the latest GIT version of MESA, and noticed the viewer crashes as soon as it's time to render the world. The crash only happens when Basic Shaders are enabled.
Comment 6 MirceaKitsune 2014-11-22 00:54:42 UTC
As mentioned in the related bug report, I can confirm this. I did a GIT bisect and the same commit causes this crash for me too. I'm ready to test the fix once one is in place.
Comment 7 Dave Airlie 2014-11-28 03:37:48 UTC
Created attachment 110153 [details] [review]
fix loops with no repeat.
Comment 8 Shawn Starr 2014-11-30 03:31:15 UTC
Patch causes lockup, discounting the other issues now fixed. This looks to be missing something else.
Comment 9 Dave Airlie 2015-01-27 10:19:35 UTC
should be fixed in master a while back.
Comment 10 MirceaKitsune 2015-02-02 21:58:29 UTC
Confirming that it's fixed, the SL viewer works again with latest MESA GIT master.
Comment 11 Shawn Starr 2015-02-02 22:03:42 UTC
+1 here


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.