United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6877254 Server vm crashes with "no branches off of store slice" when run with CMS and UseSuperWord (default)
JDK-6877254 : Server vm crashes with "no branches off of store slice" when run with CMS and UseSuperWord (default)

Details
Type:
Bug
Submit Date:
2009-08-29
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
solaris
Sub-Component:
compiler
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs16
Fixed Versions:
hs17 (b03)

Related Reports
Backport:
Backport:
Relates:
Relates:

Sub Tasks

Description
Fastdebug server jvm (both 32bit and 64bit) run with -XX:+UseConcMarkSweepGC crashes with:

#  Internal Error (/export0/BUILD_AREA/jdk6_18/hotspot/src/share/vm/opto/superword.cpp:465), pid=5023, tid=26
#  Error: assert(out == prev || prev == 0,"no branches off of store slice")
#

The failure is reproduced on:
- solaris-i586, solaris-amd64
- solaris-sparc, solaris-sparcv9

No failure in case UseSuperWord is disabled (note, UseSuperWord is enabled by default).

The following testcase could be used to reproduce the failure:

======= Tester.java =======

public class Tester {
    static byte var_1;
    static String var_2 = "";
    static byte var_3;
    static float var_4 = 0;

    public static void main(String[] args)
    {   
        int i = 0;

        for (String var_tmp = var_2; i < 11; var_1 = 0, i++)
        {   
            var_2 = var_2;
            var_4 *= (var_4 *= (var_3 = 0));
        }

        System.out.println("var_1 = " + var_1);
        System.out.println("var_2 = " + var_2);
        System.out.println("var_3 = " + var_3);
        System.out.println("var_4 = " + var_4);
    }
}

                                    

Comments
WORK AROUND

run with -XX:-UseSuperWord
                                     
2009-08-29
EVALUATION

Bug 6636138 actually reported two problems: one is the memory edge problem, another one is 
the same problem as this one, i.e. the storeP node is optimized away, leaving a storeCM with 
a mergemem node as its storeOop. In the fix of 6636138, I just have a point fix to the storeOop
problem (thus incomplete):

+        } else if( out->is_MergeMem() && prev &&
+                   prev->Opcode() == Op_StoreCM && out == prev->in(MemNode::OopStore)) {
+          // Oop store is a MergeMem! This should not happen. Temporarily remove the assertion
+          // for this case because it could not be superwordized anyway.
        } else {
          assert(out == prev || prev == NULL, "no branches off of store slice");
        }

I have opened bug 6816756 to remove useless pre/post barriers which could also solve this problem.
                                     
2009-08-31
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/685e959d09ea
                                     
2009-09-14



Hardware and Software, Engineered to Work Together