Details
-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b08
-
generic
-
linux
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8327981 | 17.0.12 | Matthias Baesken | P3 | Resolved | Fixed | b01 |
JDK-8330240 | 11.0.24 | Matthias Baesken | P3 | Resolved | Fixed | b01 |
Description
Host system:
$ free -b
total used free shared buff/cache available
Mem: 67174510592 11629891584 32003850240 1106583552 23540768768 53689348096
Swap: 8589930496 3145728 8586784768
I.e. total host swap is '8589930496' (8 GB). Total system memory is 64 GB. The container should not be allowed to exceed the host memory and host swap values (8+64 = 72GB).
Reproducer:
$ sudo podman run --rm -ti -v $(pwd)/build/linux-x86_64-server-fastdebug/images/jdk:/opt/jdk:z --memory 671745105920 --memory-swap 671745105920 fedora:37 /opt/jdk/bin/java -XshowSettings:system -version
Operating System Metrics:
Provider: cgroupv1
Effective CPU Count: 12
CPU Period: 100000us
CPU Quota: -1
CPU Shares: -1
List of Processors, 12 total:
0 1 2 3 4 5 6 7 8 9 10 11
List of Effective Processors, 12 total:
0 1 2 3 4 5 6 7 8 9 10 11
List of Memory Nodes, 1 total:
0
List of Available Memory Nodes, 1 total:
0
Memory Limit: Unlimited
Memory Soft Limit: Unlimited
Memory & Swap Limit: 625.61G
Maximum Processes Limit: 2048
openjdk version "20-internal" 2023-03-21
OpenJDK Runtime Environment (fastdebug build 20-internal-adhoc.sgehwolf.jdk-jdk)
OpenJDK 64-Bit Server VM (fastdebug build 20-internal-adhoc.sgehwolf.jdk-jdk, mixed mode, sharing)
Note the Memory and Swap Limit of '625.61G' It should be 'Unlimited' (=> use host values).
Attachments
Issue Links
- backported by
-
JDK-8327981 [Metrics] Swap memory limit reported incorrectly when too large
- Resolved
-
JDK-8330240 [Metrics] Swap memory limit reported incorrectly when too large
- Resolved
- relates to
-
JDK-8300659 Refactor TestMemoryAwareness to use WhiteBox api for host values
- Resolved
-
JDK-8292541 [Metrics] Reported memory limit may exceed physical machine memory
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/8e6a71d9
-
Commit openjdk/jdk17u-dev/b6325185
-
Commit openjdk/jdk/64ddf953
-
Review openjdk/jdk11u-dev/2644
-
Review openjdk/jdk17u-dev/2285
-
Review openjdk/jdk/12118