JDK-6896727 : nsk/logging/LoggingPermission/LoggingPermission/logperm002 fails with G1, EscapeAnalisys w/o COOPs
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs17
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: x86
  • Submitted: 2009-10-30
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u21Fixed 7Fixed hs17Fixed
Description
The test 
nsk/logging/LoggingPermission/LoggingPermission/logperm002
fails since b71 when G1 and EscapeAnalysis are used. Also for 64 Compressed OOPs should be off.

The reference to variable "testString" from array "params" is null inside try/catch in the for loop (it it ok without try/catch). See sample below.

Here is sample of this issue:
/net/vmsqe.russia/export/jdk/re/7/promoted/ea/b71/binaries//solaris-amd64/bin/java -Xcomp  -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC  -XX:+DoEscapeAnalysis logperm002

Here is short version of test:
======================== logperm002.java ==================

public class logperm002 {

    final static String testString = "abracadabra";
    public static void main(String args[]) {
        String params[][] = {
            {"control", testString}
        };
        for (int i=0; i<params.length; i++) {
            try {
                System.out.println("Params :" + testString + " and " + params[i][0] + ", " + params[i][1]);
            } catch (Exception e) {}    
        }
    }
}

Comments
PUBLIC COMMENTS Problem: EA incorrectly allows to bypass one memory store by an other without updating its users. As result node's memory references could missing on some paths. Solution: When updating input memory edge for a store move its memory users to corresponding memory slices. I also added several asserts to verify correctness of memory splitting during EA.
11-12-2009

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/7fee0a6cc6d4
10-12-2009

EVALUATION EA incorrectly allows to bypass one memory store by an other which could be related. In the test case the store params[0][] = String[2] bypassed the store String[1] = testString; As result testString store is scheduled incorrectly by GCM inside G1 postbarrier code (neart depending StoreCM) since the merge memory after the barrier does not have reference to it.
02-11-2009