[aarch64-port-dev ] SPECjvm2008 derby gives SIGBUS with -XX:+TieredCompilation

Edward Nevill edward.nevill at linaro.org
Tue Jan 21 02:32:13 PST 2014


On Thu, 2014-01-09 at 10:00 +0000, Edward Nevill wrote:
> Hi,
> 
> On the RTSM model I get a SIGBUS from the 'derby' benchmark in SPECjvm2008 running -XX:+TieredCompilation.
> 
> This seems to be 100% reproducible on the RTSM model but I cannot reproduce it on the builtin sim.
> 

To follow up on this.

It turns out not to be a problem with TieredCompilation as such. It is a problem with +CompressedOops in the client compiler.

Normally, CompressedOops is disabled when running the client compiler, however when running TieredCompilation CompressOops gets enabled.

I can replicate the behaviour with the client compiler only using the following command:-

/home/ed/images/j2sdk-client-fastdebug/bin/java -Xmx4g -XX:+UseCompressedOops -XX:CompileThreshold=500 -XX:BackEdgeThreshold=50000 -jar SPECjvm2008.jar -ikv derby

.......
Warmup (120s) begins: Fri Oct 13 12:35:15 UTC 2028
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000007f8a7fddfc, pid=25454, tid=547381834224
#
# JRE version: OpenJDK Runtime Environment (8.0) (build 1.8.0-internal-fastdebug-ed_2014_01_20_13_31-b00)
# Java VM: OpenJDK 64-Bit Client VM (25.0-b59-fastdebug mixed mode linux-aarch64 compressed oops)
# Problematic frame:
# J 2482 C1 java.util.concurrent.locks.AbstractQueuedSynchronizer.enq(Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$Node;)Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$Node; (58 bytes) @ 0x0000007f8a7fddfc [0x0000007f8a7fdc60+0x19c]
#
.......

If I exclude the following method then it runs successfully when running +Tiered.

java.util.concurrent.locks.AbstractQueuedSynchronizer::compareAndSetTail

Here is a disassembly of the method when running +Tiered and -Tiered. I have tried eyeballing the code but I cannot see anything wrong.

If anyone can see anything wrong with the code please let me know:-)

Otherwise I will just continue investigating,

All the best,
Ed.

