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

8234808: jdb quoted option parsing broken #211

Closed
wants to merge 1 commit into from
Closed

8234808: jdb quoted option parsing broken #211

wants to merge 1 commit into from

Conversation

alexmenkov
Copy link

@alexmenkov alexmenkov commented Sep 16, 2020

Migrating this review from the mailing list into a pull request.

Some background:
when jdb launches debuggee process it passes java options from "options" value for CommandLineLaunch connector and forward options specified before command.

The fix solves several discovered issues:

  • proper handling of java options with spaces
  • if both way are used to specify java options, forwarded options override options from "options" value

VMConnection class implements tricky logic for "options" field parsing for JFR needs (handling of single and double quotes). I decided to keep it as is to avoid massive test failures with JFR (there is no test coverage for this functionality and I'm not sure I understand all requirements).


Progress

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

Issue

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/211/head:pull/211
$ git checkout pull/211

Migrating this review from the mailing list into a pull request.

Some background:
when jdb launches debuggee process it passes java options from "options" value for CommandLineLaunch connector and forward options specified before command.

The fix solves several discovered issues:
- proper handling of java options with spaces
- if both way are used to specify java options, forwarded options override options from "options" value

VMConnection class implements tricky logic for "options" field parsing for JFR needs (handling of single and double quotes). I decided to keep it as is to avoid massive test failures with JFR (there is no test coverage for this functionality and I'm not sure I understand all requirements).
@bridgekeeper
Copy link

bridgekeeper bot commented Sep 16, 2020

👋 Welcome back amenkov! 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 Sep 16, 2020
@openjdk
Copy link

openjdk bot commented Sep 16, 2020

@alexmenkov The following label will be automatically applied to this pull request: serviceability.

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 (add|remove) "label" command.

@openjdk openjdk bot added the serviceability serviceability-dev@openjdk.org label Sep 16, 2020
@mlbridge
Copy link

mlbridge bot commented Sep 16, 2020

Webrevs

@plummercj
Copy link
Contributor

Your changes look good, but I don't fully understand your comment about the JFR needs. I do see your special test case:

106                 "com.sun.jdi.CommandLineLaunch:vmexec=java,options='-client' '-XX:+PrintVMOptions'"
107                         + " '-XX:StartFlightRecording=dumponexit=true,maxsize=500M' '-XX:FlightRecorderOptions=repository=jfrrep'"
108                         + ",main=" + targ)

So I assume you are talking about special handling for the above example, but is this really special handling of JFR optins, or just special handling of options that contain suboptions.

@alexmenkov
Copy link
Author

This is handling of the options with suboptions, but researching old changes for this (for JFR needs) I didn't get full understanding what are the requirements. Unfortunately there was no test introduced for the functionality, so I poke command line examples from several old issues.

@plummercj
Copy link
Contributor

plummercj commented Sep 18, 2020

This is handling of the options with suboptions, but researching old changes for this (for JFR needs) I didn't get full understanding what are the requirements. Unfortunately there was no test introduced for the functionality, so I poke command line examples from several old issues.

Is there a bug you can reference in this PR in case someone stumbles across this in the future? Or better yet link them to the CR for this PR.

@alexmenkov
Copy link
Author

The CR has the link to JDK-7154809 (which implemented this functionality)
Unfortunately I don't remember other places I get the information from (the fix is under review for more than 2 monthes)

@plummercj
Copy link
Contributor

The CR has the link to JDK-7154809 (which implemented this functionality)
Unfortunately I don't remember other places I get the information from (the fix is under review for more than 2 monthes)

That's good enough. Thanks.

@openjdk
Copy link

openjdk bot commented Sep 18, 2020

@alexmenkov This change now passes all automated pre-integration checks. In addition to the automated checks, the change must also fulfill all project specific requirements

After integration, the commit message will be:

8234808: jdb quoted option parsing broken

Reviewed-by: cjplummer, sspitsyn
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

Since the source branch of this PR was last updated there have been 137 commits pushed to the master branch:

  • d8921ed: 8247281: migrate ObjectMonitor::_object to OopStorage
  • f800af9: 8241390: 'Deadlock' with VM_RedefineClasses::lock_classes()
  • 2e30ff6: 8253311: Cleanup relocInfo constructors
  • 43be5a3: 8230652: Improve verbose output
  • 5a7390b: 8253418: ZGC: Use pd_ prefix to denote platform dependent code
  • 7e49eae: 8253407: Move max_pow2 from test to src
  • fbfb62d: 8253332: ZGC: Make heap views reservation platform independent
  • dad6edb: 8253321: java.util.Locale.LanguageRange#equals is inconsistent after calling hashCode
  • edc14f9: 8253286: Use expand_exact() instead of expand_at() for fixed requests in G1
  • bba948f: 8253411: [BACKOUT] [REDO] G1 incorrectly limiting young gen size when using the reserve can result in repeated full gcs
  • ... and 127 more: https://git.openjdk.java.net/jdk/compare/e20004d7c170dc9f25f23c0a5dbf3a4c67db9423...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge master into your branch, and then specify the current head hash when integrating, like this: /integrate d8921ed573e58802b9743d520f7bc83dab56e4c7.

➡️ 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 Sep 18, 2020
@alexmenkov
Copy link
Author

/integrate

@openjdk openjdk bot closed this Sep 22, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 22, 2020
@openjdk
Copy link

openjdk bot commented Sep 22, 2020

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

  • d8921ed: 8247281: migrate ObjectMonitor::_object to OopStorage
  • f800af9: 8241390: 'Deadlock' with VM_RedefineClasses::lock_classes()
  • 2e30ff6: 8253311: Cleanup relocInfo constructors
  • 43be5a3: 8230652: Improve verbose output
  • 5a7390b: 8253418: ZGC: Use pd_ prefix to denote platform dependent code
  • 7e49eae: 8253407: Move max_pow2 from test to src
  • fbfb62d: 8253332: ZGC: Make heap views reservation platform independent
  • dad6edb: 8253321: java.util.Locale.LanguageRange#equals is inconsistent after calling hashCode
  • edc14f9: 8253286: Use expand_exact() instead of expand_at() for fixed requests in G1
  • bba948f: 8253411: [BACKOUT] [REDO] G1 incorrectly limiting young gen size when using the reserve can result in repeated full gcs
  • ... and 127 more: https://git.openjdk.java.net/jdk/compare/e20004d7c170dc9f25f23c0a5dbf3a4c67db9423...master

Your commit was automatically rebased without conflicts.

Pushed as commit d1f9b8a.

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

@alexmenkov alexmenkov deleted the jdbQuotes branch October 2, 2020 20:18
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