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

JDK-8297184: Test runtime/ErrorHandling/TestSigInfoInHsErrFile.java is failing #11202

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented Nov 17, 2022

https://bugs.openjdk.org/browse/JDK-8296906 added a new test that artificially crashes the VM with a known signal/code/crashaddress and checks that we see those informations precisely in the hs-err file. It did this for SIGSEGV and SIGFPE.

SIGFPE, however, is problematic. We fall back to pthread_kill() if we cannot trigger a real FPE fault. In that case the code will be SI_KILL and the sending frame will be pthread_kill().

Since we cannot guarantee that a real signal is sent, I opted for just removing the part of the test that tests FPE. The other part, testing SIGSEGV, is enough to cover what the test should cover.

update

I also added a fix for the second error mode we see, where we don't crash with SIGSEGV SEGV_MAPERR but SIGSEGV ACCERR.


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-8297184: Test runtime/ErrorHandling/TestSigInfoInHsErrFile.java is failing

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11202

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

Using diff file

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

@tstuefe tstuefe changed the title JDK-8297184 Test runtime/ErrorHandling/TestSigInfoInHsErrFile.java is failing JDK-8297184: Test runtime/ErrorHandling/TestSigInfoInHsErrFile.java is failing Nov 17, 2022
@tstuefe tstuefe force-pushed the JDK-8297184-TestSigInfoInHsErrFile-failing branch from 550a178 to d51eada Compare November 17, 2022 08:22
@bridgekeeper
Copy link

bridgekeeper bot commented Nov 17, 2022

👋 Welcome back stuefe! 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
Copy link

openjdk bot commented Nov 17, 2022

@tstuefe The following label will be automatically applied to this pull request:

  • hotspot-runtime

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 hotspot-runtime hotspot-runtime-dev@openjdk.org label Nov 17, 2022
@tstuefe tstuefe marked this pull request as ready for review November 17, 2022 09:35
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 17, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 17, 2022

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

I thought you might just drop the # from the match pattern, but removing the SIGFPE case seems okay too.

One typo below.

Thanks.

@@ -120,7 +67,7 @@ static void testWithSEGV() throws Exception {
patterns.add(Pattern.compile("# *Problematic frame.*"));
patterns.add(Pattern.compile("# .*VMError::controlled_crash.*"));

// Crash address: see VMError::_segfault_address
// Crash address: see VMError::_segfault_address - carefully choosen to give us a SEGV_MAPERR
Copy link
Member

Choose a reason for hiding this comment

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

s/choosen/chosen/

@openjdk
Copy link

openjdk bot commented Nov 17, 2022

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

8297184: Test runtime/ErrorHandling/TestSigInfoInHsErrFile.java is failing

Reviewed-by: dcubed, coleenp

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

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 Nov 17, 2022
@dholmes-ora
Copy link
Member

@tstuefe I am also seeing the SIGSEGV test failing on macos.

siginfo: si_signo: 11 (SIGSEGV), si_code: 2 (SEGV_ACCERR), si_addr: 0x0000000000000400

It isn't MAPERR.

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Test is broken for SEGV too.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Nov 17, 2022
@openjdk-notifier
Copy link

@tstuefe Please do not rebase or force-push to an active PR as it invalidates existing review comments. All changes will be squashed into a single commit automatically when integrating. See OpenJDK Developers’ Guide for more information.

@tstuefe
Copy link
Member Author

tstuefe commented Nov 17, 2022

@tstuefe Please do not rebase or force-push to an active PR as it invalidates existing review comments. All changes will be squashed into a single commit automatically when integrating. See OpenJDK Developers’ Guide for more information.

I don't understand this nagging. I did not force push.

@dholmes-ora : I broadened the pattern to encompass all possible SEGV si_codes. Originally I was hoping my new crash address was guaranteed to be a mapping error. An alternative would have been to reserve+mprotect a poison page, then it would be guaranteed ACCERR, but that seemed too much hassle.

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.

Thumbs up.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 17, 2022
@dcubed-ojdk
Copy link
Member

I'm submitting an urgent Mach5 Tier1 job for this PR...

@dcubed-ojdk
Copy link
Member

open_test_hotspot_jtreg_tier1_runtime has passed for
linux-aarch64-debug, linux-x64-debug, macosx-aarch64-debug, windows-x64-debug

macosx-x64-debug has not yet run.

I checked the Mach5 history and it looks like this test has only failed on linux-aarch64
and macosx-aarch64.

Since these failures are occurring in Tier[134] (so far), I think you can integrate now.

Copy link
Contributor

@coleenp coleenp 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. I think you can check this in since the carefully choosen comment is removed. Edit: I didn't see Dan's comment. Wait for his OK.

@dcubed-ojdk
Copy link
Member

@coleenp - I've already said that this can be integrated.

@tstuefe
Copy link
Member Author

tstuefe commented Nov 17, 2022

@dholmes-ora @dcubed-ojdk @coleenp thanks for the reviews. Sorry for the inconvenience!

/integrate

@openjdk
Copy link

openjdk bot commented Nov 17, 2022

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 17, 2022

@tstuefe Pushed as commit a768fed.

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

@dcubed-ojdk
Copy link
Member

My Mach5 Tier1 job finished with no test failures and no task failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
4 participants