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

Change default debug options to not use legacy options #307

Merged
merged 1 commit into from
Oct 28, 2020
Merged

Change default debug options to not use legacy options #307

merged 1 commit into from
Oct 28, 2020

Conversation

Thihup
Copy link
Contributor

@Thihup Thihup commented Jul 19, 2020

Using the -Xdebug -Xnoagent -Djava.compiler=NONE causes the OpenJ9 JVM
to run the tests in interpreted mode, thus running them VERY slowly.
In Hotspot JVM these options are ignored.

@Tibor17
Copy link
Contributor

Tibor17 commented Jul 19, 2020

Have you checked this change on Java 1.7 projects too?
We can always alter this feature upon Java version if necessary.

@Thihup
Copy link
Contributor Author

Thihup commented Jul 19, 2020

I haven't tested it in Java 1.7 yet.
However, as far as I remember, these options were introduced in Java 1.5.

@Tibor17
Copy link
Contributor

Tibor17 commented Jul 19, 2020

We have to make sure it is as you say, otherwise the Jenkins build would fail on old Java.
Here the GitHub workflow uses only Java 14 and 3 OS.

@Tibor17
Copy link
Contributor

Tibor17 commented Jul 19, 2020

@Thihup
Do you think this change would not be in a conflict with JaCoCo AGENT?

@Thihup
Copy link
Contributor Author

Thihup commented Jul 19, 2020

@Tibor17 I don't think so. Unfortunately, I don't have an extensive collection of projects with JaCoCo to test, but where I tested it worked fine.
The JaCoCo injects itself as a Java Agent and should not be affected by this change. The main option that can cause some fear is the Xnoagent.
However, in both JVM, the -Xnoagent does nothing, so I don't know where it could break:

Hotspot: https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/arguments.cpp#L2878
OpenJ9: https://github.com/eclipse/openj9/blob/master/runtime/vm/jvminit.c#L162

Do you have something in mind that we should try?

@Tibor17
Copy link
Contributor

Tibor17 commented Jul 19, 2020

Yes, please check it out additionally with jacoco.

@rmannibucau
Copy link
Contributor

Side note: for java 11, localhost:5005 is a saner default which works on java 8 (think 6 but didnt test), would be great to handle it too.

@Thihup
Copy link
Contributor Author

Thihup commented Jul 19, 2020

@rmannibucau Sure. I didn't change to localhost:5005 because it changes the current behavior in JDK <= 8. I don't know if someone connects remotely during debug. If it OK to change I can change right away.

@Tibor17 I've tested and it looks fine

@Tibor17
Copy link
Contributor

Tibor17 commented Jul 19, 2020

@Thihup thx

@rmannibucau
Copy link
Contributor

@Thihup yep but 0.0.0.0:5005 is unsafe and not a good default anyway so guess it is better (if moving to current config as this issue is about) to fix that too properly. Worse case it is still configurable as before.

@Thihup
Copy link
Contributor Author

Thihup commented Jul 20, 2020

@rmannibucau @Tibor17 I've changed to localhost:5005, however, some tests have failed and I couldn't understand why.
Can you have a look?

@Tibor17
Copy link
Contributor

Tibor17 commented Jul 20, 2020

The GH workflows are really crappy. After the MSC has taken it, this CI is unreliable.
The jobs are duplicated, the uploads are skipped on Win and MacOS and I do not see the logs if any build fails.
I was working on it whole weekend and could not fix it.

@Thihup
Copy link
Contributor Author

Thihup commented Jul 23, 2020

Is there something else I should do?

@Tibor17
Copy link
Contributor

Tibor17 commented Sep 27, 2020

@Thihup
yes, we need to have updated documentation. Can you pls update it in debugging.apt.vm?
Pls check the other apt.vm files if there is important information for this task.
Produce only one commit altogether. And then rebase to the latest remote master.
Thx

Using the -Xdebug -Xnoagent -Djava.compiler=NONE causes the OpenJ9 JVM
to run the tests in interpreted mode, thus running them VERY slowly.
In Hotspot JVM these options are ignored.
@Thihup
Copy link
Contributor Author

Thihup commented Oct 28, 2020

Done

@Tibor17
Copy link
Contributor

Tibor17 commented Oct 28, 2020

What did you change 2 hours ago?

@Thihup
Copy link
Contributor Author

Thihup commented Oct 28, 2020

I've just rebased to the latest remote

@Tibor17
Copy link
Contributor

Tibor17 commented Oct 28, 2020

ok, i have created the Jira ticket SUREFIRE-1858.
So i will rename the commit to [SUREFIRE-1858] Change default debug options to not use legacy options and push it and close the ticket as well.

@Tibor17 Tibor17 merged commit d033faa into apache:master Oct 28, 2020
@Tibor17
Copy link
Contributor

Tibor17 commented Oct 28, 2020

@Thihup Thx for contributing!

@Thihup Thihup deleted the debug-options branch October 29, 2020 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants