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

SA tests should throw ShippedException rather than report fails when can't generate core file

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 25, 26
    • hotspot
    • None
    • generic
    • linux

      Currrently if the system has no privilege to generate core dump files, the SA test report failure "java.lang.RuntimeException: Output doesn't contain the location of core file.: expected true, was false". I think it's better throw jtreg.ShippedException rather than report test failure, because it's not a jvm bug when there is no privilege to generate core dump files.

      The test log snippet show as below:

      Aborting due to java.lang.OutOfMemoryError: Metaspace
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (debug.cpp:282), pid=168194, tid=168197
      # fatal error: OutOfMemory encountered: Metaspace
      #
      # JRE version: OpenJDK Runtime Environment (26.0) (build 26-internal-9aeacf2d)
      # Java VM: OpenJDK 64-Bit Server VM (26-internal-9aeacf2d, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      # An error report file with more information is saved as:
      # /hygonjdk/yansendao/git/jdk/tmp/scratch/hs_err_pid168194.log
      ]
      STDERR:
      java.lang.RuntimeException: Output doesn't contain the location of core file.: expected true, was false
              at jdk.test.lib.Asserts.fail(Asserts.java:715)
              at jdk.test.lib.Asserts.assertTrue(Asserts.java:545)
              at jdk.test.lib.util.CoreUtils.parseCoreFileLocationFromOutput(CoreUtils.java:211)
              at jdk.test.lib.util.CoreUtils.getCoreFileLocation(CoreUtils.java:108)
              at TestJmapCore.test(TestJmapCore.java:86)
              at TestJmapCore.main(TestJmapCore.java:70)

            syan Sendao Yan
            syan Sendao Yan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: