Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-8310191: com/sun/tools/attach/warnings/DynamicLoadWarningTest.java second failure on AIX #14515

Closed
wants to merge 2 commits into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Jun 16, 2023

After push of JDK-8307478 , the following test started to fail on AIX :
com/sun/tools/attach/warnings/DynamicLoadWarningTest.java ; failure output :

java.lang.RuntimeException: 'WARNING: A JVM TI agent has been loaded dynamically' found in stderr
at jdk.test.lib.process.OutputAnalyzer.stderrShouldNotContain(OutputAnalyzer.java:320)
at DynamicLoadWarningTest$AppRunner.stderrShouldNotContain(DynamicLoadWarningTest.java:308)
at DynamicLoadWarningTest.testLoadOneJvmtiAgent(DynamicLoadWarningTest.java:138)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)

Should be handled in a similar way to JDK-8309549 .


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8310191: com/sun/tools/attach/warnings/DynamicLoadWarningTest.java second failure on AIX (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14515/head:pull/14515
$ git checkout pull/14515

Update a local copy of the PR:
$ git checkout pull/14515
$ git pull https://git.openjdk.org/jdk.git pull/14515/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14515

View PR using the GUI difftool:
$ git pr show -t 14515

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14515.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 16, 2023

👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 16, 2023
@openjdk
Copy link

openjdk bot commented Jun 16, 2023

@MBaesken The following labels will be automatically applied to this pull request:

  • core-libs
  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Jun 16, 2023
@mlbridge
Copy link

mlbridge bot commented Jun 16, 2023

Webrevs

@AlanBateman
Copy link
Contributor

Yes, same issue as JDK-8309549.

Would you mind grouping the two tests that load the same agent library twice? That would mean the isAIX check is in one place, e.g.

diff --git a/test/jdk/com/sun/tools/attach/warnings/DynamicLoadWarningTest.java b/test/jdk/com/sun/tools/attach/warnings/DynamicLoadWarningTest.java
index 4e341b4e274..970bade3530 100644
--- a/test/jdk/com/sun/tools/attach/warnings/DynamicLoadWarningTest.java
+++ b/test/jdk/com/sun/tools/attach/warnings/DynamicLoadWarningTest.java
@@ -119,23 +119,23 @@ class DynamicLoadWarningTest {
         test().whenRunning(loadJvmtiAgent1)
                 .stderrShouldContain(JVMTI_AGENT_WARNING);
 
-        // dynamically load loadJvmtiAgent1 twice, should be one warning on platforms
-        // that can detect if an agent library was previously loaded
-        if (!Platform.isAix()) {
-            test().whenRunning(loadJvmtiAgent1)
-                    .whenRunning(loadJvmtiAgent1)
-                    .stderrShouldContain(JVMTI_AGENT_WARNING, 1);
-        }
-
         // opt-in via command line option to allow dynamic loading of agents
         test().withOpts("-XX:+EnableDynamicAgentLoading")
                 .whenRunning(loadJvmtiAgent1)
                 .stderrShouldNotContain(JVMTI_AGENT_WARNING);
 
-        // start loadJvmtiAgent1 via the command line, then dynamically load loadJvmtiAgent1
-        test().withOpts("-agentpath:" + jvmtiAgentPath1)
-                .whenRunning(loadJvmtiAgent1)
-                .stderrShouldNotContain(JVMTI_AGENT_WARNING);
+        // test behavior on platforms that can detect if an agent library was previously loaded
+        if (!Platform.isAix()) {
+            // start loadJvmtiAgent1 via the command line, then dynamically load loadJvmtiAgent1
+            test().withOpts("-agentpath:" + jvmtiAgentPath1)
+                    .whenRunning(loadJvmtiAgent1)
+                    .stderrShouldNotContain(JVMTI_AGENT_WARNING);
+
+            // dynamically load loadJvmtiAgent1 twice, should be one warning
+            test().whenRunning(loadJvmtiAgent1)
+                    .whenRunning(loadJvmtiAgent1)
+                    .stderrShouldContain(JVMTI_AGENT_WARNING, 1);
+        }
     }

@MBaesken
Copy link
Member Author

Hi Alan, I adjusted / simplified the coding.

@AlanBateman
Copy link
Contributor

Hi Alan, I adjusted / simplified the coding.

Thanks for taking the suggestion.

@openjdk
Copy link

openjdk bot commented Jun 16, 2023

@MBaesken This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8310191: com/sun/tools/attach/warnings/DynamicLoadWarningTest.java second failure on AIX

Reviewed-by: alanb, cjplummer

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 12 new commits pushed to the master branch:

  • 959a61f: 8310259: Pin msys2/setup-msys2 github action to a specific commit
  • bcc4d36: 8309511: Regression test ExtraImportSemicolon.java refers to the wrong bug
  • 71baf00: 8309605: StubRoutines are not used by SA
  • 16134f4: 8310211: serviceability/jvmti/thread/GetStackTrace/getstacktr03/getstacktr03.java failing
  • d6c2ee3: 8310054: ScrollPane insets are incorrect
  • 4eb4f20: 8308808: SunMSCAPI public keys returns internal key array
  • 53abba3: 8309499: javac fails to report compiler.err.no.java.lang with annotation processing enabled
  • cf8d0b0: 8309964: Use directed inheritDoc for javax.lang.model API
  • a45f929: 8310076: Reduce inclusion of bytecodeStream.hpp
  • 21f6d83: 8309471: Limit key characters in static index pages
  • ... and 2 more: https://git.openjdk.org/jdk/compare/fb024fde7bffde29dd3ec1ae26d04f4ccd64ad7e...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 16, 2023
@AlanBateman
Copy link
Contributor

/label remove core-libs

@openjdk openjdk bot removed the core-libs core-libs-dev@openjdk.org label Jun 17, 2023
@openjdk
Copy link

openjdk bot commented Jun 17, 2023

@AlanBateman
The core-libs label was successfully removed.

@MBaesken
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 19, 2023

Going to push as commit 6a63bad.
Since your change was applied there have been 15 commits pushed to the master branch:

  • 6473a7d: 8310107: os::trace_page_sizes_for_requested_size should name alignment as requested page size
  • 02aaab1: 8310126: C1: Missing receiver null check in Reference::get intrinsic
  • 492d25c: 8309601: [JVMCI] AMD64#getLargestStorableKind returns incorrect mask kind
  • 959a61f: 8310259: Pin msys2/setup-msys2 github action to a specific commit
  • bcc4d36: 8309511: Regression test ExtraImportSemicolon.java refers to the wrong bug
  • 71baf00: 8309605: StubRoutines are not used by SA
  • 16134f4: 8310211: serviceability/jvmti/thread/GetStackTrace/getstacktr03/getstacktr03.java failing
  • d6c2ee3: 8310054: ScrollPane insets are incorrect
  • 4eb4f20: 8308808: SunMSCAPI public keys returns internal key array
  • 53abba3: 8309499: javac fails to report compiler.err.no.java.lang with annotation processing enabled
  • ... and 5 more: https://git.openjdk.org/jdk/compare/fb024fde7bffde29dd3ec1ae26d04f4ccd64ad7e...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 19, 2023
@openjdk openjdk bot closed this Jun 19, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 19, 2023
@openjdk
Copy link

openjdk bot commented Jun 19, 2023

@MBaesken Pushed as commit 6a63bad.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
3 participants