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

8265393: VM crashes if both -XX:+RecordDynamicDumpInfo and -XX:SharedArchiveFile options are specified #3599

Closed
wants to merge 3 commits into from

Conversation

yminqi
Copy link
Contributor

@yminqi yminqi commented Apr 21, 2021

Hi, Please review

  1. When the two flags -XX:+RecordDynamicDumpInfo and -XX:SharedArchiveFile used, in
    Arguments::init_shared_archive_paths() :
    if (DynamicDumpSharedSpaces) {
    if (os::same_files(SharedArchiveFile, ArchiveClassesAtExit)) {
    ...
    ArchiveClassesAtExit is NULL.
    C++ does not have a defined behavior of strcmp with strings of NULL. Posix version of os::same_files(const char* file1, const char* file2) calls strcmp without checking input args. This should be same as it is treated on Windows.
  2. JCmdTest.java is fat and possible to cause test timeout. Split JCmdTest.java into two separate Tests: JCmdTestStaticDump.java and JCmdTestDynamicDump.java.
  3. Add a test to check run with -XX:+RecordDynamicDumpInfo and -XX:SharedArchiveFile in JCmdTestDynamicDump.java
    The test does not use utility to create jvm process since it will take testing envs into process, but the way in the test using LingeredApp does not take envs.

Tests: tier1,tier2,tier3,tier4

Thanks
Yumin


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8265393: VM crashes if both -XX:+RecordDynamicDumpInfo and -XX:SharedArchiveFile options are specified

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3599/head:pull/3599
$ git checkout pull/3599

Update a local copy of the PR:
$ git checkout pull/3599
$ git pull https://git.openjdk.java.net/jdk pull/3599/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3599

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3599.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 21, 2021

👋 Welcome back minqi! 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 Apr 21, 2021
@openjdk
Copy link

openjdk bot commented Apr 21, 2021

@yminqi The following label will be automatically applied to this pull request:

  • hotspot

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

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Apr 21, 2021
@mlbridge
Copy link

mlbridge bot commented Apr 21, 2021

Webrevs

Copy link
Member

@iklam iklam left a comment

Choose a reason for hiding this comment

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

There's duplicated code between JCmdTestDynamicDump.java and JCmdTestStaticDump.java. I think these should be moved to a common base class.

Copy link
Member

@calvinccheung calvinccheung 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. I spotted some minor issues in the test code.

Thanks,
Calvin

Comment on lines 34 to 35
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.JDKToolFinder;
Copy link
Member

Choose a reason for hiding this comment

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

Extra import

{"JCmdTestLingeredApp",
"jdk/test/lib/apps/LingeredApp",
"jdk/test/lib/apps/LingeredApp$1"};
private static final String BOOT_CLASSES[] = {"Hello"};
Copy link
Member

Choose a reason for hiding this comment

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

Too many blank spaces before the '='.

Comment on lines 40 to 42
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
Copy link
Member

Choose a reason for hiding this comment

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

Extra import.

Comment on lines 51 to 52
import java.io.InputStreamReader;
import java.io.BufferedReader;
Copy link
Member

Choose a reason for hiding this comment

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

Extra import.

Copy link
Member

@calvinccheung calvinccheung left a comment

Choose a reason for hiding this comment

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

LGTM.

@openjdk
Copy link

openjdk bot commented Apr 22, 2021

@yminqi 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:

8265393: VM crashes if both -XX:+RecordDynamicDumpInfo and -XX:SharedArchiveFile options are specified

Reviewed-by: iklam, ccheung

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 59 new commits pushed to the master branch:

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 Apr 22, 2021
@yminqi
Copy link
Contributor Author

yminqi commented Apr 22, 2021

LGTM.

Thanks for review!

Copy link
Member

@iklam iklam left a comment

Choose a reason for hiding this comment

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

The latest code looks good to me.

@yminqi
Copy link
Contributor Author

yminqi commented Apr 23, 2021

@iklam Thanks for review.

@yminqi
Copy link
Contributor Author

yminqi commented Apr 23, 2021

/integrate

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

openjdk bot commented Apr 23, 2021

@yminqi Since your change was applied there have been 60 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit 20a373a.

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

@yminqi yminqi deleted the jdk-8265393 branch April 23, 2021 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
3 participants