Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8274506

TestPids.java and TestPidsLimit.java fail with podman run as root

    XMLWordPrintable

Details

    • b18
    • generic
    • linux

    Backports

      Description

        After JDK-8266490 the new tests added with it fail when run via podman as root:

        [COMMAND]
        podman run --tty=true --rm --volume /disk/openjdk/upstream-sources/git/jdk-jdk/JTwork/hotspot_jtreg/classes/containers/docker/TestPids.d:/test-classes/ --pids-limit=-1 jdk-internal:test-pids /jdk/bin/java -Xlog:os+container=trace -cp /test-classes/ -Xbootclasspath/a:/test-classes/whitebox.jar -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Djdk.test.docker.image.name=fedora -Djdk.test.docker.image.version=34 -Djdk.test.container.command=podman PrintContainerInfo


        ----------System.err:(24/1172)----------
         stdout: [];
         stderr: [Error: OCI runtime error: writing file `pids.max`: Invalid argument
        ]
         exitValue = 126

        java.lang.RuntimeException: Expected to get exit value of [0]

                at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:489)
                at jdk.test.lib.containers.docker.Common.run(Common.java:85)
                at TestPids.testPids(TestPids.java:134)
                at TestPids.testPids(TestPids.java:71)
                at TestPids.main(TestPids.java:58)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
                at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.base/java.lang.reflect.Method.invoke(Method.java:568)
                at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
                at java.base/java.lang.Thread.run(Thread.java:833)

        JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected to get exit value of [0]

        [COMMAND]
        podman run --tty=true --rm --pids-limit=-1 jdk-internal:test-pids /jdk/bin/java -XshowSettings:system -Djdk.test.docker.image.name=fedora -Djdk.test.docker.image.version=34 -Djdk.test.container.command=podman -version

        ----------System.err:(22/1095)----------
         stdout: [];
         stderr: [Error: OCI runtime error: writing file `pids.max`: Invalid argument
        ]
         exitValue = 126

        java.lang.RuntimeException: Expected to get exit value of [0]

                at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:489)
                at TestPidsLimit.testPidsLimit(TestPidsLimit.java:116)
                at TestPidsLimit.main(TestPidsLimit.java:56)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
                at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.base/java.lang.reflect.Method.invoke(Method.java:568)
                at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
                at java.base/java.lang.Thread.run(Thread.java:833)

        JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected to get exit value of [0]

        Attachments

          Issue Links

            Activity

              People

                sgehwolf Severin Gehwolf
                sgehwolf Severin Gehwolf
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: