JDK-6915029 : Error: assert(old->req() <= 2,"can't handle more inputs")
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs17
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2010-01-07
  • Updated: 2010-04-02
  • Resolved: 2010-01-21
Related Reports
Duplicate :  
Description
Summary: x64 HS16 b09: assert(old->req() <= 2,"can't handle more inputs") at postaloc.cpp:91

Product:
--------
Build: we saw the problem for the first time on JDK 6u18 b02 Itanium fastdebug (HS16 b09), 
since we do not have Sun's JDK 6u18 fastdebug builds on JLE, we provide results 
of experiments on latest openJDK's x64 JDK 7 b73 debug build 
jdk-7-ea-bin-b73-windows-x64-debug-01_oct_2009.jar (HS17 b02).

Platform: Linux x64, Windows x64
VM Mode: comp
GC Mode: any

Description:
------------
Hotspot Server VM asserts running the test with -Xcomp -XX:MaxInlineSize=120 
options (the test should be compiled with -source 1.4 -target 1.4). 


Reproducer:
-----

import java.lang.reflect.Constructor;
public class Test {
    static Constructor test(Class cls) throws NoSuchMethodException {
        Class[] args= { String.class };
        try {
            return cls.getConstructor(args);
        } catch (NoSuchMethodException e) {}
        return cls.getConstructor(new Class[0]);
    }
    public static void main(final String[] args) {
        try {
            for (int i = 0; i < 100000; i++) {
                Constructor ctor = test(Test.class);
            }
        } catch (NoSuchMethodException e) {}
    }
}


How to reproduce:
-----------------
Run:

> $JAVA_HOME/bin/javac -source 1.4 -target 1.4 Test.java
> $JAVA_HOME/bin/java -server -Xcomp -XX:MaxInlineSize=120 Test

Diagnostics/output:
-------------------

Windows x64-debug:

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=\postaloc.cpp:91
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (C:\BUILD_AREA\jdk7\hotspot\src\share\vm\opto\postaloc.cpp:91), pid=340, tid=3016
#  Error: assert(old->req() <= 2,"can't handle more inputs")
#
# JRE version: 7.0-b73
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0-b02-fastdebug compiled mode windows-amd64 compressed oops)
# An error report file with more information is saved as:
# n:\...\hs_err_pid340.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
VM option 'MaxInlineSize=120'


The assert is reproducible running CTW against junit.jar (junit 3.8.2) with the following command:

>$JAVA_HOME/bin/java -XX:+CompileTheWorld -XX:MaxInlineSize=120 -Xbootclasspath/p:junit.jar
>
> CompileTheWorld : Compiling all classes in N:\...\junit.jar
> VM option '+CompileTheWorld'
> VM option 'MaxInlineSize=120'
> 
> ... (skipped)
> 
> CompileTheWorld (36) : junit/framework/TestSuite
> # To suppress the following error report, specify this argument
> # after -XX: or in .hotspotrc:  SuppressErrorAt=\postaloc.cpp:91
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  Internal Error (C:\BUILD_AREA\jdk7\hotspot\src\share\vm\opto\postaloc.cpp:91), pid=2964, tid=2648
> #  Error: assert(old->req() <= 2,"can't handle more inputs")
> #
> # JRE version: 7.0-b73
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0-b02-fastdebug mixed mode windows-amd64 compressed oops)
> # An error report file with more information is saved as:
> # n:\...\hs_err_pid2964.log
> #
> # If you would like to submit a bug report, please visit:
> #   http://java.sun.com/webapps/bugreport/crash.jsp

The junit.jar is extracted from junit3.8.2.zip from
http://sourceforge.net/projects/junit/files/junit/3.8.2/junit3.8.2.zip/download

Comments
EVALUATION The assert was recently added so this might be a preexisting issue. It looks like a loadP is going dead and being eliminated during post allocate copy removal which really shouldn't happen.
07-01-2010