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

8260431: com/sun/jdi/JdbOptions.java failed with "RuntimeException: 'prop[boo] = >foo<' missing from stdout/stderr" #2322

Closed
wants to merge 3 commits into from

Conversation

@alexmenkov
Copy link

@alexmenkov alexmenkov commented Jan 30, 2021

The test expects debuggee output in jdb output stream.
But jdb redirects debuggee output asynchronously so sometimes it's incomplete or mixed with jdb output.
The fix updates debuggee to print output to file and read/analyze it after jdb (and debuggee) exits.


Progress

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

Issue

  • JDK-8260431: com/sun/jdi/JdbOptions.java failed with "RuntimeException: 'prop[boo] = >foo<' missing from stdout/stderr"

Reviewers

Download

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 30, 2021

👋 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 label Jan 30, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jan 30, 2021

@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 pull request command.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 30, 2021

Webrevs

private static final String targ = JbdOptionsTarg.class.getName();
private static final String outFilename = UUID.randomUUID().toString() + ".out";
private static final Path outPath = Paths.get(outFilename);
private static final String targ = JbdOptionsTarg.class.getName() + " " + outFilename;
Copy link
Contributor

@plummercj plummercj Feb 2, 2021

Choose a reason for hiding this comment

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

Is there a reason you added outFilename to targ rather than just add outFilename when you pass the argument string to test().

Copy link
Author

@alexmenkov alexmenkov Feb 2, 2021

Choose a reason for hiding this comment

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

Just to minimize the changes as outFilename is required argument for target app.

Copy link
Contributor

@plummercj plummercj Feb 2, 2021

Choose a reason for hiding this comment

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

I think targ is typically the classfile name of the target debuggee, so I think it would be best to keep the output filename separate from it to avoid confusion.

Copy link
Contributor

@sspitsyn sspitsyn left a comment

Hi Alex,
It looks good to me.
I liked previous variant as well.
It looks a little bit strange to duplicate the same pattern on many lines:
"targ + outFileArg"
Thanks,
Serguei

@openjdk
Copy link

@openjdk openjdk bot commented Feb 3, 2021

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

8260431: com/sun/jdi/JdbOptions.java failed with "RuntimeException: 'prop[boo] = >foo<' missing from stdout/stderr"

Reviewed-by: sspitsyn, 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 180 new commits pushed to the master branch:

  • bf47a47: 8261282: Lazy initialization of built-in ICC_Profile/ColorSpace classes is too lazy
  • f4cfd75: 8261510: Use RFC numbers and protocol titles in sun.security.ssl.SSLExtension comments
  • 75c8489: 8261604: ProblemList jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java
  • 1740de2: 8261297: NMT: Final report should use scale 1
  • c342323: 8261431: SA: Add comments about load address of executable
  • 4a72cea: 8261509: Move per-thread StackWatermark from Thread to JavaThread class
  • eef86a8: 8261029: Code heap page sizes not traced correctly using os::trace_page_sizes
  • 0a89987: 8240281: Remove failing assertion code when selecting first memory state in SuperWord::co_locate_pack
  • 9fed604: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks
  • 8b6ab31: 8261418: Reduce decoder creation overheads for sun.nio.cs.ext Charsets
  • ... and 170 more: https://git.openjdk.java.net/jdk/compare/f5ca8385abf22678fdc9c965c60d714d20f54100...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 label Feb 3, 2021

public static void main(String[] args) throws Exception {
// the simplest case
test("-connect",
"com.sun.jdi.CommandLineLaunch:vmexec=java,options=-client -XX:+PrintVMOptions,main=" + targ)
"com.sun.jdi.CommandLineLaunch:vmexec=java,options=-client -XX:+PrintVMOptions,main=" + targ + outFileArg)
Copy link
Contributor

@plummercj plummercj Feb 3, 2021

Choose a reason for hiding this comment

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

Not to be too nit picky, but I was assuming that the " " would be here and not in outFileName. That would make it much more obvious how the args are separated (eg we are not using commas here).

Copy link
Author

@alexmenkov alexmenkov Feb 11, 2021

Choose a reason for hiding this comment

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

@plummercj are you ok with the latest version?

Copy link
Contributor

@plummercj plummercj Feb 11, 2021

Choose a reason for hiding this comment

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

@plummercj are you ok with the latest version?

Yes. thank you

@alexmenkov
Copy link
Author

@alexmenkov alexmenkov commented Feb 11, 2021

/integrate

@openjdk openjdk bot closed this Feb 11, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Feb 11, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 11, 2021

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

  • bf47a47: 8261282: Lazy initialization of built-in ICC_Profile/ColorSpace classes is too lazy
  • f4cfd75: 8261510: Use RFC numbers and protocol titles in sun.security.ssl.SSLExtension comments
  • 75c8489: 8261604: ProblemList jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java
  • 1740de2: 8261297: NMT: Final report should use scale 1
  • c342323: 8261431: SA: Add comments about load address of executable
  • 4a72cea: 8261509: Move per-thread StackWatermark from Thread to JavaThread class
  • eef86a8: 8261029: Code heap page sizes not traced correctly using os::trace_page_sizes
  • 0a89987: 8240281: Remove failing assertion code when selecting first memory state in SuperWord::co_locate_pack
  • 9fed604: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks
  • 8b6ab31: 8261418: Reduce decoder creation overheads for sun.nio.cs.ext Charsets
  • ... and 170 more: https://git.openjdk.java.net/jdk/compare/f5ca8385abf22678fdc9c965c60d714d20f54100...master

Your commit was automatically rebased without conflicts.

Pushed as commit 60a2072.

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

@alexmenkov alexmenkov deleted the JdbOptions branch Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants