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

8312014: [s390x] TestSigInfoInHsErrFile.java Failure #14888

Closed
wants to merge 10 commits into from

Conversation

sid8606
Copy link
Member

@sid8606 sid8606 commented Jul 14, 2023

All faults on s390x give the address only on page granularity.
e.g. if you use 0x123456 as fail address you get si_addr = 0x123000


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-8312014: [s390x] TestSigInfoInHsErrFile.java Failure (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14888

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 14, 2023

👋 Welcome back sid8606! 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 Pull request is ready for review label Jul 14, 2023
@openjdk
Copy link

openjdk bot commented Jul 14, 2023

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

  • hotspot

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 hotspot-dev@openjdk.org label Jul 14, 2023
@mlbridge
Copy link

mlbridge bot commented Jul 14, 2023

@@ -207,7 +207,7 @@ class VMError : public AllStatic {
DEBUG_ONLY(static void controlled_crash(int how);)

// Non-null address guaranteed to generate a SEGV mapping error on read, for test purposes.
static constexpr intptr_t segfault_address = AIX_ONLY(-1) NOT_AIX(1 * K);
static constexpr intptr_t segfault_address = AIX_ONLY(-1) NOT_AIX(4 * K);
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure ARM & RISC-V will be happy with these changes, Maybe using S390_ONLY will be appropriate(?)

Copy link
Member

@tstuefe tstuefe Jul 14, 2023

Choose a reason for hiding this comment

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

Yes. And before we start cascading ifdefs here, please spread this definition out into the respective platform files. For the s390 version, could you please add a clear comment describing the reasoning? Do all s390 linux variants using 4K pages - is it valid to hardcode that?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for the reviews @tstuefe and @offamitkumar . The all linux variants on s390x uses 4K page setting.
I am making changes to move segfault_address to platform files.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for the reviews @tstuefe and @offamitkumar . The all linux variants on s390x uses 4K page setting.
I am making changes to move segfault_address to platform files.

Thank you @sid8606 .

Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

I'm surprised that not much more breaks. We rely a lot on si_addr. Are we sure this is not a kernel bug on s390? Any chance to get this behavior changed on the kernel level?

@@ -207,7 +207,7 @@ class VMError : public AllStatic {
DEBUG_ONLY(static void controlled_crash(int how);)

// Non-null address guaranteed to generate a SEGV mapping error on read, for test purposes.
static constexpr intptr_t segfault_address = AIX_ONLY(-1) NOT_AIX(1 * K);
static constexpr intptr_t segfault_address = AIX_ONLY(-1) NOT_AIX(4 * K);
Copy link
Member

@tstuefe tstuefe Jul 14, 2023

Choose a reason for hiding this comment

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

Yes. And before we start cascading ifdefs here, please spread this definition out into the respective platform files. For the s390 version, could you please add a clear comment describing the reasoning? Do all s390 linux variants using 4K pages - is it valid to hardcode that?

Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

I think this looks good.

Cheers, Thomas

@openjdk
Copy link

openjdk bot commented Jul 18, 2023

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

8312014: [s390x] TestSigInfoInHsErrFile.java Failure

Reviewed-by: stuefe, amitkumar, tsteele

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

  • b5b6f4e: 8312164: Refactor Arrays.hashCode for long, boolean, double, float, and Object arrays
  • 14cf035: 8302987: Add uniform and spatially equidistributed bounded double streams to RandomGenerator
  • d1c788c: 8312392: ARM32 build broken since 8311035
  • c119037: 8311971: SA's ConstantPool.java uses incorrect computation to read long value in the constant pool
  • 028068a: 8312166: (dc) DatagramChannel's socket adaptor does not release carrier thread when blocking in receive
  • e7adbdb: 8311923: TestIRMatching.java fails on RISC-V
  • c6ab9c2: 8308103: Massive (up to ~30x) increase in C2 compilation time since JDK 17
  • d33e8e6: 8312200: Fix Parse::catch_call_exceptions memory leak
  • f677793: 8312190: Fix c++11-narrowing warnings in hotspot code
  • 82612e2: 8312329: Minimal build failure after JDK-8311541
  • ... and 51 more: https://git.openjdk.org/jdk/compare/7539cc092d0a6b5604351d19e555101fcff75f58...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.

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 (@tstuefe, @offamitkumar, @backwaterred) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 18, 2023
String crashAddress = Platform.isAix() ? "0xffffffffffffffff" : "0x0*400";
//All faults on s390x give the address only on page granularity.
//Hence fault address is first page address.
String crashAddress = Platform.isAix() ? "0xffffffffffffffff" : Platform.isS390x() ? "0x0*1000" : "0x0*400";
Copy link
Member

Choose a reason for hiding this comment

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

Probably we can create a if-else ladder here and move this comment inside that if/else block ? something like this:

if (AIX) {
crashAddress for AIX
} else if (S390) {
// your comment
crashAddress for S390
} else {
crashAddress for other archs
}

Copy link
Member Author

Choose a reason for hiding this comment

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

I have adapted this.

Comment on lines 33 to 34
//All faults on s390x give the address only on page granularity.
//Set Pdsegfault_address to minumum one page address.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
//All faults on s390x give the address only on page granularity.
//Set Pdsegfault_address to minumum one page address.
// All faults on s390x give the address only on page granularity.
// Set pd_segfault_address to minimum one page address.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed, Thanks

Copy link
Member

Choose a reason for hiding this comment

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

you need to commit these changes, They are not reflected as of now here.

Copy link
Member Author

Choose a reason for hiding this comment

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

ahh, I missed that. Fixed.

@offamitkumar
Copy link
Member

@RealFYang and @backwaterred, your approval would be highly appreciated for this PR :-)

@@ -30,6 +30,10 @@

const int StackAlignmentInBytes = 16;

// All faults on s390x give the address only on page granularity.
// Set Pdsegfault_address to miniumum one page address.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Set Pdsegfault_address to miniumum one page address.
// Set Pdsegfault_address to minimum one page address.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@RealFYang
Copy link
Member

RealFYang commented Jul 19, 2023

@RealFYang and @backwaterred, your approval would be highly appreciated for this PR :-)

Seems that this will only make a difference to zero and s390 (I am not familar with s390). And I see the test will fail with zero build on linux-aarch64 platform. So you might want to distinguish s390 for zero too. I think it will be safer to set pd_segfault_address to 4096 only for s390 and keep the original setting for others.

@sid8606
Copy link
Member Author

sid8606 commented Jul 19, 2023

Now with this commit test should pass on architectures than s390x.
Thank you @RealFYang for the review and testing the PR.

Copy link
Member

@offamitkumar offamitkumar left a comment

Choose a reason for hiding this comment

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

Thanks Sid,
LGTM

@RealFYang
Copy link
Member

Also note that the original segfault_address for zero build on AIX is -1 instead of 1024.

@sid8606
Copy link
Member Author

sid8606 commented Jul 19, 2023

Thank you for all the reviews which made this PR more mature. Tier1 tests are passing on fastdebug and slowdebug builds. Let's integrate this.

@sid8606
Copy link
Member Author

sid8606 commented Jul 19, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jul 19, 2023
@openjdk
Copy link

openjdk bot commented Jul 19, 2023

@sid8606
Your change (at version ec8ed70) is now ready to be sponsored by a Committer.

Comment on lines +41 to +45
const size_t pd_segfault_address = -1;
#elif defined(S390)
const size_t pd_segfault_address = 4096;
#else
const size_t pd_segfault_address = 1024;
Copy link
Contributor

Choose a reason for hiding this comment

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

Format police! I find it's a bit more readable to indent the non-macro lines.

#if defined(AIX)
  const size_t pd_segfault_address = -1;
#elif ...

@backwaterred
Copy link
Contributor

Ran it on AIX just to be sure, and the test still passes. I have noted one cosmetic suggestion. LGTM 😄

@backwaterred
Copy link
Contributor

Ha. I guess I should have refreshed the page before sending my review & comment.

/sponsor

@openjdk
Copy link

openjdk bot commented Jul 19, 2023

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

  • b5b6f4e: 8312164: Refactor Arrays.hashCode for long, boolean, double, float, and Object arrays
  • 14cf035: 8302987: Add uniform and spatially equidistributed bounded double streams to RandomGenerator
  • d1c788c: 8312392: ARM32 build broken since 8311035
  • c119037: 8311971: SA's ConstantPool.java uses incorrect computation to read long value in the constant pool
  • 028068a: 8312166: (dc) DatagramChannel's socket adaptor does not release carrier thread when blocking in receive
  • e7adbdb: 8311923: TestIRMatching.java fails on RISC-V
  • c6ab9c2: 8308103: Massive (up to ~30x) increase in C2 compilation time since JDK 17
  • d33e8e6: 8312200: Fix Parse::catch_call_exceptions memory leak
  • f677793: 8312190: Fix c++11-narrowing warnings in hotspot code
  • 82612e2: 8312329: Minimal build failure after JDK-8311541
  • ... and 51 more: https://git.openjdk.org/jdk/compare/7539cc092d0a6b5604351d19e555101fcff75f58...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 19, 2023
@openjdk openjdk bot closed this Jul 19, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Jul 19, 2023
@openjdk
Copy link

openjdk bot commented Jul 19, 2023

@backwaterred @sid8606 Pushed as commit 6f66213.

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

@sid8606 sid8606 deleted the SigInfoInHsErrFile branch March 7, 2024 13:26
@offamitkumar
Copy link
Member

/backport jdk21u-dev

@openjdk
Copy link

openjdk bot commented Apr 29, 2024

@offamitkumar the backport was successfully created on the branch backport-offamitkumar-6f662130 in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 6f662130 from the openjdk/jdk repository.

The commit being backported was authored by Sidraya on 19 Jul 2023 and was reviewed by Thomas Stuefe, Amit Kumar and Tyler Steele.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-offamitkumar-6f662130:backport-offamitkumar-6f662130
$ git checkout backport-offamitkumar-6f662130
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-offamitkumar-6f662130

⚠️ @offamitkumar You are not yet a collaborator in my fork openjdk-bots/jdk21u-dev. An invite will be sent out and you need to accept it before you can proceed.

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

Successfully merging this pull request may close these issues.

5 participants