-
Bug
-
Resolution: Fixed
-
P4
-
23
-
b02
-
generic
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8339390 | 23.0.2 | Matthias Baesken | P4 | Resolved | Fixed | b01 |
I've just observed a test failure on a cgroups v2 test system where the containers/docker/TestJFREvents.java test failed with:
----------System.err:(12/674)----------
java.lang.Exception: Found free size value is bad
at TestJFREvents.testSwapMemory(TestJFREvents.java:257)
at TestJFREvents.main(TestJFREvents.java:84)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1575)
JavaTest Message: Test threw exception: java.lang.Exception: Found free size value is bad
Upon further looking the test contained this output too:
------------------------->8-------------------
Found freeSize value 6207565824 is bad
------------------------->8-------------------
The events that got recorded looked like this:
===== EventType: jdk.SwapSpace
startTime = 893777303
totalSize = 104857600
freeSize = 6207565824
===== EventType: jdk.SwapSpace
startTime = 895074451
totalSize = 104857600
freeSize = 104857600
Note that this particular test system has 6207565824 as the host free swap size value. However, the totalSize got already recorded as
104857600 (which is the container limit value).
Therefore, the code needs to be fixed to never report more than the totalSize value (which might be a containerized value).
It's not clear to me why we ended up in this state however. Nevertheless this is a bug and should be fixed.JDK-8325139 was the original bug that introduced this.
----------System.err:(12/674)----------
java.lang.Exception: Found free size value is bad
at TestJFREvents.testSwapMemory(TestJFREvents.java:257)
at TestJFREvents.main(TestJFREvents.java:84)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1575)
JavaTest Message: Test threw exception: java.lang.Exception: Found free size value is bad
Upon further looking the test contained this output too:
------------------------->8-------------------
Found freeSize value 6207565824 is bad
------------------------->8-------------------
The events that got recorded looked like this:
===== EventType: jdk.SwapSpace
startTime = 893777303
totalSize = 104857600
freeSize = 6207565824
===== EventType: jdk.SwapSpace
startTime = 895074451
totalSize = 104857600
freeSize = 104857600
Note that this particular test system has 6207565824 as the host free swap size value. However, the totalSize got already recorded as
104857600 (which is the container limit value).
Therefore, the code needs to be fixed to never report more than the totalSize value (which might be a containerized value).
It's not clear to me why we ended up in this state however. Nevertheless this is a bug and should be fixed.
- backported by
-
JDK-8339390 JFR SwapSpace event might read wrong free swap space size
- Resolved
- relates to
-
JDK-8325139 JFR SwapSpace event - add free swap space information on Linux when running in a container environment
- Resolved
- links to
-
Commit openjdk/jdk/de55db23
-
Commit(master) openjdk/jdk23u/ee1f2f6e
-
Review openjdk/jdk/19574
-
Review(master) openjdk/jdk23u/88
(1 links to)