--- +Tiered compilation (failing case) ----
[Entry Point]
  # {method} {0x0000007f5bd45b10} 'compareAndSetTail' '(Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$Node;Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$Node;)Z' in 'java/util/concurrent/locks/AbstractQueuedSynchronizer'
  # this:     c_rarg1:c_rarg1 
                        = 'java/util/concurrent/locks/AbstractQueuedSynchronizer'
  # parm0:    c_rarg2:c_rarg2 
                        = 'java/util/concurrent/locks/AbstractQueuedSynchronizer$Node'
  # parm1:    c_rarg3:c_rarg3 
                        = 'java/util/concurrent/locks/AbstractQueuedSynchronizer$Node'
  #           [sp+0x50]  (sp of caller)
  ;;  block B1 [0, 0]

  0x0000007f712e9880: ldr	w8, [x1,#8]     ;   {no_reloc}
  0x0000007f712e9884: lsl	x8, x8, #3
  0x0000007f712e9888: cmp	x8, x9
  0x0000007f712e988c: b.eq	0x0000007f712e9894
  0x0000007f712e9890: b	0x0000007f71147b20      ;   {runtime_call}
  0x0000007f712e9894: nop
  0x0000007f712e9898: nop
  0x0000007f712e989c: nop
[Verified Entry Point]
  0x0000007f712e98a0: nop
  ;; 0xFFFFFFFFFFFF7000
  0x0000007f712e98a4: movn	x9, #0x8fff
  0x0000007f712e98a8: ldr	xzr, [sp,x9]
  0x0000007f712e98ac: stp	x29, x30, [sp,#-16]!
  0x0000007f712e98b0: mov	x29, sp
  0x0000007f712e98b4: sub	sp, sp, #0x40
  0x0000007f712e98b8: ldr	x0, 0x0000007f712e9860
                                                ;   {section_word}
  0x0000007f712e98bc: ldr	w4, [x0,#108]
  0x0000007f712e98c0: add	w4, w4, #0x8
  0x0000007f712e98c4: str	w4, [x0,#108]
  0x0000007f712e98c8: ldr	x0, 0x0000007f712e9868
                                                ;   {section_word}
  0x0000007f712e98cc: and	w4, w4, #0x1ff8
  0x0000007f712e98d0: cmp	w4, #0x0
  ;;   24 branch [EQ] [CounterOverflowStub: 0x2936be28]
  0x0000007f712e98d4: b.eq	0x0000007f712e9930  ;*getstatic unsafe
                                                ; - java.util.concurrent.locks.AbstractQueuedSynchronizer::compareAndSetTail at 0 (line 2294)

  ;;  block B2 [0, 0]

  ;;  block B0 [0, 12]

  0x0000007f712e98d8: add	x0, x1, #0x18
  0x0000007f712e98dc: lsr	x2, x2, #3
  0x0000007f712e98e0: mov	x9, x3
  0x0000007f712e98e4: lsr	x9, x9, #3
  0x0000007f712e98e8: ldaxr	w8, [x0]
  0x0000007f712e98ec: cmp	w8, w2
  0x0000007f712e98f0: cset	x8, ne
  0x0000007f712e98f4: b.ne	0x0000007f712e9900
  0x0000007f712e98f8: stlxr	w8, w9, [x0]
  0x0000007f712e98fc: cbnz	x8, 0x0000007f712e98e8
  0x0000007f712e9900: eor	w1, w8, #0x1
  0x0000007f712e9904: lsr	x0, x0, #9
  ;; 0x7F81B71000
  0x0000007f712e9908: movz	x2, #0x1000
  0x0000007f712e990c: movk	x2, #0x81b7, lsl #16
  0x0000007f712e9910: movk	x2, #0x7f, lsl #32
  0x0000007f712e9914: strb	wzr, [x0,x2,lsl #0]  ;*invokevirtual compareAndSwapObject
                                                ; - java.util.concurrent.locks.AbstractQueuedSynchronizer::compareAndSetTail at 9 (line 2294)

  0x0000007f712e9918: mov	x0, x1
  0x0000007f712e991c: add	sp, sp, #0x40
  0x0000007f712e9920: ldp	x29, x30, [sp],#16
  0x0000007f712e9924: adrp	x8, 0x0000007f873e6000
                                                ;   {poll_return}
  0x0000007f712e9928: ldr	wzr, [x8,#256]  ;   {poll_return}
  0x0000007f712e992c: ret
--- CUT HERE ---


--- -TieredCompilation (success case) ---
[Entry Point]
[Constants]
  # {method} {0x0000007f8c6e0308} 'compareAndSetTail' '(Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$Node;Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$Node;)Z' in 'java/util/concurrent/locks/AbstractQueuedSynchronizer'
  # this:     c_rarg1:c_rarg1 
                        = 'java/util/concurrent/locks/AbstractQueuedSynchronizer'
  # parm0:    c_rarg2:c_rarg2 
                        = 'java/util/concurrent/locks/AbstractQueuedSynchronizer$Node'
  # parm1:    c_rarg3:c_rarg3 
                        = 'java/util/concurrent/locks/AbstractQueuedSynchronizer$Node'
  #           [sp+0x20]  (sp of caller)
  ;; N41: #	B1 <- BLOCK HEAD IS JUNK   Freq: 1

  0x0000007f8580a980: ldr	w8, [x1,#8]
  0x0000007f8580a984: lsl	x8, x8, #3
  0x0000007f8580a988: cmp	x9, x8
  0x0000007f8580a98c: b.eq	0x0000007f8580a994
  0x0000007f8580a990: b	0x0000007f85147b20      ;   {runtime_call}
  0x0000007f8580a994: nop
[Verified Entry Point]
  ;; B1: #	N41 <- BLOCK HEAD IS JUNK   Freq: 1

  0x0000007f8580a998: nop
  0x0000007f8580a99c: stp	x29, x30, [sp,#-16]!
  0x0000007f8580a9a0: sub	sp, sp, #0x10
  ;; membar-release (elided)
  0x0000007f8580a9a4: add	x10, x1, #0x18
  0x0000007f8580a9a8: lsr	x12, x3, #3
  0x0000007f8580a9ac: mov	x11, x10
  0x0000007f8580a9b0: lsr	x14, x2, #3
  0x0000007f8580a9b4: ldaxr	w8, [x10]
  0x0000007f8580a9b8: cmp	w8, w14
  0x0000007f8580a9bc: b.ne	0x0000007f8580a9d0
  0x0000007f8580a9c0: stlxr	w8, w12, [x10]
  0x0000007f8580a9c4: cmp	w8, wzr
  0x0000007f8580a9c8: b.eq	0x0000007f8580a9d0
  0x0000007f8580a9cc: b	0x0000007f8580a9b4
  0x0000007f8580a9d0: cset	x0, eq
  0x0000007f8580a9d4: lsr	x10, x11, #9
  ;; 0x7F8B0F5000
  0x0000007f8580a9d8: movz	x11, #0x5000
  0x0000007f8580a9dc: movk	x11, #0x8b0f, lsl #16
  0x0000007f8580a9e0: movk	x11, #0x7f, lsl #32
  0x0000007f8580a9e4: strb	wzr, [x11,x10,lsl #0]  ;*invokevirtual compareAndSwapObject
                                                ; - java.util.concurrent.locks.AbstractQueuedSynchronizer::compareAndSetTail at 9 (line 2294)

  ;; membar_acquire (elided)
  0x0000007f8580a9e8: add	sp, sp, #0x10
  0x0000007f8580a9ec: ldp	x29, x30, [sp],#16
  0x0000007f8580a9f0: adrp	x8, 0x0000007f9066a000
                                                ;   {poll_return}
  0x0000007f8580a9f4: ldr	wzr, [x8,#256]  ;   {poll_return}
  0x0000007f8580a9f8: ret
--- CUT HERE ---




More information about the aarch64-port-dev mailing list