Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
/ jdk22u Public archive

8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space #170

Conversation

offamitkumar
Copy link
Member

@offamitkumar offamitkumar commented Apr 26, 2024

Hi all,

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

The commit being backported was authored by Amit Kumar on 21 Feb 2024 and was reviewed by Lutz Schmidt and Martin Doerr.

Thanks!


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
  • JDK-8326201 needs maintainer approval

Issue

  • JDK-8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space (Bug - P3 - Approved)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 170

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk22u/pull/170.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 26, 2024

👋 Welcome back amitkumar! 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 Apr 26, 2024

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

8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space

Reviewed-by: lucy

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

  • d2e1ea4: 8328703: Illegal accesses in Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibraryImpl_ioctl0
  • 72d3f61: 8326974: ODR violation in macroAssembler_aarch64.cpp
  • bb313b5: 8323685: PrintSystemDictionaryAtExit has mutex rank assert
  • 437d655: 8324121: SIGFPE in PhaseIdealLoop::extract_long_range_checks
  • b2fbc82: 8322962: Upcall stub might go undetected when freezing frames
  • f08201c: 8325095: C2: bailout message broken: ResourceArea allocated string used after free
  • e6ba0ee: 8325179: Race in BasicDirectoryModel.validateFileCache
  • 7381b84: 8320692: Null icon returned for .exe without custom icon
  • 5eb11e5: 8310513: [s390x] Intrinsify recursive ObjectMonitor locking
  • 0f4bc65: 8328168: Epsilon: Premature OOM when allocating object larger than uncommitted heap size
  • ... and 1 more: https://git.openjdk.org/jdk22u/compare/439527831be7b05333cc69aca9eb3155589c0c50...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 (@RealLucy) 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 changed the title Backport d5f3d5c8cc347ae384dea25b1a55ed57204d1af3 8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space Apr 26, 2024
@openjdk
Copy link

openjdk bot commented Apr 26, 2024

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Apr 26, 2024
@mlbridge
Copy link

mlbridge bot commented Apr 26, 2024

Webrevs

@offamitkumar offamitkumar marked this pull request as draft April 30, 2024 06:47
@openjdk openjdk bot removed the rfr Pull request is ready for review label Apr 30, 2024
@offamitkumar
Copy link
Member Author

Got these merge conflicts, looks a clean backport:

amitkumar@Amits-MacBook-Pro jdk22u % git diff 
diff --cc src/hotspot/cpu/s390/s390.ad
index 9f4e182a9e4,5fcb885cdc3..00000000000
--- a/src/hotspot/cpu/s390/s390.ad
+++ b/src/hotspot/cpu/s390/s390.ad
@@@ -1,6 -1,6 +1,11 @@@
  //
++<<<<<<< HEAD
 +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
 +// Copyright (c) 2017, 2022 SAP SE. All rights reserved.
++=======
+ // Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
+ // Copyright (c) 2017, 2024 SAP SE. All rights reserved.
++>>>>>>> d5f3d5c8cc3 (8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space)
  // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  //
  // This code is free software; you can redistribute it and/or modify it
@@@ -1446,7 -1404,8 +1451,12 @@@ int HandlerImpl::emit_exception_handler
    C2_MacroAssembler _masm(&cbuf);
  
    address base = __ start_a_stub(size_exception_handler());
++<<<<<<< HEAD
 +  if (base == NULL) {
++=======
+   if (base == nullptr) {
+     ciEnv::current()->record_failure("CodeCache is full");
++>>>>>>> d5f3d5c8cc3 (8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space)
      return 0;          // CodeBuffer::expand failed
    }
  
@@@ -1467,7 -1426,8 +1477,12 @@@ int HandlerImpl::emit_deopt_handler(Cod
    C2_MacroAssembler _masm(&cbuf);
    address        base = __ start_a_stub(size_deopt_handler());
  
++<<<<<<< HEAD
 +  if (base == NULL) {
++=======
+   if (base == nullptr) {
+     ciEnv::current()->record_failure("CodeCache is full");
++>>>>>>> d5f3d5c8cc3 (8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space)
      return 0;  // CodeBuffer::expand failed
    }

@offamitkumar offamitkumar force-pushed the backport-offamitkumar-d5f3d5c8 branch from 3368cf9 to 2309357 Compare April 30, 2024 06:53
@offamitkumar
Copy link
Member Author

I performed the testing & didn't see any new failure appearing.

@offamitkumar
Copy link
Member Author

NULL to nullptr change wasn't backported. So I got merge conflict in those lines. I'm marking it as clean, if it's not right, I'll be happy to go for formal review as well.

cc: @RealLucy :-)

@offamitkumar
Copy link
Member Author

/clean

@offamitkumar offamitkumar marked this pull request as ready for review April 30, 2024 12:17
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 30, 2024
@openjdk
Copy link

openjdk bot commented Apr 30, 2024

@offamitkumar Only OpenJDK Committers can use the /clean command

Copy link

@RealLucy RealLucy left a comment

Choose a reason for hiding this comment

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

LGTM.

@openjdk
Copy link

openjdk bot commented May 1, 2024

⚠️ @offamitkumar This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@RealLucy
Copy link

RealLucy commented May 1, 2024

@offamitkumar Only OpenJDK Committers can use the /clean command

Sorry. My advice was wrong. I wasn't aware you need to be committer (in the jdk-updates project) to use /clean. Was a borderline case anyway for forced clean status.

@offamitkumar
Copy link
Member Author

offamitkumar commented May 1, 2024

/approval request This issue affects JDK-22. So backporting it on s390x, as done by PPC as well.

@openjdk
Copy link

openjdk bot commented May 1, 2024

@offamitkumar
8326201: The approval request has been created successfully.

@openjdk openjdk bot added the approval label May 1, 2024
@offamitkumar
Copy link
Member Author

/approval request This issue affects JDK-22. So backporting it on s390x, as done by PPC as well.

@openjdk
Copy link

openjdk bot commented May 2, 2024

@offamitkumar
8326201: The approval request has been updated successfully.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval labels May 2, 2024
@offamitkumar
Copy link
Member Author

Thanks Lutz for review,

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label May 3, 2024
@openjdk
Copy link

openjdk bot commented May 3, 2024

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

@shipilev
Copy link
Member

shipilev commented May 3, 2024

/sponsor

@openjdk
Copy link

openjdk bot commented May 3, 2024

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

  • e96e6ab: 8329850: [AIX] Allow loading of different members of same shared library archive
  • d2e1ea4: 8328703: Illegal accesses in Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibraryImpl_ioctl0
  • 72d3f61: 8326974: ODR violation in macroAssembler_aarch64.cpp
  • bb313b5: 8323685: PrintSystemDictionaryAtExit has mutex rank assert
  • 437d655: 8324121: SIGFPE in PhaseIdealLoop::extract_long_range_checks
  • b2fbc82: 8322962: Upcall stub might go undetected when freezing frames
  • f08201c: 8325095: C2: bailout message broken: ResourceArea allocated string used after free
  • e6ba0ee: 8325179: Race in BasicDirectoryModel.validateFileCache
  • 7381b84: 8320692: Null icon returned for .exe without custom icon
  • 5eb11e5: 8310513: [s390x] Intrinsify recursive ObjectMonitor locking
  • ... and 2 more: https://git.openjdk.org/jdk22u/compare/439527831be7b05333cc69aca9eb3155589c0c50...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 3, 2024
@openjdk openjdk bot closed this May 3, 2024
@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 May 3, 2024
@openjdk
Copy link

openjdk bot commented May 3, 2024

@shipilev @offamitkumar Pushed as commit 5c15483.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants