-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8344671: Few JFR streaming tests fail with application not alive error on MacOS 15 #24085
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
Conversation
…er state prior to sending QUIT, this will obviate early JVM termination when not ready to attach
|
👋 Welcome back larry-cable! A progress list of the required criteria for merging this PR into |
|
@larry-cable 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: 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 252 new commits pushed to the
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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@dholmes-ora, @kevinjwalls) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
@larry-cable The following label will be automatically applied to this pull request:
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. |
dholmes-ora
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for fixing this @larry-cable ! Changes look good. Just a few minor nits.
|
Also you need to remove the ProblemList entries in test/jdk/ProblemList.txt. |
|
jcheck is complaining about some whitespace errors in this PR which is why the RFR email hasn't yet been generated. |
|
Hello Larry, there are a few more whitespace issues that's preventing a RFR from being intiated. |
Webrevs
|
|
I'm guessing it's not going to be easy to introduce a regression test for this change. If so, then the linked JDK issue will need a |
Co-authored-by: David Holmes <62092539+dholmes-ora@users.noreply.github.com>
Co-authored-by: David Holmes <62092539+dholmes-ora@users.noreply.github.com>
Co-authored-by: David Holmes <62092539+dholmes-ora@users.noreply.github.com>
|
|
dholmes-ora
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just a couple of remaining nits. Thanks.
closing the stable door after the horse has bolted Co-authored-by: David Holmes <62092539+dholmes-ora@users.noreply.github.com>
|
/integrate |
|
@larry-cable This pull request has not yet been marked as ready for integration. |
dholmes-ora
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay
kevinjwalls
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
(I'm sure the Linux and MacOS VirtualMachineImpl() attach/timeout loops are almost identical now, not a problem but maybe one day we can de-duplicate them.)
|
/integrate |
|
@kevinjwalls Only the author (@larry-cable) is allowed to issue the |
|
/sponsor |
|
@kevinjwalls The change author (@larry-cable) must issue an |
|
/integrate |
|
@larry-cable |
|
/sponsor |
|
Going to push as commit d979bd8.
Your commit was automatically rebased without conflicts. |
|
@kevinjwalls @larry-cable Pushed as commit d979bd8. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
| */ | ||
| JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_sendQuitTo | ||
| (JNIEnv *env, jclass cls, jint pid) | ||
| JNIEXPORT jboolean JNICALL Java_sun_tools_attach_VirtualMachineImpl_checkCatchesAndSendQuitTo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m just curious - why does this method return a boolean? It looks like the result is never actually checked, and the control flow is managed through exceptions or errors(on both linux and macos).
on both Linux and MacOS libattach utilizes UNIX signal (QUIT) to cause a target JVM (attachee) to create the socket file used as transport for subsequent jcmds (and other attach based interactions) and to listen upon that for such.
it should be noted that the default behavior for QUIT (if not blocked or caught) is to terminate the signalled process.
during the early lifetime of a JVM, its signal handlers are not yet installed, and thus any signal such as QUIT will cause the
default behavior to occur, in this case the JVM will be terminated.
this is why some tests are failing with "not alive"
the "fix" is similar in nature to that already implemented for linux (however using a different OS dependent mechanism to obtain the attachee JVM's signal masks: sysctl(2)).
the method "checkCatchesAndSendQuitTo" will now obtain the "attachee" JVM signal masks and only kill(QUIT) if the
current masks indicate that the JVM's signals are now being handled.
the behavior in the success case is now identical to the previous implementation, however should the target JVM not
become "ready" (signal handlers installed) prior to the attach "timeout" occurring the attach operation will throw an
"AttachNotSupportedException" with a suitable error message.
see also: https://bugs.openjdk.org/browse/JDK-8350766
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24085/head:pull/24085$ git checkout pull/24085Update a local copy of the PR:
$ git checkout pull/24085$ git pull https://git.openjdk.org/jdk.git pull/24085/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24085View PR using the GUI difftool:
$ git pr show -t 24085Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24085.diff
Using Webrev
Link to Webrev Comment