-
Bug
-
Resolution: Won't Fix
-
P4
-
8u20
-
x86_64
-
linux
FULL PRODUCT VERSION :
java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux prod-app1.n4systems.net 2.6.18-194.17.1.el5 #1 SMP Mon Sep 20 07:12:06 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
java -heap pauses the VM to count the number and size of interned Strings. This appears to be a new "feature" of the jdk8 jmap tool. I do understand why you would need to pause the VM to obtain an accurate count but question the need for it in the first place.
For medium to large heaps (we run Xms=Xmx=8G) the pause time is very significant (>30 sec) and results in our web application going completely unresponsive during that time.
Personally, I do not really see the need for interned String count/size from the jmap tool. jmap -heap should return highlevel heap information. I would at least enable the interned counts via a flag, to match the default functionality of previous versions of the tool.
REGRESSION. Last worked in version 7u72
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile the application included with this report.
Start the application, wait for the sleep times to start printing and run jmap -heap <pid>
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output should be aprox as follows (steady sleep times):
1001
1001
1000
1001
1001
1001
1001
1001
ACTUAL -
1001
1001
11006 <- Application paused for 11 sec to count interned strings
1001
1001
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.UUID;
public class Main {
public static void main(String[] args) throws InterruptedException {
for (int i = 0; i < 100000; i++) {
UUID.randomUUID().toString().intern();
}
long end, start = System.currentTimeMillis();
while (true) {
Thread.sleep(1000l);
end = System.currentTimeMillis();
System.out.println(end - start);
start = end;
}
}
}
---------- END SOURCE ----------
java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux prod-app1.n4systems.net 2.6.18-194.17.1.el5 #1 SMP Mon Sep 20 07:12:06 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
java -heap pauses the VM to count the number and size of interned Strings. This appears to be a new "feature" of the jdk8 jmap tool. I do understand why you would need to pause the VM to obtain an accurate count but question the need for it in the first place.
For medium to large heaps (we run Xms=Xmx=8G) the pause time is very significant (>30 sec) and results in our web application going completely unresponsive during that time.
Personally, I do not really see the need for interned String count/size from the jmap tool. jmap -heap should return highlevel heap information. I would at least enable the interned counts via a flag, to match the default functionality of previous versions of the tool.
REGRESSION. Last worked in version 7u72
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile the application included with this report.
Start the application, wait for the sleep times to start printing and run jmap -heap <pid>
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output should be aprox as follows (steady sleep times):
1001
1001
1000
1001
1001
1001
1001
1001
ACTUAL -
1001
1001
11006 <- Application paused for 11 sec to count interned strings
1001
1001
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.UUID;
public class Main {
public static void main(String[] args) throws InterruptedException {
for (int i = 0; i < 100000; i++) {
UUID.randomUUID().toString().intern();
}
long end, start = System.currentTimeMillis();
while (true) {
Thread.sleep(1000l);
end = System.currentTimeMillis();
System.out.println(end - start);
start = end;
}
}
}
---------- END SOURCE ----------