TEST: jdk/internal/platform/docker/TestDockerMemoryMetrics.java TEST JDK: /tmp/tone/run/jtreg/binary-download/jdk-repo-binary ACTION: build -- Passed. Build successful REASON: User specified action: run build MetricsMemoryTester TIME: 0.463 seconds messages: command: build MetricsMemoryTester reason: User specified action: run build MetricsMemoryTester started: Thu Oct 31 11:56:48 CST 2024 Test directory: compile: MetricsMemoryTester finished: Thu Oct 31 11:56:49 CST 2024 elapsed time (seconds): 0.463 ACTION: compile -- Passed. Compilation successful REASON: .class file out of date or does not exist TIME: 0.461 seconds messages: command: compile /tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java reason: .class file out of date or does not exist started: Thu Oct 31 11:56:48 CST 2024 Additional options from @modules: --add-modules java.base --add-exports java.base/jdk.internal.platform=ALL-UNNAMED Mode: othervm finished: Thu Oct 31 11:56:49 CST 2024 elapsed time (seconds): 0.461 configuration: javac compilation environment add modules: java.base add exports: java.base/jdk.internal.platform ALL-UNNAMED source path: /tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker /tmp/tone/run/jtreg/jdk-repo/test/lib class path: /tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker /tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d /tmp/tone/run/jtreg/jdk-repo/tmp/classes/test/lib rerun: cd /tmp/tone/run/jtreg/jdk-repo/tmp/scratch && \ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus \ DISPLAY=:7 \ HOME=/root \ JTREG_VERSION=jtreg-7.4.1 \ LANG=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 \ PATH=/bin:/usr/bin:/usr/sbin \ XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop \ XDG_RUNTIME_DIR=/run/user/0 \ XDG_SESSION_CLASS=user \ XDG_SESSION_ID=5 \ XDG_SESSION_TYPE=tty \ /tmp/tone/run/jtreg/binary-download/jdk-repo-binary/bin/javac \ -J-Dtest.vm.opts= \ -J-Dtest.tool.vm.opts= \ -J-Dtest.compiler.opts= \ -J-Dtest.java.opts= \ -J-Dtest.jdk=/tmp/tone/run/jtreg/binary-download/jdk-repo-binary \ -J-Dcompile.jdk=/tmp/tone/run/jtreg/binary-download/jdk-repo-binary \ -J-Dtest.timeout.factor=1.0 \ -J-Dtest.root=/tmp/tone/run/jtreg/jdk-repo/test/jdk \ -J-Dtest.name=jdk/internal/platform/docker/TestDockerMemoryMetrics.java \ -J-Dtest.file=/tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java \ -J-Dtest.src=/tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker \ -J-Dtest.src.path=/tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker:/tmp/tone/run/jtreg/jdk-repo/test/lib \ -J-Dtest.classes=/tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d \ -J-Dtest.class.path=/tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d:/tmp/tone/run/jtreg/jdk-repo/tmp/classes/test/lib \ -J-Dtest.modules=java.base/jdk.internal.platform \ @/tmp/tone/run/jtreg/jdk-repo/tmp/jdk/internal/platform/docker/TestDockerMemoryMetrics.d/compile.0.jta STDOUT: STDERR: ACTION: build -- Passed. Build successful REASON: Named class compiled on demand TIME: 1.008 seconds messages: command: build TestDockerMemoryMetrics reason: Named class compiled on demand started: Thu Oct 31 11:56:49 CST 2024 Test directory: compile: TestDockerMemoryMetrics finished: Thu Oct 31 11:56:50 CST 2024 elapsed time (seconds): 1.008 ACTION: compile -- Passed. Compilation successful REASON: .class file out of date or does not exist TIME: 1.007 seconds messages: command: compile /tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java reason: .class file out of date or does not exist started: Thu Oct 31 11:56:49 CST 2024 Additional options from @modules: --add-modules java.base --add-exports java.base/jdk.internal.platform=ALL-UNNAMED Mode: othervm finished: Thu Oct 31 11:56:50 CST 2024 elapsed time (seconds): 1.007 configuration: javac compilation environment add modules: java.base add exports: java.base/jdk.internal.platform ALL-UNNAMED source path: /tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker /tmp/tone/run/jtreg/jdk-repo/test/lib class path: /tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker /tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d /tmp/tone/run/jtreg/jdk-repo/tmp/classes/test/lib rerun: cd /tmp/tone/run/jtreg/jdk-repo/tmp/scratch && \ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus \ DISPLAY=:7 \ HOME=/root \ JTREG_VERSION=jtreg-7.4.1 \ LANG=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 \ PATH=/bin:/usr/bin:/usr/sbin \ XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop \ XDG_RUNTIME_DIR=/run/user/0 \ XDG_SESSION_CLASS=user \ XDG_SESSION_ID=5 \ XDG_SESSION_TYPE=tty \ /tmp/tone/run/jtreg/binary-download/jdk-repo-binary/bin/javac \ -J-Dtest.vm.opts= \ -J-Dtest.tool.vm.opts= \ -J-Dtest.compiler.opts= \ -J-Dtest.java.opts= \ -J-Dtest.jdk=/tmp/tone/run/jtreg/binary-download/jdk-repo-binary \ -J-Dcompile.jdk=/tmp/tone/run/jtreg/binary-download/jdk-repo-binary \ -J-Dtest.timeout.factor=1.0 \ -J-Dtest.root=/tmp/tone/run/jtreg/jdk-repo/test/jdk \ -J-Dtest.name=jdk/internal/platform/docker/TestDockerMemoryMetrics.java \ -J-Dtest.file=/tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java \ -J-Dtest.src=/tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker \ -J-Dtest.src.path=/tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker:/tmp/tone/run/jtreg/jdk-repo/test/lib \ -J-Dtest.classes=/tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d \ -J-Dtest.class.path=/tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d:/tmp/tone/run/jtreg/jdk-repo/tmp/classes/test/lib \ -J-Dtest.modules=java.base/jdk.internal.platform \ @/tmp/tone/run/jtreg/jdk-repo/tmp/jdk/internal/platform/docker/TestDockerMemoryMetrics.d/compile.1.jta STDOUT: STDERR: Note: /tmp/tone/run/jtreg/jdk-repo/test/lib/jdk/test/lib/Asserts.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [137] REASON: User specified action: run main/timeout=360 TestDockerMemoryMetrics TIME: 26.126 seconds messages: command: main TestDockerMemoryMetrics reason: User specified action: run main/timeout=360 TestDockerMemoryMetrics started: Thu Oct 31 11:56:50 CST 2024 Mode: othervm Additional options from @modules: --add-modules java.base --add-exports java.base/jdk.internal.platform=ALL-UNNAMED finished: Thu Oct 31 11:57:16 CST 2024 elapsed time (seconds): 26.126 configuration: Boot Layer add modules: java.base add exports: java.base/jdk.internal.platform ALL-UNNAMED STDOUT: [COMMAND] docker ps [2024-10-31T03:56:50.358147439Z] Gathering output for process 276799 [ELAPSED: 23 ms] [STDERR] [STDOUT] CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES Full child process STDOUT was saved to docker-stdout-276799.log [2024-10-31T03:56:50.373053333Z] Waiting for completion for process 276799 [2024-10-31T03:56:50.373117740Z] Waiting for completion finished for process 276799 [COMMAND] docker build --no-cache --tag jdk-internal:test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory jdk-internal-test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory [2024-10-31T03:56:50.935315416Z] Gathering output for process 276811 [ELAPSED: 23005 ms] [STDERR] #0 building with "default" instance using docker driver #1 [internal] load .dockerignore #1 transferring context: 2B done #1 DONE 0.0s #2 [internal] load build definition from Dockerfile #2 transferring dockerfile: 108B done #2 DONE 0.0s #3 [internal] load metadata for docker.io/library/ubuntu:latest #3 DONE 15.2s #4 [1/2] FROM docker.io/library/ubuntu:latest@sha256:626ffe58f6e7566e00254b638eb7e0f3b11d4da9675088f4781a50ae288f3322 #4 CACHED #5 [internal] load build context #5 transferring context: 37.70kB 0.0s done #5 DONE 0.0s #6 [2/2] COPY /jdk /jdk #6 DONE 6.0s #7 exporting to image #7 exporting layers #7 exporting layers 1.7s done #7 writing image sha256:5bd583b9ea00276ec7570f25342a8cf5d1e6da4b6ccb9bbee1317c2dbe505d3f done #7 naming to docker.io/library/jdk-internal:test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory done #7 DONE 1.7s [STDOUT] Full child process STDOUT was saved to docker-stdout-276811.log [2024-10-31T03:57:13.939843628Z] Waiting for completion for process 276811 [2024-10-31T03:57:13.939914927Z] Waiting for completion finished for process 276811 ========== NEW TEST CASE: testMemoryLimit, value = 200m [COMMAND] docker run --tty=true --rm --volume /tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d:/test-classes/ --memory=200m jdk-internal:test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory /jdk/bin/java -XX:+ErrorFileToStderr -cp /test-classes/ --add-exports java.base/jdk.internal.platform=ALL-UNNAMED MetricsMemoryTester memory 200m [2024-10-31T03:57:13.941586149Z] Gathering output for process 276947 [ELAPSED: 289 ms] [STDERR] [STDOUT] [memory, 200m] TEST PASSED!!! Full child process STDOUT was saved to docker-stdout-276947.log [2024-10-31T03:57:14.229860165Z] Waiting for completion for process 276947 [2024-10-31T03:57:14.229951555Z] Waiting for completion finished for process 276947 ========== NEW TEST CASE: testMemoryLimit, value = 1g [COMMAND] docker run --tty=true --rm --volume /tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d:/test-classes/ --memory=1g jdk-internal:test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory /jdk/bin/java -XX:+ErrorFileToStderr -cp /test-classes/ --add-exports java.base/jdk.internal.platform=ALL-UNNAMED MetricsMemoryTester memory 1g [2024-10-31T03:57:14.230769394Z] Gathering output for process 277222 [ELAPSED: 277 ms] [STDERR] [STDOUT] [memory, 1g] TEST PASSED!!! Full child process STDOUT was saved to docker-stdout-277222.log [2024-10-31T03:57:14.507611388Z] Waiting for completion for process 277222 [2024-10-31T03:57:14.507674737Z] Waiting for completion finished for process 277222 ========== NEW TEST CASE: testMemoryLimit, value = 500m [COMMAND] docker run --tty=true --rm --volume /tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d:/test-classes/ --memory=500m --volume /sys/fs/cgroup:/cgroup-in:ro jdk-internal:test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory /jdk/bin/java -XX:+ErrorFileToStderr -cp /test-classes/ --add-exports java.base/jdk.internal.platform=ALL-UNNAMED MetricsMemoryTester memory 500m [2024-10-31T03:57:14.508550005Z] Gathering output for process 277369 [ELAPSED: 304 ms] [STDERR] [STDOUT] [memory, 500m] TEST PASSED!!! Full child process STDOUT was saved to docker-stdout-277369.log [2024-10-31T03:57:14.811754937Z] Waiting for completion for process 277369 [2024-10-31T03:57:14.811825938Z] Waiting for completion finished for process 277369 ========== NEW TEST CASE: testMemoryAndSwapLimit, memory = 200m, memory and swap = 1g [COMMAND] docker run --tty=true --rm --volume /tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d:/test-classes/ --memory=200m --memory-swap=1g jdk-internal:test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory /jdk/bin/java -XX:+ErrorFileToStderr -cp /test-classes/ --add-exports java.base/jdk.internal.platform=ALL-UNNAMED MetricsMemoryTester memoryswap 200m 1g [2024-10-31T03:57:14.812876728Z] Gathering output for process 277522 [ELAPSED: 277 ms] [STDERR] [STDOUT] [memoryswap, 200m, 1g] TEST PASSED!!! Full child process STDOUT was saved to docker-stdout-277522.log [2024-10-31T03:57:15.089812426Z] Waiting for completion for process 277522 [2024-10-31T03:57:15.089882716Z] Waiting for completion finished for process 277522 ========== NEW TEST CASE: testMemoryAndSwapLimit, memory = 100m, memory and swap = 200m [COMMAND] docker run --tty=true --rm --volume /tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d:/test-classes/ --memory=100m --memory-swap=200m jdk-internal:test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory /jdk/bin/java -XX:+ErrorFileToStderr -cp /test-classes/ --add-exports java.base/jdk.internal.platform=ALL-UNNAMED MetricsMemoryTester memoryswap 100m 200m [2024-10-31T03:57:15.090771036Z] Gathering output for process 277664 [ELAPSED: 320 ms] [STDERR] [STDOUT] [memoryswap, 100m, 200m] TEST PASSED!!! Full child process STDOUT was saved to docker-stdout-277664.log [2024-10-31T03:57:15.410676772Z] Waiting for completion for process 277664 [2024-10-31T03:57:15.410749819Z] Waiting for completion finished for process 277664 OOM kill disable test not supported with cgroupv2. ========== NEW TEST CASE: testOomKillFlag, oomKillFlag = true [COMMAND] docker run --tty=true --rm --volume /tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d:/test-classes/ --memory=100m jdk-internal:test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory /jdk/bin/java -XX:+ErrorFileToStderr -cp /test-classes/ --add-exports java.base/jdk.internal.platform=ALL-UNNAMED MetricsMemoryTester memory 100m true [2024-10-31T03:57:15.418865609Z] Gathering output for process 277812 [ELAPSED: 281 ms] [STDERR] [STDOUT] [memory, 100m, true] TEST PASSED!!! Full child process STDOUT was saved to docker-stdout-277812.log [2024-10-31T03:57:15.699705258Z] Waiting for completion for process 277812 [2024-10-31T03:57:15.699770551Z] Waiting for completion finished for process 277812 ========== NEW TEST CASE: testMemoryFailCount128m [COMMAND] docker run --tty=true --rm --volume /tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d:/test-classes/ --memory=128m jdk-internal:test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory /jdk/bin/java -XX:+ErrorFileToStderr -Xms128m -Xmx128m -version [2024-10-31T03:57:15.700801238Z] Gathering output for process 277959 [ELAPSED: 274 ms] [STDERR] [STDOUT] openjdk version "24" 2025-03-18 OpenJDK Runtime Environment (build 24) OpenJDK 64-Bit Server VM (build 24, mixed mode, sharing) Full child process STDOUT was saved to docker-stdout-277959.log [COMMAND] docker run --tty=true --rm --volume /tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d:/test-classes/ --memory=128m jdk-internal:test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory /jdk/bin/java -XX:+ErrorFileToStderr -Xmx128m -cp /test-classes/ --add-exports java.base/jdk.internal.platform=ALL-UNNAMED MetricsMemoryTester failcount [2024-10-31T03:57:15.975410358Z] Gathering output for process 278105 [ELAPSED: 399 ms] [STDERR] [STDOUT] [failcount] DEBUG: Bytes allocation length 1: 1048576 Full child process STDOUT was saved to docker-stdout-278105.log [2024-10-31T03:57:16.374189475Z] Waiting for completion for process 278105 [2024-10-31T03:57:16.374254358Z] Waiting for completion finished for process 278105 [COMMAND] docker rmi --force jdk-internal:test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory [2024-10-31T03:57:16.378008354Z] Gathering output for process 278244 [ELAPSED: 13 ms] [STDERR] [STDOUT] Untagged: jdk-internal:test-jdk-internal-platform-docker-TestDockerMemoryMetrics-metrics-memory Deleted: sha256:5bd583b9ea00276ec7570f25342a8cf5d1e6da4b6ccb9bbee1317c2dbe505d3f Full child process STDOUT was saved to docker-stdout-278244.log STDERR: stdout: [[failcount] DEBUG: Bytes allocation length 1: 1048576 ]; stderr: [] exitValue = 137 java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [137] at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:522) at TestDockerMemoryMetrics.testMemoryFailCount(TestDockerMemoryMetrics.java:142) at TestDockerMemoryMetrics.main(TestDockerMemoryMetrics.java:78) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:573) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) at java.base/java.lang.Thread.run(Thread.java:1576) JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [137] JavaTest Message: shutting down test STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [137] rerun: cd /tmp/tone/run/jtreg/jdk-repo/tmp/scratch && \ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus \ DISPLAY=:7 \ HOME=/root \ JTREG_VERSION=jtreg-7.4.1 \ LANG=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 \ PATH=/bin:/usr/bin:/usr/sbin \ XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop \ XDG_RUNTIME_DIR=/run/user/0 \ XDG_SESSION_CLASS=user \ XDG_SESSION_ID=5 \ XDG_SESSION_TYPE=tty \ CLASSPATH=/tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d:/tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker:/tmp/tone/run/jtreg/jdk-repo/tmp/classes/test/lib:/tmp/tone/run/jtreg/jdk-repo/test/lib:/tmp/tone/run/jtreg/jtreg/lib/javatest.jar:/tmp/tone/run/jtreg/jtreg/lib/jtreg.jar \ /tmp/tone/run/jtreg/binary-download/jdk-repo-binary/bin/java \ -Dtest.vm.opts= \ -Dtest.tool.vm.opts= \ -Dtest.compiler.opts= \ -Dtest.java.opts= \ -Dtest.jdk=/tmp/tone/run/jtreg/binary-download/jdk-repo-binary \ -Dcompile.jdk=/tmp/tone/run/jtreg/binary-download/jdk-repo-binary \ -Dtest.timeout.factor=1.0 \ -Dtest.root=/tmp/tone/run/jtreg/jdk-repo/test/jdk \ -Dtest.name=jdk/internal/platform/docker/TestDockerMemoryMetrics.java \ -Dtest.file=/tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java \ -Dtest.src=/tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker \ -Dtest.src.path=/tmp/tone/run/jtreg/jdk-repo/test/jdk/jdk/internal/platform/docker:/tmp/tone/run/jtreg/jdk-repo/test/lib \ -Dtest.classes=/tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d \ -Dtest.class.path=/tmp/tone/run/jtreg/jdk-repo/tmp/classes/jdk/internal/platform/docker/TestDockerMemoryMetrics.d:/tmp/tone/run/jtreg/jdk-repo/tmp/classes/test/lib \ -Dtest.modules=java.base/jdk.internal.platform \ --add-modules java.base \ --add-exports java.base/jdk.internal.platform=ALL-UNNAMED \ com.sun.javatest.regtest.agent.MainWrapper /tmp/tone/run/jtreg/jdk-repo/tmp/jdk/internal/platform/docker/TestDockerMemoryMetrics.d/main.2.jta TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [137] -------------------------------------------------- Test results: failed: 1 Results written to /tmp/tone/run/jtreg/jdk-repo/tmp Error: Some tests failed or other problems occurred. real 0m30.212s user 0m13.375s sys 0m1.563s