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

8350683: Non-C2 / minimal JVM crashes in the build on ppc64 platforms #23794

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Feb 26, 2025

When building a JVM without C2 (e.g. minimal) on ppc64 platforms , it crashes in the build because of unwanted dependencies to C2.
AIX crash is (linux ppc64le crash is similar) :

# Internal Error (compiledIC_ppc.cpp:141), pid=17695018, tid=258
# Error: ShouldNotReachHere()
#
 
iar: 0x0900000008800c60 libjvm.so::AixNativeCallstack::print_callstack_for_context(outputStream*, ucontext_t const*, bool, char*, unsigned long)+0x4bc (C++ uses_alloca saves_cr saves_lr stores_bc gpr_saved:18 fixedparms:5 parmsonstk:1)
lr: 0x09000000087ea9b8 libjvm.so::fdStream::write(char const*, unsigned long)+0x44 (C++ uses_alloca saves_lr stores_bc gpr_saved:4 fixedparms:3 parmsonstk:1)
sp: 0x000000011023aab0 (base - 0x2DD8)
rtoc: 0x08001000a0088ff0
|---stackaddr----| |----lrsave------|: <function name>
0x000000011023aea0 - 0x0900000008800730 libjvm.so::os::Aix::platform_print_native_stack(outputStream*, void const*, char*, int, unsigned char*&)+0x24 (C++ uses_alloca saves_lr stores_bc gpr_saved:1 fixedparms:5 parmsonstk:1)
0x000000011023af20 - 0x0900000008800644 libjvm.so::NativeStackPrinter::print_stack(outputStream*, char*, int, unsigned char*&, bool, int)+0x60 (C++ uses_alloca saves_cr saves_lr stores_bc gpr_saved:6 fixedparms:7 parmsonstk:1)
0x000000011023afc0 - 0x09000000087f6ff8 libjvm.so::VMError::report(outputStream*, bool)+0x11f0 (C++ fp_present uses_alloca saves_cr saves_lr stores_bc gpr_saved:13 fixedparms:2 parmsonstk:1)
0x000000011023b830 - 0x09000000087e9fdc libjvm.so::VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void const*, void const*, char const*, int, unsigned long)+0x6a0 (C++ uses_alloca saves_lr stores_bc gpr_saved:18 fixedparms:8 parmsonstk:1)
0x000000011023ba10 - 0x09000000087e96a0 libjvm.so::report_vm_error(char const*, int, char const*, char const*, ...)+0xa0 (C++ uses_alloca saves_lr stores_bc gpr_saved:5 fixedparms:4 parmsonstk:1)
0x000000011023bad0 - 0x09000000087e95cc libjvm.so::report_vm_error(char const*, int, char const*)+0x24 (C++ uses_alloca saves_lr stores_bc gpr_saved:1 fixedparms:3 parmsonstk:1)
0x000000011023bb50 - 0x09000000087e956c libjvm.so::report_should_not_reach_here(char const*, int)+0x20 (C++ uses_alloca saves_lr stores_bc gpr_saved:1 fixedparms:2 parmsonstk:1)
0x000000011023bbd0 - 0x0900000008906e5c libjvm.so::CompiledDirectCall::emit_to_interp_stub(MacroAssembler*, unsigned char*)+0x28 (C++ uses_alloca saves_lr stores_bc gpr_saved:1 fixedparms:2 parmsonstk:1)
0x000000011023bc50 - 0x0900000008902848 libjvm.so::SharedRuntime::generate_native_wrapper(MacroAssembler*, methodHandle const&, int, BasicType*, VMRegPair*, BasicType)+0x380 (C++ uses_alloca saves_cr saves_lr stores_bc gpr_saved:18 fixedparms:6 parmsonstk:1)
0x000000011023c000 - 0x0900000008901f7c libjvm.so::AdapterHandlerLibrary::create_native_wrapper(methodHandle const&)+0x464 (C++ fp_present uses_alloca saves_cr saves_lr stores_bc gpr_saved:18 fixedparms:1 parmsonstk:1)
0x000000011023c5d0 - 0x09000000088f0d78 libjvm.so::Method::link_method(methodHandle const&, JavaThread*)+0x17c (C++ uses_alloca saves_lr stores_bc gpr_saved:5 fixedparms:3 parmsonstk:1)
0x000000011023c670 - 0x09000000088f0ab8 libjvm.so::InstanceKlass::link_methods(JavaThread*)+0xcc (C++ uses_alloca saves_lr stores_bc gpr_saved:10 fixedparms:2 parmsonstk:1)
0x000000011023c760 - 0x09000000088d5e48 libjvm.so::InstanceKlass::link_class_impl(JavaThread*)+0x38c (C++ uses_alloca saves_cr saves_lr stores_bc gpr_saved:10 fixedparms:2 parmsonstk:1)
0x000000011023c8f0 - 0x09000000088d4de8 libjvm.so::InstanceKlass::initialize_impl(JavaThread*)+0x94 (C++ uses_alloca saves_cr saves_lr stores_bc gpr_saved:14 fixedparms:2 parmsonstk:1)
0x000000011023cae0 - 0x09000000088d4cf4 libjvm.so::InstanceKlass::initialize(JavaThread*)+0x60 (C++ uses_alloca saves_lr stores_bc gpr_saved:3 fixedparms:2 parmsonstk:1)
0x000000011023cb70 - 0x0900000008c40ea0 libjvm.so::initialize_class(Symbol*, JavaThread*)+0x64 (C++ uses_alloca saves_lr stores_bc gpr_saved:2 fixedparms:2 parmsonstk:1)
0x000000011023cc00 - 0x0900000008c35384 libjvm.so::Threads::create_vm(JavaVMInitArgs*, bool*)+0x6ec (C++ uses_alloca saves_lr stores_bc gpr_saved:8 fixedparms:2 parmsonstk:1)
0x000000011023d540 - 0x0900000008c5a91c libjvm.so::JNI_CreateJavaVM+0xa4 (C++ uses_alloca saves_lr stores_bc gpr_saved:8 fixedparms:3 parmsonstk:1)
0x000000011023d640 - 0x00000001000100f4 javac::JavaMain+0x148 (C++ saves_lr stores_bc gpr_saved:11 fixedparms:1 parmsonstk:1)
0x000000011023d730 - 0x000000010000ff74 javac::ThreadJavaMain+0x10 (C++ saves_lr stores_bc fixedparms:1 parmsonstk:1)
0x000000011023d7a0 - 0x090000000056204c libpthreads.a::_pthread_body+0xec (C saves_lr stores_bc gpr_saved:1 fixedparms:1 )
0x000000011023d820 - 0x0000000000000000

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-8350683: Non-C2 / minimal JVM crashes in the build on ppc64 platforms (Bug - P4)

Contributors

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23794

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 26, 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 Feb 26, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title JDK-8350683: Non-C2 / minimal JVM crashes in the build on ppc64 platforms 8350683: Non-C2 / minimal JVM crashes in the build on ppc64 platforms Feb 26, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 26, 2025
@openjdk
Copy link

openjdk bot commented Feb 26, 2025

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

  • hotspot-compiler

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.

@MBaesken
Copy link
Member Author

/contributor add mdoerr

@openjdk
Copy link

openjdk bot commented Feb 26, 2025

@MBaesken
Contributor Martin Doerr <[email protected]> successfully added.

@mlbridge
Copy link

mlbridge bot commented Feb 26, 2025

Webrevs

@MBaesken
Copy link
Member Author

MBaesken commented Feb 26, 2025

Hi @offamitkumar , s390x might have the same problem we face on ppc64, see here

https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/s390/compiledIC_s390.cpp#L58

Maybe you want to check this. On ppc64, the previously C2-only coding in CompiledDirectCall::emit_to_interp_stub was needed for non-C2 JVMs like minimal JVM (where only C1 is present).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant