JDK-8272791 : java -XX:BlockZeroingLowLimit=1 crashes after 8270947
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,17,18,19,repo-loom
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: aarch64
  • Submitted: 2021-08-20
  • Updated: 2024-01-24
  • Resolved: 2022-05-25
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 17 JDK 19
11.0.18-oracleFixed 17.0.6-oracleFixed 19 b24Fixed
Related Reports
Relates :  
Description
java -XX:BlockZeroingLowLimit=1

crashes with 

#

Internal Error (/home/opc/jdk/open/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp:4683), pid=3200679, tid=3200693
guarantee(zero_words_block_size < BlockZeroingLowLimit) failed: increase BlockZeroingLowLimit
#
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/1504 Date: 2022-11-04 18:31:41 +0000
04-11-2022

Fix request [17u] I backport this for parity with 17.0.6-oracle. Low risk, trivial change. Follow-up to 8270947. Clean backport. SAP nightly testing passed.
18-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/798 Date: 2022-10-14 14:17:19 +0000
14-10-2022

Changeset: e17118aa Author: Andrew Haley <aph@openjdk.org> Date: 2022-05-25 09:03:13 +0000 URL: https://git.openjdk.java.net/jdk/commit/e17118aa8afb14dfca049f19fd98a1483b2b5c1b
25-05-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8756 Date: 2022-05-17 18:08:58 +0000
17-05-2022

The issue is reproduced with virtual on aarch64 only.
27-04-2022

This seems to duplicate easily in the loom repo with: Command Line: --enable-preview -Xmx1024m -XX:-ZapUnusedHeapArea -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:BlockZeroingLowLimit=1 jdk.test.lib.process.ProcessTools Virtual optionsvalidation.JVMStartup The stack trace of the compiler thread is always: Stack: [0x0000fffe20c80000,0x0000fffe20e80000], sp=0x0000fffe20e7b970, free space=2030k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x140a220] MacroAssembler::zero_words(RegisterImpl const*, unsigned long)+0x3b0 V [libjvm.so+0x85dee0] C1_MacroAssembler::initialize_object(RegisterImpl const*, RegisterImpl const*, RegisterImpl const*, int, RegisterImpl const*, RegisterImpl const*, bool)+0x33c V [libjvm.so+0x7f264c] LIR_Assembler::emit_alloc_obj(LIR_OpAllocObj*)+0xac V [libjvm.so+0x7dcea4] LIR_OpAllocObj::emit_code(LIR_Assembler*)+0x20 V [libjvm.so+0x7eda8c] LIR_Assembler::emit_lir_list(LIR_List*)+0xdc V [libjvm.so+0x7ee1c8] LIR_Assembler::emit_code(BlockList*)+0x74 V [libjvm.so+0x7947d4] Compilation::emit_code_body()+0x144 V [libjvm.so+0x794f2c] Compilation::compile_java_method()+0x55c V [libjvm.so+0x795a68] Compilation::compile_method()+0x1d8 V [libjvm.so+0x796404] Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*, bool, DirectiveSet*)+0x2e4 V [libjvm.so+0x797b08] Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x158 V [libjvm.so+0xa7d6b4] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x914 V [libjvm.so+0xa7e578] CompileBroker::compiler_thread_loop()+0x694 V [libjvm.so+0x18ba4b8] JavaThread::thread_main_inner()+0x238 V [libjvm.so+0x18c7248] Thread::call_run()+0xf8 V [libjvm.so+0x15c1fe4] thread_native_entry(Thread*)+0x104 C [libpthread.so.0+0x7868] start_thread+0x188
26-04-2022

Should we simply ensure BlockZeroingLowLimit is greater than 8 (changing the lower bound of the range(L,H) expression to, say, 16)? (Draft: https://github.com/openjdk/jdk/pull/5772)
30-09-2021

[~aph] could you please have a look?
23-08-2021

ILW = HLL = P4
20-08-2021

Found it by running test runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java in loom repo. java -XX:BlockZeroingLowLimit=1 crashes in jdk/jdk as well, however, seems not to be triggered in runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java
20-08-2021