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

Need better support for running SA tests on core files

XMLWordPrintable

    • b05

        Right now there are only 3 SA tests that run on core files, and 2 are basically the same:

        open/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java
        open/test/hotspot/jtreg/serviceability/sa/TestJmapCore.java
        open/test/hotspot/jtreg/serviceability/sa/TestJmapCoreMetaspace.java

        We need to add more. I looked into adding some core file support to ClhsdbFindPC and found that it would be a fair amount of work, and much of it replicated from existing tests. We should have support for SA core files tests in common code like SATestUtils.java and LingeredApp.java. The 3 major areas of support I can think of are:

        1. Add a shared API for locating the path to the core file. This includes parsing the output of the crashed process to locate where the core file was saved, and returning this location to the user. This API will be placed in the new CoreUtils class.

        2. Add a shared API to support for adding the "ulimit -c unlimited" prefix to the command that will produce the core file, allowing the overriding of any lower limit so we can be sure the core file will be produced. This API will also be placed in the new CoreUtils class

        3. LingeredApp should include support for producing a core file.

        Note, ClhsdbLauncher already has support for debugging a core file.

        With these three things in place, it should be fairly easy to modify existing ClhsdbLauncher based tests to run both on a live process and on a core file.

              cjplummer Chris Plummer
              cjplummer Chris Plummer
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: