-
Bug
-
Resolution: Fixed
-
P2
-
18, 19
-
b17
Seen this in many configurations in current testing:
$ build/linux-x86_64-server-fastdebug/images/jdk/bin/java -XX:+AlwaysPreTouch -Xmx2g -XX:+UseLargePages -XX:LargePageSizeInBytes=1g -XX:+UseParallelGC
OpenJDK 64-Bit Server VM warning: Failed to reserve and commit memory. req_addr: 0x0000000080000000 bytes: 2147483648 page size: 1073741824 (errno = 12).
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f7f557f7cda, pid=3987099, tid=3987101
#
# JRE version: (19.0) (fastdebug build )
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 19-internal+0-adhoc.shade.jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, parallel gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x1600cda] os::pretouch_memory(void*, void*, unsigned long)+0x1ea
Bisection points toJDK-8272807.
I believe this is due to LargePages allocation failure. The new pretouching code still rounds down to still-large page size, which touches memory out of heap bounds. This looks to be a problem with Parallel GC (and maybe others), not G1.
See, adding this assert:
for ( ; true; cur += page_size) {
assert(cur >= start, "sanity: " PTR_FORMAT " in " PTR_FORMAT " ... " PTR_FORMAT, p2i(cur), p2i(start), p2i(end));
Atomic::add(reinterpret_cast<int*>(cur), 0, memory_order_relaxed);
if (cur >= last) break;
}
...crashes with:
# Internal Error (/home/shade/trunks/jdk/src/hotspot/share/runtime/os.cpp:1766), pid=4062942, tid=4062944
# assert(cur >= start) failed: sanity: 0x00000000c0000000 in 0x00000000d5600000 ... 0x00000000f5800000
$ build/linux-x86_64-server-fastdebug/images/jdk/bin/java -XX:+AlwaysPreTouch -Xmx2g -XX:+UseLargePages -XX:LargePageSizeInBytes=1g -XX:+UseParallelGC
OpenJDK 64-Bit Server VM warning: Failed to reserve and commit memory. req_addr: 0x0000000080000000 bytes: 2147483648 page size: 1073741824 (errno = 12).
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f7f557f7cda, pid=3987099, tid=3987101
#
# JRE version: (19.0) (fastdebug build )
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 19-internal+0-adhoc.shade.jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, parallel gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x1600cda] os::pretouch_memory(void*, void*, unsigned long)+0x1ea
Bisection points to
I believe this is due to LargePages allocation failure. The new pretouching code still rounds down to still-large page size, which touches memory out of heap bounds. This looks to be a problem with Parallel GC (and maybe others), not G1.
See, adding this assert:
for ( ; true; cur += page_size) {
assert(cur >= start, "sanity: " PTR_FORMAT " in " PTR_FORMAT " ... " PTR_FORMAT, p2i(cur), p2i(start), p2i(end));
Atomic::add(reinterpret_cast<int*>(cur), 0, memory_order_relaxed);
if (cur >= last) break;
}
...crashes with:
# Internal Error (/home/shade/trunks/jdk/src/hotspot/share/runtime/os.cpp:1766), pid=4062942, tid=4062944
# assert(cur >= start) failed: sanity: 0x00000000c0000000 in 0x00000000d5600000 ... 0x00000000f5800000
- duplicates
-
JDK-8259496 Parallel GC insists on using large pages although it failed to use them
- Closed
- relates to
-
JDK-8324817 Parallel GC does not pre-touch all heap pages when AlwaysPreTouch enabled and large page disabled
- Resolved
-
JDK-8259496 Parallel GC insists on using large pages although it failed to use them
- Closed
-
JDK-8298642 ParallelGC -XX:+UseNUMA eden spaces allocated on wrong node
- Resolved
-
JDK-8272807 Permit use of memory concurrent with pretouch
- Resolved
(2 links to)