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

serviceability/dcmd/jvmti/AttachFailed/AttachNoEntry.java failing on Windows

    Details

    • Subcomponent:
    • Introduced In Version:
      10
    • Resolved In Build:
      b36
    • OS:
      windows

      Description

      This test is new with the changes for JDK-8165736. It looks like it always will fail on Windows:

      ---------------- stdout ----------------
      32164:
      _Agent_OnAttach@12 is not available in C:\\ade\\mesos\\work_dir\\jib-master\\install\\jdk10-hs.384\\windows-x64-debug.test\\hotspot\\jtreg\\native\\HasNoEntryPoint.dll
      ---------------- stderr ----------------
      ----------------------------------------
      test AttachFailedTestBase.cli(): failure
      java.lang.RuntimeException: java.lang.RuntimeException: 'Agent_OnAttach is not available' missing from stdout/stderr ```

      We have a mismatch with what we expect the missing exported symbol to be called on Windows.

      For Windows we have:

      #define AGENT_ONATTACH_SYMBOLS {"_Agent_OnAttach@12",
      "Agent_OnAttach"}

      And For linux we have:

      #define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}

      And then shared code is:

        const char *on_attach_symbols[] = AGENT_ONATTACH_SYMBOLS;
            st->print_cr("%s is not available in %s",
                         on_attach_symbols[0], agent_lib->name());

      And the test has:

                  output.shouldContain("Agent_OnAttach is not available");

      So on Windows we will always print out _Agent_OnAttach@12 for the missing symbol instead of Agent_OnAttach, which is what the test is looking for. The test should either check for both symbols or use a pattern that will capture both symbols.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cjplummer Chris Plummer
                Reporter:
                cjplummer Chris Plummer
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: