-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b03
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8045493 | 8u25 | Shanliang Jiang | P3 | Resolved | Fixed | b01 |
JDK-8033368 | 8u20 | Shanliang Jiang | P3 | Resolved | Fixed | b01 |
JDK-8053731 | emb-8u26 | Shanliang Jiang | P3 | Resolved | Fixed | b17 |
The test MemoryManagement times out when the G1 GC is used. The culprit is the following line:
chunkSize = (mu.getMax() - mu.getUsed()) / 20;
G1's pools return -1 for their max size (which according to the spec means undefined). However, the test does not check for that which causes chunkSize to be calculated as 0. This results in the thread that's supposed to do a lot of allocations to get into an infinite loop (hence the time-out).
To be extra sure the problem is as described above, I hard-coded chunkSize to be 1M and the rest run successfully.
chunkSize = (mu.getMax() - mu.getUsed()) / 20;
G1's pools return -1 for their max size (which according to the spec means undefined). However, the test does not check for that which causes chunkSize to be calculated as 0. This results in the thread that's supposed to do a lot of allocations to get into an infinite loop (hence the time-out).
To be extra sure the problem is as described above, I hard-coded chunkSize to be 1M and the rest run successfully.
- backported by
-
JDK-8033368 java/lang/management/MemoryMXBean/MemoryManagement is not robust when getMax() returns -1
-
- Resolved
-
-
JDK-8045493 java/lang/management/MemoryMXBean/MemoryManagement is not robust when getMax() returns -1
-
- Resolved
-
-
JDK-8053731 java/lang/management/MemoryMXBean/MemoryManagement is not robust when getMax() returns -1
-
- Resolved
-