Skip to content

8350303: ARM32: StubCodeGenerator::verify_stub(StubGenStubId) failed after JDK-8343767#23687

Closed
shqking wants to merge 2 commits intoopenjdk:masterfrom
shqking:JDK-8350303-arm32
Closed

8350303: ARM32: StubCodeGenerator::verify_stub(StubGenStubId) failed after JDK-8343767#23687
shqking wants to merge 2 commits intoopenjdk:masterfrom
shqking:JDK-8350303-arm32

Conversation

@shqking
Copy link
Contributor

@shqking shqking commented Feb 19, 2025

We encountered the following runtime error on ARM32:

assert(StubRoutines::stub_to_blob(stub_id) == blob_id()) failed: wrong blob initial for generation of stub atomic_add

I suppose it might be a mistake in JDK-8343767. atomic_add stub belongs to initial stubs, but it is set as compiler stub in JDK-8343767.

Note that only ARM32 is affected as only ARM32 defines this stub.

Tests: cross-build for arm32, ppc64, riscv64, s390x passed. Tier1~3 passed on Linux/AArch64 and Linux/x86_64


Progress

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

Issue

  • JDK-8350303: ARM32: StubCodeGenerator::verify_stub(StubGenStubId) failed after JDK-8343767 (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23687

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

Using diff file

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

Using Webrev

Link to Webrev Comment

…after JDK-8343767

We encountered the following runtime error on ARM32:

```
assert(StubRoutines::stub_to_blob(stub_id) == blob_id()) failed: wrong blob initial for generation of stub atomic_add
```

I suppose it might be a mistake in JDK-8343767. "atomic_add" stub
belongs to initial stubs, but it is set as compiler stub in JDK-8343767.

Note that only ARM32 is affected as only ARM32 defines this stub.
@bridgekeeper
Copy link

bridgekeeper bot commented Feb 19, 2025

👋 Welcome back haosun! 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 Feb 19, 2025

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

8350303: ARM32: StubCodeGenerator::verify_stub(StubGenStubId) failed after JDK-8343767

Reviewed-by: shade, adinn

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

  • 577ff98: 8347946: Add API note that caller should validate/trust signers to the getCertificates and getCodeSigners methods of JarEntry and JarURLConnection
  • 014701a: 8350260: Improve HTML instruction formatting in PassFailJFrame
  • 59810ad: 8350201: Out of bounds access on Linux aarch64 in os::print_register_info
  • 2353f3e: 8350210: CTW: Use stackless exceptions
  • 79db2d4: 8350159: compiler/tiered/Level2RecompilationTest.java fails after JDK-8349915
  • d13fd57: 8350211: CTW: Attempt to preload all classes in constant pool
  • 0ef1c40: 8350006: IGV: show memory slices as type information

Please see this link for an up-to-date comparison between the source branch of this pull request and 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 rfr Pull request is ready for review label Feb 19, 2025
@openjdk
Copy link

openjdk bot commented Feb 19, 2025

@shqking 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 Feb 19, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 19, 2025

Webrevs

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

Looks fine to me, with nits. @adinn should take a look as well.
/reviewers 2

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 19, 2025
@openjdk
Copy link

openjdk bot commented Feb 19, 2025

@shipilev
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Feb 19, 2025
@bulasevich
Copy link
Contributor

I noticed this issue too. Thanks for fixing that.
Yes, atomic_add blob is generated by generate_initial_stubs, hence atomic_add should be included in the STUBGEN_INITIAL_BLOBS_DO group.

@adinn
Copy link
Contributor

adinn commented Feb 19, 2025

Yes, this fix is needed. atomic_add is only used in linux-arm-specific code and is needed during VM startup. It was moved into the compiler blob by mistake and hsodl really be declared as an initial stub.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 19, 2025
@shqking
Copy link
Contributor Author

shqking commented Feb 20, 2025

Thanks for your reviews.
GHA tests are all green. Let me integrate it.

/integrate

@openjdk
Copy link

openjdk bot commented Feb 20, 2025

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

  • 0662e39: 8350267: Set mtune and mcpu settings in JDK native lib compilation on Linux ppc64(le)
  • c5c91a8: 8345285: [s390x] test failures: foreign/normalize/TestNormalize.java with C2
  • 26bf445: 8350049: [JMH] Float16OperationsBenchmark fails java.lang.NoClassDefFoundError
  • 00d4e4a: 8350051: [JMH] Several tests fails NPE
  • 0131c1b: 8349953: Avoid editing AOTConfiguration file in "make test JTREG=AOT_JDK=true"
  • 3ebed78: 8349943: [JMH] Use jvmArgs consistently
  • 92efab9: 8350344: Cross-build failure: _vptr name conflict
  • 4fb70c7: 8229012: When single stepping, the debug agent can cause the thread to remain in interpreter mode after single stepping completes
  • 4e60c2d: 8349699: XSL transform fails with certain UTF-8 characters on 1024 byte boundaries
  • 7734f8e: 8349664: HEX dump should always use ASCII or ISO_8859_1
  • ... and 12 more: https://git.openjdk.org/jdk/compare/9042aa82a890b0f0348ac8127dbd3268f2620346...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 20, 2025

@shqking Pushed as commit 86d0616.

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

@shqking shqking deleted the JDK-8350303-arm32 branch February 20, 2025 09:04
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.

4 participants