Skip to content

8338303: Linux ppc64le with toolchain clang - detection failure in early JVM startup #23292

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

Closed
wants to merge 1 commit into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Jan 24, 2025

When building on Linux ppc64le with the clang toolchain, the new JVM fails already in the build process with an error/crash :

# SIGILL (0x4) at pc=0x000079198fae03ac, pid=2922849, tid=2923410
#
# Problematic frame:
# v ~BufferBlob::detect_cpu_features 0x000079198fae03ac

It was noticed the clang build on Linux ppc64le missed some important compile flags, especially -DABI_ELFv2 (compared to gcc build).


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-8338303: Linux ppc64le with toolchain clang - detection failure in early JVM startup (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23292

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 24, 2025

👋 Welcome back mbaesken! 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 Jan 24, 2025

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

8338303: Linux ppc64le with toolchain clang - detection failure in early JVM startup

Reviewed-by: mdoerr, erikj, ihse

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

  • 76f792b: 8348203: [JVMCI] Make eager JVMCI initialization observable in the debugger
  • 909cef5: 8339891: Several sun/security/ssl/SSLSessionImpl/* tests override test.java.opts
  • 56a1877: 8348170: Unnecessary Hashtable usage in CSS.styleConstantToCssMap
  • 9768f60: 8345249: Apply some conservative cleanups in FileURLConnection
  • c5a69b6: 8331723: Serial: Remove the unused parameter of the method SerialHeap::gc_prologue
  • 9c55e25: 8347981: RISC-V: Add Zfa zli imm loads
  • e20bd01: 8344361: Restore null return for invalid services from legacy providers
  • 5a0bdd0: 8346890: AArch64: Type profile counters generate suboptimal code
  • 4a375e5: 8344232: [PPC64] secondary_super_cache does not scale well: C1 and interpreter
  • 0df9dcb: 8346572: Check is_reserved() before using ReservedSpace instances

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 changed the title JDK-8338303: Linux ppc64le with toolchain clang - detection failure in early JVM startup 8338303: Linux ppc64le with toolchain clang - detection failure in early JVM startup Jan 24, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 24, 2025
@openjdk
Copy link

openjdk bot commented Jan 24, 2025

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

  • build

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 build build-dev@openjdk.org label Jan 24, 2025
@mlbridge
Copy link

mlbridge bot commented Jan 24, 2025

Webrevs

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

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

-DABI_ELFv2 is very important. Otherwise, the wrong calling convention is used. I'm not sure if the power8 settings make still sense, but ok. We could clean them up separately.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 24, 2025
@MBaesken
Copy link
Member Author

Hi Erik and Martin , thanks for the reviews !

I also noticed we set -fstack-protector only for Linux/gcc but not for clang. Probably we should change this (but in a separate PR).
See

TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fstack-protector"

(seems we set it already for AIX/clang)

The compile flag -D_REENTRANT is also only set for gcc not clang in the JVM compilation units. Not sure if we need it.
See

ALWAYS_DEFINES_JVM="-D_GNU_SOURCE -D_REENTRANT"
.

@TheRealMDoerr
Copy link
Contributor

Using -fstack-protector probably makes sense. You're free to decide if you want to do it here or in a separate PR.

@MBaesken
Copy link
Member Author

MBaesken commented Jan 24, 2025

Using -fstack-protector probably makes sense. You're free to decide if you want to do it here or in a separate PR.

In a separate PR . And maybe also on macOS/clang, not only Linux/clang.
(AIX/clang has the setting already)
I created https://bugs.openjdk.org/browse/JDK-8348582
8348582: Set -fstack-protector when building with clang

@MBaesken
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jan 27, 2025

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

  • a1fd5f4: 8348554: Enhance Linux kernel version checks
  • 002679a: 8347065: Add missing @SPEC tags for Java Security Standard Algorithm Names
  • 99002e4: 8318098: Update jfr tests to replace keyword jfr with vm.flagless
  • 5431668: 8348212: Need to add warn() step to JavacTaskImpl after JDK-8344148
  • 1d2eb2f: 8299504: Resolve uses and provides at run time if the service is optional and missing
  • f446cef: 8343962: [REDO] Move getChars to DecimalDigits
  • 7c0985f: 8348420: Shenandoah: Check is_reserved before using ReservedSpace instances
  • f8e81d2: 8347506: Compatible OCSP readtimeout property with OCSP timeout
  • 907350e: 8346587: Distrust TLS server certificates anchored by Camerfirma Root CAs
  • dec9367: 8347498: JDK 24 RDP2 L10n resource files update
  • ... and 12 more: https://git.openjdk.org/jdk/compare/a09f06d538075bcdd7cce6da9c3bf9549ce7d543...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 27, 2025

@MBaesken Pushed as commit 70eec90.

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

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

Successfully merging this pull request may close these issues.

4 participants