JDK-8360936 : Test compiler/onSpinWait/TestOnSpinWaitAArch64.java fails after JDK-8359435
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 26
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: aarch64
  • Submitted: 2025-06-28
  • Updated: 2025-07-17
  • Resolved: 2025-07-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26 b07Fixed
Related Reports
Causes :  
Sub Tasks
JDK-8361032 :  
Description
============================= C2-compiled nmethod ==============================
----------------------------------- Assembly -----------------------------------
[0.035s][warning][os] Loading hsdis library failed

Compiled method (c2) 34    3             compiler.onSpinWait.TestOnSpinWaitAArch64$Launcher::test (4 bytes)
 total in heap  [0x0000ffffa87cca88,0x0000ffffa87ccc08] = 384
 main code      [0x0000ffffa87ccb80,0x0000ffffa87ccbf0] = 112
 stub code      [0x0000ffffa87ccbf0,0x0000ffffa87ccc00] = 16
 oops           [0x0000ffffa87ccc00,0x0000ffffa87ccc08] = 8
 mutable data [0x0000ffff6406ef60,0x0000ffff6406ef80] = 32
 relocation     [0x0000ffff6406ef60,0x0000ffff6406ef78] = 24
 metadata       [0x0000ffff6406ef78,0x0000ffff6406ef80] = 8
 immutable data [0x0000ffff6406ef20,0x0000ffff6406ef50] = 48
 dependencies   [0x0000ffff6406ef20,0x0000ffff6406ef28] = 8
 scopes pcs     [0x0000ffff6406ef28,0x0000ffff6406ef48] = 32
 scopes data    [0x0000ffff6406ef48,0x0000ffff6406ef50] = 8

[Constant Pool (empty)]

[MachCode]
[Verified Entry Point]
  # {method} {0x0000ffff7c400378} 'test' '()V' in 'compiler/onSpinWait/TestOnSpinWaitAArch64$Launcher'
  #           [sp+0x20]  (sp of caller)
  0x0000ffffa87ccb80: ff83 00d1 | fd7b 01a9 | 2803 0018 | 8923 40b9 | 1f01 09eb | 2102 0054 | 1f20 03d5 | 1f20 03d5 
  0x0000ffffa87ccba0: 1f20 03d5 | 1f20 03d5 | 1f20 03d5 | 1f20 03d5 | 1f20 03d5 | fd7b 41a9 | ff83 0091 

  0x0000ffffa87ccbbc: ;   {poll_return}
  0x0000ffffa87ccbbc: 8817 40f9 | ff63 28eb | 4800 0054 | c003 5fd6 

  0x0000ffffa87ccbcc: ;   {internal_word}
  0x0000ffffa87ccbcc: 88ff ff10 | 88a3 02f9 

  0x0000ffffa87ccbd4: ;   {runtime_call SafepointBlob}
  0x0000ffffa87ccbd4: ebc4 fe17 

  0x0000ffffa87ccbd8: ;   {runtime_call Stub::method_entry_barrier}
  0x0000ffffa87ccbd8: 0850 8ad2 | 080f b5f2 | e8ff dff2 | 0001 3fd6 | ecff ff17 

  0x0000ffffa87ccbec: ;   {entry_guard}
  0x0000ffffa87ccbec: 0000 0000 
[Exception Handler]
  0x0000ffffa87ccbf0: ;   {runtime_call ExceptionBlob}
  0x0000ffffa87ccbf0: 74e7 ff17 
[Deopt Handler Code]
  0x0000ffffa87ccbf4: 1e00 0010 

  0x0000ffffa87ccbf8: ;   {runtime_call DeoptimizationBlob}
  0x0000ffffa87ccbf8: 62c5 fe17 | 0000 0000 
[/MachCode]
------------------------------------------------------------------------
static compiler.onSpinWait.TestOnSpinWaitAArch64$Launcher::test()V
  interpreter_invocation_count:        6784
  invocation_counter:                  6784
  backedge_counter:                       0
  decompile_count:                        0
  mdo size: 288 bytes

   0 invokestatic 12 <java/lang/Thread.onSpinWait()V> 
  0    bci: 0    CounterData        count(5121)
   3 return
------------------------------------------------------------------------
Total MDO size: 288 bytes
java version "26-ea" 2026-03-17
Java(TM) SE Runtime Environment (build 26-ea+5-363)
Java HotSpot(TM) 64-Bit Server VM (build 26-ea+5-363, mixed mode, sharing)

----------System.err:(11/683)----------
java.lang.RuntimeException: Missing compiler output for Thread.onSpinWait intrinsic
	at compiler.onSpinWait.TestOnSpinWaitAArch64.checkOutput(TestOnSpinWaitAArch64.java:166)
	at compiler.onSpinWait.TestOnSpinWaitAArch64.main(TestOnSpinWaitAArch64.java:89)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:335)
	at java.base/java.lang.Thread.run(Thread.java:1474)

Comments
> Should I open a new JBS issue for it? Or reopen this one ? No. It is JDK-8362193.
17-07-2025

Still see the test compiler/onSpinWait/TestOnSpinWaitAArch64.java failing today (fastdebug binaries macOS aarch64 ), with the following assert : # Internal Error (/openjdk-jdk-dev-macos_aarch64-dbg/jdk/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp:539), pid=5187, tid=8963 # assert(VM_Version::spin_wait_desc().inst() >= SpinWait::NONE && VM_Version::spin_wait_desc().inst() <= SpinWait::YIELD) failed: must be Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.dylib+0x13fb4c0] VMError::report(outputStream*, bool)+0x1b00 (os_bsd_aarch64.cpp:539) V [libjvm.dylib+0x13fed60] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void const*, void const*, char const*, int, unsigned long)+0x55c V [libjvm.dylib+0x5c8978] print_error_for_unit_test(char const*, char const*, char*)+0x0 V [libjvm.dylib+0xf05c74] _Copy_conjoint_jshorts_atomic+0x0 V [libjvm.dylib+0x27ab38] ArchiveWorkers::run_task_multi(ArchiveWorkerTask*)+0x12c V [libjvm.dylib+0x27a948] ArchiveWorkers::run_task(ArchiveWorkerTask*)+0x50 V [libjvm.dylib+0x6b5600] FileMapInfo::relocate_pointers_in_core_regions(long)+0x404 V [libjvm.dylib+0x6b4da0] FileMapInfo::map_regions(int*, int, char*, ReservedSpace)+0x244 V [libjvm.dylib+0xe2b55c] MetaspaceShared::map_archive(FileMapInfo*, char*, ReservedSpace)+0x8c V [libjvm.dylib+0xe2a8f0] MetaspaceShared::map_archives(FileMapInfo*, FileMapInfo*, bool)+0x36c V [libjvm.dylib+0xe2a0c8] MetaspaceShared::initialize_runtime_shared_and_meta_spaces()+0x114 V [libjvm.dylib+0xe1ee8c] Metaspace::global_initialize()+0x88 V [libjvm.dylib+0x1386224] universe_init()+0x1a8 V [libjvm.dylib+0x89c5e4] init_globals()+0x64 V [libjvm.dylib+0x134ffd8] Threads::create_vm(JavaVMInitArgs*, bool*)+0x2f8 V [libjvm.dylib+0xa1edec] JNI_CreateJavaVM+0x70 C [libjli.dylib+0xa3d0] JavaMain+0x100 C [libjli.dylib+0xd52c] ThreadJavaMain+0xc C [libsystem_pthread.dylib+0x6f94] _pthread_start+0x88 Should I open a new JBS issue for it? Or reopen this one ?
17-07-2025

Changeset: a86dd56d Branch: master Author: Evgeny Astigeevich <eastigeevich@openjdk.org> Date: 2025-07-11 15:25:22 +0000 URL: https://git.openjdk.org/jdk/commit/a86dd56de34f730b42593236f17118ef5ce4985a
11-07-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26072 Date: 2025-07-01 15:29:10 +0000
01-07-2025

Thanks for quickly looking into this, Evgeny!
30-06-2025

I manage to reproduce the failure. This is a test bug. The test relies on some debug info. This info might not be generated when the test runs on a release build. The fix is to require debug builds to run on.
30-06-2025

Might be a test bug. ILW = Test fails to detect intrinsic, single test on AArch64, no workaround = MLH = P4
30-06-2025

I'm problem listing the test with JDK-8361032.
30-06-2025

Seems to be failing in every tier5 runs.
29-06-2025