RFR JDK-8194084: Obsolete FastTLABRefill and remove the related code

Stuart Monteith stuart.monteith at linaro.org
Mon Feb 19 14:24:43 UTC 2018


I've tried building with Aleksey's patch
(http://cr.openjdk.java.net/~shade/8198341/fixes.patch), but came
across a JVM crash when building OpenJDK.

I need to look a bit closer, but the patch "8194084: Obsolete
FastTLABRefill and remove the related code" is causing SIGBUS
BUS_ADRALN errors. The stack pointer is becoming unaligned, and so
breaks on aarch64.
For example, in your patch you do:

-          __ ldp(r5, r19, Address(__ post(sp, 2 * wordSize)));
+          __ ldr(r19, Address(__ post(sp, wordSize)));

You can only have a 16-byte aligned stack pointer, and you replaced
two loads with one, resulting in an unaligned SP.

Here's some extracts from an hs_err during my build:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0x7) at pc=0x0000010008991764, pid=10622, tid=10623

Stack: [0x0000010001950000,0x0000010001b50000],
sp=0x0000010001b4c758,  free space=2033k
Native frames: (J=compiled Java code, A=aot compiled Java code,
j=interpreted, Vv=VM code, C=native code)
v  ~RuntimeStub::fast_new_instance Runtime1 stub
C  0x0000010001b4c900


siginfo: si_signo: 7 (SIGBUS), si_code: 1 (BUS_ADRALN), si_addr:
0x00000100042afc08

  0x000001000899175c: sub       x0, x0, #0x10
  0x0000010008991760: dmb       ishst
  0x0000010008991764: ldr       x19, [sp],#8
  0x0000010008991768: ret


You shouldn't ever have an "8" as the least-significant-hex-digit for
the stack pointer.



BR,
   Stuart


On 18 February 2018 at 22:38, JC Beyler <jcbeyler at google.com> wrote:
> I just checked and it seems good to me for the other architectures but as I
> say in the bug, my track record for this fix is not so good ;-)
> Jc
>
> On Sun, Feb 18, 2018 at 12:55 PM, Aleksey Shipilev <shade at redhat.com> wrote:
>
>> On 02/16/2018 06:06 PM, JC Beyler wrote:
>> > I updated the webrev to:
>> > http://cr.openjdk.java.net/~jcbeyler/8194084/webrev.01/
>> >
>> > - arm: missing a looks good and test
>> > - x86: missing a looks good and test :)
>>
>> Well, current jdk/hs builds do not look very good ;)
>>   https://bugs.openjdk.java.net/browse/JDK-8198341
>>
>> JC, can you eyeball the patch for these kinds of failures on other
>> platforms and follow up?
>>
>> Thanks,
>> -Aleksey
>>
>>


More information about the hotspot-dev mailing list