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

jdk/internal/platform/cgroup/TestCgroupMetrics.java - NumberFormatException because of large long values (memory limit_in_bytes)

    Details

    • Subcomponent:
    • Resolved In Build:
      b08
    • CPU:
      generic
    • OS:
      linux

      Backports

        Description

        On some linux x86_64 machine we run in the test “jdk/internal/platform/cgroup/TestCgroupMetrics.java” into this
          NumberFormatException :
         
        java.lang.NumberFormatException: For input string: "18446744073709551615"
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
        at java.base/java.lang.Long.parseLong(Long.java:699)
        at java.base/java.lang.Long.parseLong(Long.java:824)
        at jdk.test.lib.containers.cgroup.MetricsTester.getLongValueFromFile(MetricsTester.java:160)
        at jdk.test.lib.containers.cgroup.MetricsTester.testMemorySubsystem(MetricsTester.java:223)
        at TestCgroupMetrics.main(TestCgroupMetrics.java:50)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:830)

        I checked the number "18446744073709551615" and it seems to be larger than Long.html#MAX_VALUE : A constant holding the maximum value a long can have, 2^63-1 = “9,223,372,036,854,775,807”
        But we have : "18,446,744,073,709,551,615" .

        Looks like from C side (Linux kernel?) we have unsigned long long.
        https://www.redhat.com/archives/libvir-list/2013-December/msg00435.html
        describes it a bit.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mbaesken Matthias Baesken
                  Reporter:
                  mbaesken Matthias Baesken
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: