RFR: 8261731: shallow copy the internal buffer of a scalar-replaced java.lang.String object
Tobias Hartmann
thartmann at openjdk.java.net
Tue Mar 9 07:17:07 UTC 2021
On Mon, 8 Mar 2021 19:31:58 GMT, Xin Liu <xliu at openjdk.org> wrote:
>> java/lang/String/Split.java and java/lang/management/MemoryMXBean/LowMemoryTest2.sh fail with:
>> # Internal Error (open/src/hotspot/share/opto/macro.cpp:1378), pid=5320, tid=5499
>> # assert(n->Opcode() == Op_LoadUB || n->Opcode() == Op_LoadB) failed: unknow code shape
>>
>> Current CompileTask:
>> C2: 11623 994 ! 4 Split::main (651 bytes)
>>
>> Stack: [0x00007ff1869fe000,0x00007ff186aff000], sp=0x00007ff186afa2d0, free space=1008k
>> Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
>> V [libjvm.so+0x12f8a5f] PhaseMacroExpand::process_users_of_string_allocation(AllocateArrayNode*, ArrayCopyNode*)+0x83f
>> V [libjvm.so+0x1303e0e] PhaseMacroExpand::eliminate_allocate_node(AllocateNode*) [clone .part.0]+0x4be
>> V [libjvm.so+0x130447c] PhaseMacroExpand::eliminate_macro_nodes()+0x57c
>> V [libjvm.so+0xa0fbb5] Compile::Optimize()+0x1235
>> V [libjvm.so+0xa11c85] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x1905
>> V [libjvm.so+0x83d69a] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1ea
>> V [libjvm.so+0xa21aa1] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xf21
>> V [libjvm.so+0xa22748] CompileBroker::compiler_thread_loop()+0x5a8
>> V [libjvm.so+0x18488e1] JavaThread::thread_main_inner()+0x271
>> V [libjvm.so+0x1850b30] Thread::call_run()+0x100
>> V [libjvm.so+0x153b086] thread_native_entry(Thread*)+0x116
>>
>>
>> And I see some internal testing failing with SIGSEGV in `PhaseMacroExpand::eliminate_allocate_node`
>
>> Split.java
>
> hi, @TobiHartmann ,
> Could you teach me how to trigger crashes for java/lang/String/Split.java and java/lang/management/MemoryMXBean/LowMemoryTest2.sh ?
>
> I tried different options like "'-ea -esa -XX:CompileThreshold=100' with/without -XComp, -XX:-TieredCompilation. still no luck.
> or Could you paste a replay file so I can investigate it?
Sure, here are the replay and hs_err files for the Split.java failure:
[replay_pid5320.log](https://github.com/openjdk/jdk/files/6106543/replay_pid5320.log)
[hs_err_pid5320.log](https://github.com/openjdk/jdk/files/6106544/hs_err_pid5320.log)
And for the LowMemoryTest2 failure:
[replay_pid18829.log](https://github.com/openjdk/jdk/files/6106550/replay_pid18829.log)
[hs_err_pid18829.log](https://github.com/openjdk/jdk/files/6106551/hs_err_pid18829.log)
It seems like the failures are very intermittent though :(
-------------
PR: https://git.openjdk.java.net/jdk/pull/2570
More information about the hotspot-compiler-dev
mailing list