Swapping checking do not work for MetricsMemoryTester failcount

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: 8, 11, 17, 21, 24, 26
    • Component/s: hotspot
    • Environment:
    • b21
    • x86_64
    • linux

        Test test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java intermittently fails on ubuntu24. the test log snippet:
        [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)

        Reproduce command:
        for i in `seq 100` ; do jtreg -va -nr -w tmp test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java || break ; done

              Assignee:
              Sendao Yan
              Reporter:
              Sendao Yan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: