JDK-8247350 : [aarch64] assert(false) failed: wrong size of mach node
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: openjdk8u292,11,15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: aarch64
  • Submitted: 2020-06-10
  • Updated: 2023-08-18
  • Resolved: 2020-06-12
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 11 JDK 15 JDK 16 JDK 8 Other
11.0.9-oracleFixed 15 b28Fixed 16Fixed 8u391Fixed openjdk8u302Fixed
Description
open/test/hotspot/jtreg/runtime/CheckUnhandledOops/TestVerifyOops.java

111	decodeHeapOop	=== _  112  [[ 84  79  125 ]] java/util/Set *  Interface:java/util/Set * !jvms: SystemModuleFinders$SystemModuleFinder::<init> @ bci:9

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/output.cpp:1619
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/63712a43-4eaa-429c-95b4-483ac8241123-S591/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c97bbec7-c899-4fef-b9a5-bb5bb62cfb9a/runs/319b692b-aa79-47eb-803b-0023af859d26/workspace/open/src/hotspot/share/opto/output.cpp:1619), pid=20856, tid=20870
#  assert(false) failed: wrong size of mach node
#
# JRE version: Java(TM) SE Runtime Environment (15.0) (fastdebug build 15-internal+0-2020-06-10-0855415.patric.hedlin.jdk)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 15-internal+0-2020-06-10-0855415.patric.hedlin.jdk, compiled mode, compressed oops, g1 gc, linux-aarch64)
# Problematic frame:
# V  [libjvm.so+0x1144408]  PhaseOutput::fill_buffer(CodeBuffer*, unsigned int*)+0x1c08
#
# Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /scratch/opt/mach5/mesos/work_dir/slaves/805146e6-8fdb-4552-bf9e-385b73cf7129-S17240/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/193e279b-d8eb-44f8-b5c7-150915d4dc72/runs/4008e03f-0ede-4b61-bbf3-9b905db60f26/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_runtime/scratch/0/core.20856)
#
# An error report file with more information is saved as:
# /scratch/opt/mach5/mesos/work_dir/slaves/805146e6-8fdb-4552-bf9e-385b73cf7129-S17240/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/193e279b-d8eb-44f8-b5c7-150915d4dc72/runs/4008e03f-0ede-4b61-bbf3-9b905db60f26/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_runtime/scratch/0/hs_err_pid20856.log
#
# Compiler replay data is saved as:
# /scratch/opt/mach5/mesos/work_dir/slaves/805146e6-8fdb-4552-bf9e-385b73cf7129-S17240/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/193e279b-d8eb-44f8-b5c7-150915d4dc72/runs/4008e03f-0ede-4b61-bbf3-9b905db60f26/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_runtime/scratch/0/replay_pid20856.log
#

Comments
Fix Request [8u] We should backport this for purposes like nightly testing. 8u RFR thread (acked by Andrew Haley): https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-April/013643.html
12-04-2021

8u RFR thread: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-April/013641.html
12-04-2021

Changeset: 241f4018 Author: Vladimir Kozlov <kvn@openjdk.org> Date: 2020-06-12 14:33:20 +0000 URL: https://git.openjdk.java.net/lanai/commit/241f4018
02-07-2020

Changeset: 241f4018 Author: Vladimir Kozlov <kvn@openjdk.org> Date: 2020-06-12 14:33:20 +0000 URL: https://git.openjdk.java.net/panama-foreign/commit/241f4018
02-07-2020

Changeset: 241f4018 Author: Vladimir Kozlov <kvn@openjdk.org> Date: 2020-06-12 14:33:20 +0000 URL: https://git.openjdk.java.net/amber/commit/241f4018
02-07-2020

Fix request (11u) -- will label after testing completed. I would like to downport this for parity with 11.0.9-oracle. I had to resolve the debug coding in output.cpp: http://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-June/003359.html
24-06-2020

URL: https://hg.openjdk.java.net/jdk/jdk15/rev/1c81917f228b User: kvn Date: 2020-06-12 21:33:41 +0000
12-06-2020

The difference comes from MacroAssembler::mov_immediate64() which generates different code if distance to message string 'b' in mov(rscratch1, (address)b) is different: http://hg.openjdk.java.net/jdk/jdk/file/2f75432d7eb3/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp#l1564 The fix: https://cr.openjdk.java.net/~kvn/8247350/webrev.00/
11-06-2020

Looks like difference come from verify_oop() called at the end of instruction (note, the test runs with -XX:+VerifyOops): http://hg.openjdk.java.net/jdk/jdk/file/2f75432d7eb3/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp#l1316
10-06-2020

Note it happens with 0 based COOP: Heap address: 0x0000000668000000, size: 6528 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 CDS disabled. Compressed class space mapped at: 0x0000000800000000-0x0000000840000000, size: 1073741824 Narrow klass base: 0x0000000800000000, Narrow klass shift: 0, Narrow klass range: 0x40000000 The decode code is: http://hg.openjdk.java.net/jdk/jdk/file/2f75432d7eb3/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp#l3848 Note, verify_heapbase() is empty: http://hg.openjdk.java.net/jdk/jdk/file/2f75432d7eb3/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp#l2181
10-06-2020

6396 decodeHeapOop === _ 6397 [[ 6389 6384 6410 ]] java/util/Map$Entry * Interface:java/util/Map$Entry * !jvms: SystemModules$default::moduleReads @ bci:621 decode_heap_oop R0, R11
10-06-2020

So the instruction size in scratch buffer (second output) is smaller: 48 < 52. Here are different bytes: 08a2 9fd2 | c8ae a7f2 ------------------ e8ae a7d2 n_size (48), current_offset (27120), instr_offset (27068) [MachCode] 0x0000ffff81e464fc: 60f1 7dd3 | e023 bfa9 | e97b bfa9 | 08a2 9fd2 | c8ae a7f2 | e8ff dff2 | 09cc 83d2 | 4962 b2f2 0x0000ffff81e4651c: e9ff dff2 | 2901 40f9 | 2001 3fd6 | e97b c1a8 | e023 c1a8 | [/MachCode] ------------------- [MachCode] 0x0000ffff81e243c0: 60f1 7dd3 | e023 bfa9 | e97b bfa9 | e8ae a7d2 | e8ff dff2 | 09cc 83d2 | 4962 b2f2 | e9ff dff2 0x0000ffff81e243e0: 2901 40f9 | 2001 3fd6 | e97b c1a8 | e023 c1a8 | [/MachCode] It looks like several instructions were generated instead of one lsl (lshift dst,src,3).
10-06-2020