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

Perf::attach() should not throw a java.lang.Exception

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b07

      Backports

        Description

        The Perf::attach() implementation on all operating systems checks, if the perf file has a sensible size (not 0 and a multiple of the page size). If this is not the case, it throws a java.lang.Exception.

        This seems to be the wrong type of exception, especially because the Java method jdk.internal.perf.Perf.attach() does not declare it.

        Instead a java.io.IOException message should be thrown, since it is declared to be thrown by the Java attach() method already and it makes sense semantically.

        Note that this is usually only a temporary situation, after the JVM created the perf file. Barring an unfortunate crash, it will get the correct size shortly afterwards. But it might be one cause for the sporadic hangs of the MonitorVmStartTerminate jtreg test.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                rschmelter Ralf Schmelter
                Reporter:
                rschmelter Ralf Schmelter
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: