Skip to content

8333813: Seviceability tests fail due to stderr containing Temporarily processing option UseNotificationThread #19606

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

Closed
wants to merge 1 commit into from

Conversation

plummercj
Copy link
Contributor

@plummercj plummercj commented Jun 7, 2024

Allow warning messages such as the following to appear in stderr:

Java HotSpot(TM) 64-Bit Server VM warning: Temporarily processing option UseNotificationThread; support is scheduled for removal in 24.0

Tested by running CI tier5, which reproduced the issue.


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

Integration blocker

 ⚠️ Title mismatch between PR and JBS for issue JDK-8333813

Issue

  • JDK-8333813: Serviceability tests fail due to stderr containing Temporarily processing option UseNotificationThread (Bug - P4) ⚠️ Title mismatch between PR and JBS. ⚠️ Issue is already resolved. Consider making this a "backport pull request" by setting the PR title to Backport <hash> with the hash of the original commit. See Backports.

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19606

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 7, 2024

👋 Welcome back cjplummer! 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.

@plummercj
Copy link
Contributor Author

/label serviceability

@openjdk
Copy link

openjdk bot commented Jun 7, 2024

@plummercj This change is no longer ready for integration - check the PR body for details.

@openjdk openjdk bot changed the title 8333813 8333813: Seviceability tests fail due to stderr containing Temporarily processing option UseNotificationThread Jun 7, 2024
@openjdk openjdk bot added the serviceability serviceability-dev@openjdk.org label Jun 7, 2024
@openjdk
Copy link

openjdk bot commented Jun 7, 2024

@plummercj
The serviceability label was successfully added.

@plummercj plummercj marked this pull request as ready for review June 7, 2024 20:43
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 7, 2024
@mlbridge
Copy link

mlbridge bot commented Jun 7, 2024

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 7, 2024
Copy link
Contributor

@sspitsyn sspitsyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@@ -176,13 +178,15 @@ public OutputAnalyzer stderrShouldBeEmptyIgnoreWarnings() {

/**
* Verify that the stderr contents of output buffer is empty,
* after filtering out the Hotspot deprecation warning messages
* after filtering out the Hotspot deprecation warning messages,
* and warning messages about removal.
*
* @throws RuntimeException
* If stderr was not empty
*/
public OutputAnalyzer stderrShouldBeEmptyIgnoreDeprecatedWarnings() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be renamed to reflect that it is about VM option warnings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly. It means updating 15 tests. Also need to come up with a new name. Any suggestions?

Copy link
Member

@jaikiran jaikiran Jun 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Chris, given these similary named methods in this class, perhaps we should instead just have one single stderrShouldBeEmptyIgnoring(...) method which takes the messages that should be ignored. Something like:

public static final String VM_WARNING_MSG = ".* VM warning:.*";

public static final String VM_WARNING_DEPRECATED_MSG = ".* VM warning:.* deprecated.*";
...

public OutputAnalyzer stderrShouldBeEmptyIgnoring(String ignoreMsg, String... additionalIgnoreMsgs) {
    String stdErrContent = getStderr().replaceAll(ignoreMsg + "\\R", "");
    if (additionalIgnoreMsgs != null) {
    	for (String additionalIgnore : additionalIgnoreMsgs) {
    		stdErrContent = stdErrContent.replaceAll(additionalIgnore + "\\R", "");
    	}
    }
    if (!stdErrContent.isEmpty()) {
    	reportDiagnosticSummary();
    	throw new RuntimeException("stderr was not empty");
    }
    return this;
}

We make those private fields in OutputAnalyzer public and have the caller pass them:

oa.stderrShouldBeEmptyIgnoring(OutputAnalyzer.VM_WARNING_DEPRECATED_MSG)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems like a lot of busy work and over abstraction for trying to solve a rather trivial issue that already has a very simple solution, but maybe could use a better API name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, would stderrShouldBeEmptyIgnoreVMOptionDeprecations be OK?

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the wrong fix. The tests should not be being run with the problematic option. We should not be hiding that by extending the "ignore warnings" support. This is an issue with our CI task definitions.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Jun 10, 2024
@plummercj plummercj closed this Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfr Pull request is ready for review serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

5 participants