JDK-8253588 : C1: assert(false) failed: unknown register on x86_32 only with -XX:+TraceLinearScanLevel=4
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-09-24
  • Updated: 2024-12-06
  • Resolved: 2020-10-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 16
16 b20Fixed
Related Reports
Relates :  
Description
(synopsis is provisional, change as you see fit)

$ CONF=linux-x86-server-fastdebug make images run-test TEST=compiler/c1/TestTraceLinearScanLevel.java

walk_to(4) **************************************************************
active to handled      5 fixed [ecx|I] 5 -1 [0, 4[  "no definition"
active to inactive     3 fixed [eax|I] 3 171 [0, 1[ [78, 80[  "no spill store"
+++++ activating interval -1 object [ANY] 161 5 [4, 38[ 4 M 38 M  "no spill store"
      split_parent: 161, insert_move_when_activated: 0
      normal allocation of register
trying to find free register for -1 object [ANY] 161 5 [4, 38[ 4 M 38 M  "no spill store"
      state of registers:
      reg 0 ([esi|I]): use_pos: 2147483647
      reg 1 ([edi|I]): use_pos: 2147483647
      reg 2 ([ebx|I]): use_pos: 2147483647
      reg 3 ([eax|I]): use_pos: 78
      reg 4 ([edx|I]): use_pos: 2147483647
      reg 5 ([ecx|I]): use_pos: 2147483647
      hint registers 5 ([ecx|I]), 6 (# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/c1_LinearScan.cpp:3234
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/shade/trunks/jdk/src/hotspot/share/c1/c1_LinearScan.cpp:3234), pid=2618467, tid=2618483
#  assert(false) failed: unknown register
#
# JRE version: OpenJDK Runtime Environment (16.0) (fastdebug build 16-internal+0-adhoc.shade.jdk)
# Java VM: OpenJDK Server VM (fastdebug 16-internal+0-adhoc.shade.jdk, mixed mode, tiered, g1 gc, linux-x86)
# Problematic frame:
# V  [libjvm.so+0x631910]  LinearScan::print_reg_num(outputStream*, int)+0xc0
#

I suspect the refactoring in JDK-8251093 introduced this.
Comments
Changeset: 13fe054c Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2020-10-12 08:16:33 +0000 URL: https://git.openjdk.java.net/jdk/commit/13fe054c
12-10-2020

ILW = Assert during compilation, with C1 debug option, no workaround but disable debug output = HLM = P3
25-09-2020

Looks like the additional logging for a hint_regHi (which is only used in 32-bit builds) contains an unknown register number. I'm not yet sure if it's an actual problem in the code or if it is expected to see this illegal register number there. Will have a closer look.
24-09-2020