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

8293325: Minor improvements to macos catch_mach_exception_raise() error handling #10149

Closed
wants to merge 1 commit into from

Conversation

plummercj
Copy link
Contributor

@plummercj plummercj commented Sep 2, 2022

While trying to find a fix for JDK-8288429 (no fix was found), I made some adjustments to the error handling in catch_mach_exception_raise() to make it a bit easier to understand the code, and to provide a more meaningful error message when the soft signal is invalid. This PR is for pushing those changes.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8293325: Minor improvements to macos catch_mach_exception_raise() error handling

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10149/head:pull/10149
$ git checkout pull/10149

Update a local copy of the PR:
$ git checkout pull/10149
$ git pull https://git.openjdk.org/jdk pull/10149/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10149

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10149.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 2, 2022

👋 Welcome back cjplummer! 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 changed the title 8293325 8293325: Minor improvements to macos catch_mach_exception_raise() error handling Sep 2, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 2, 2022
@openjdk
Copy link

openjdk bot commented Sep 2, 2022

@plummercj 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.

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

mlbridge bot commented Sep 2, 2022

Webrevs

@openjdk
Copy link

openjdk bot commented Sep 2, 2022

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

8293325: Minor improvements to macos catch_mach_exception_raise() error handling

Reviewed-by: amenkov, dcubed, sspitsyn

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

  • ac05bc8: 8293293: Move archive heap loading code out of heapShared.cpp
  • e1e6732: 8293319: [C2 cleanup] Remove unused other_path arg in Parse::adjust_map_after_if
  • 5757e21: 8292385: assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out
  • 3993a1f: 8292067: Convert test/sun/management/jmxremote/bootstrap shell tests to java version
  • 83a3408: 8293315: Add back logging for Placeholders
  • b6477fd: 8293288: bootcycle build failure after JDK-8173605
  • 0c6094e: 8293188: x86_64: Introduce stubGenerator_x86_64.hpp
  • 2baeebb: 8293006: sun/tools/jhsdb/JStackStressTest.java fails with "UnalignedAddressException: 8baadbabe"
  • da99e3e: 8289400: Improve com/sun/jdi/TestScaffold error reporting
  • 77e21c5: 8290529: C2: assert(BoolTest(btest).is_canonical()) failure
  • ... and 19 more: https://git.openjdk.org/jdk/compare/07616de00c3e1c305852fcc44df8dadafd0dbf3f...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 Pull request is ready to be integrated label Sep 2, 2022
Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Choose a reason for hiding this comment

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

Definitely an improvement. Thanks!

@dcubed-ojdk
Copy link
Member

Forgot to ask: what kind of testing has been done?

@plummercj
Copy link
Contributor Author

Forgot to ask: what kind of testing has been done?

I ran test/jdk/sun/tools/jhsdb about 300 times, basically enough times to at least reproduce the SIGILL failure once. I don't seem to see the SIGTRAP failure anymore.

ERROR: catch_mach_exception_raise: signal is not SIGSTOP (4)
ERROR: attach: wait_for_exception: catch_mach_exception_raise() got unknown exception type
ERROR: attach: wait_for_exception() failed. Retried 0 times
Error attaching to process: Can't attach to the process. Issues with reception of the exception message.
sun.jvm.hotspot.debugger.DebuggerException: Can't attach to the process. Issues with reception of the exception message.

@dcubed-ojdk
Copy link
Member

Thanks for the testing info!

Copy link
Contributor

@sspitsyn sspitsyn 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 to me.
Thanks,
Serguei

@plummercj
Copy link
Contributor Author

Thanks Dan, Alex, and Serguei!

/integrate

@openjdk
Copy link

openjdk bot commented Sep 3, 2022

Going to push as commit e92b9e4.
Since your change was applied there have been 31 commits pushed to the master branch:

  • 767262e: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr"
  • a366e82: 7113208: Incorrect javadoc on java.net.DatagramPacket.setLength()
  • ac05bc8: 8293293: Move archive heap loading code out of heapShared.cpp
  • e1e6732: 8293319: [C2 cleanup] Remove unused other_path arg in Parse::adjust_map_after_if
  • 5757e21: 8292385: assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out
  • 3993a1f: 8292067: Convert test/sun/management/jmxremote/bootstrap shell tests to java version
  • 83a3408: 8293315: Add back logging for Placeholders
  • b6477fd: 8293288: bootcycle build failure after JDK-8173605
  • 0c6094e: 8293188: x86_64: Introduce stubGenerator_x86_64.hpp
  • 2baeebb: 8293006: sun/tools/jhsdb/JStackStressTest.java fails with "UnalignedAddressException: 8baadbabe"
  • ... and 21 more: https://git.openjdk.org/jdk/compare/07616de00c3e1c305852fcc44df8dadafd0dbf3f...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 3, 2022

@plummercj Pushed as commit e92b9e4.

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

@plummercj plummercj deleted the 8293325_mac_exc branch October 11, 2022 18:59
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
Development

Successfully merging this pull request may close these issues.

4 participants