-
Bug
-
Resolution: Fixed
-
P3
-
6
FULL PRODUCT VERSION :
java version "1.6.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-rc-b63)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0-rc-b63, mixed mode)
FULL OS VERSION :
Linux server1.homelinux.net 2.6.14-1.1644_FC4 #1 Sun Nov 27 03:24:54 EST 2005 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
When +DoEscapeAnalysis is turned on the program crashes.
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just compile and run the attached program with the -XX:+DoEscapeAnalysis enabled. It happens about 50% of the time.
EXPECTED VERSUS ACTUAL BEHAVIOR :
JVM Crash
ERROR MESSAGES/STACK TRACES THAT OCCUR :
1000000000, time=3.111
REPRODUCIBILITY :
This bug can be reproduced often.
---------- BEGIN SOURCE ----------
import java.util.*;
import java.text.*;
import java.io.*;
public class TestEscapeAnalysis
{
private static final int COUNT = 1000000000;
public static void main(String[] args) throws Exception {
test();
test();
test();
}
private static void test() {
int x = 0;
Object lock = new Object();
long ts = System.currentTimeMillis();
for (int i=0; i<COUNT; i++) {
synchronized (lock) {
x ++;
}
}
long te = System.currentTimeMillis();
System.out.println(x+", time="+(double)(te-ts)/1000.0);
}
}
---------- END SOURCE ----------
java version "1.6.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-rc-b63)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0-rc-b63, mixed mode)
FULL OS VERSION :
Linux server1.homelinux.net 2.6.14-1.1644_FC4 #1 Sun Nov 27 03:24:54 EST 2005 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
When +DoEscapeAnalysis is turned on the program crashes.
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just compile and run the attached program with the -XX:+DoEscapeAnalysis enabled. It happens about 50% of the time.
EXPECTED VERSUS ACTUAL BEHAVIOR :
JVM Crash
ERROR MESSAGES/STACK TRACES THAT OCCUR :
1000000000, time=3.111
REPRODUCIBILITY :
This bug can be reproduced often.
---------- BEGIN SOURCE ----------
import java.util.*;
import java.text.*;
import java.io.*;
public class TestEscapeAnalysis
{
private static final int COUNT = 1000000000;
public static void main(String[] args) throws Exception {
test();
test();
test();
}
private static void test() {
int x = 0;
Object lock = new Object();
long ts = System.currentTimeMillis();
for (int i=0; i<COUNT; i++) {
synchronized (lock) {
x ++;
}
}
long te = System.currentTimeMillis();
System.out.println(x+", time="+(double)(te-ts)/1000.0);
}
}
---------- END SOURCE ----------