[aarch64-port-dev ] Simple HTTP server app crashes on JDK 11 and 8 on OSv AArch64
Andrew Haley
aph-open at littlepinkcloud.com
Sat Mar 5 11:46:39 UTC 2022
On 3/5/22 10:08, Andrew Haley wrote:
> On 3/5/22 05:25, Waldek Kozaczuk wrote:
>> Any ideas on how to debug it further?
>>
>> Any help is greatly appreciated,
>> Waldek
>
> Is is possible to attach gdb? Is it possible to get a core dump?
>
> I see no attached file. Please put it on a file sharing system so we
> can see it.
Having said that, it looks like there may be a problem when patching
inline cache, and that may be due to a problem with cache flushing.
Maybe __builtin___clear_cache is flaky.
The caller is here:
address MacroAssembler::ic_call(address entry, jint method_index) {
RelocationHolder rh = virtual_call_Relocation::spec(pc(), method_index);
movptr(rscratch2, (uintptr_t)Universe::non_oop_word());
return trampoline_call(Address(entry, rh));
}
This generates a sequence that gets patched at runtime when a call is
resolved. The compiled sequence initially looks like this:
0xffffa5be35e0: mov x9, #0xffff // #65535
0xffffa5be35e4: movk x9, #0xffff, lsl #16
0xffffa5be35e8: movk x9, #0xffff, lsl #32
0xffffa5be35ec: bl 0xffffa5bd23c0
then it gets patched to look like this:
0xffffa5be35e0: mov x9, #0x1b58 // #7000
0xffffa5be35e4: movk x9, #0x4, lsl #16
0xffffa5be35e8: movk x9, #0x8, lsl #32
0xffffa5be35ec: bl 0xffffa5be36e0
It looks to me as though some threads aren't seeing the patched code,
and this could well be a kernel problem.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the aarch64-port-dev
mailing list