Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8240700

ARM32 clientvm: BarrierSetC1 encounters ARM32 ldrsb instruction offset limit

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
    • Environment:

      ARM32 clientvm fastdebug build

    • Subcomponent:
      gc
    • CPU:
      aarch32
    • OS:
      linux

      Description

      Hotspot jtreg GC tests throws assert on clientvm fastdebug ARM32 build. Number of failing tests: 63

      The assertion is reproduced on clientVM only. ServerVM build is Ok.
      The assertion is reproduced on fastdebug, but on release build displacement value is the same, it just generates instruction with wrong offset silently!

      How to reproduce:
        jtreg-5.0/bin/jtreg -v -jdk:clientvm-jdk-15/fastdebug/ -dir:test_sources/test/hotspot/jtreg/gc TestAgeOutput.java

      hs_err_pid6242.log:
      #
      # Internal Error (/ws/jdk-dev/src/hotspot/cpu/arm/assembler_arm.hpp:185), pid=6242, tid=6256
      # assert(-256 < _disp && _disp < 256) failed: encoding constraint
      #
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x1b2cc0] Address::encoding3() const+0x248
      V [libjvm.so+0x1a2f38] LIR_Assembler::mem2reg(LIR_OprDesc*, LIR_OprDesc*, BasicType, LIR_PatchCode, CodeEmitInfo*, bool, bool)+0x478
      V [libjvm.so+0x19ab60] LIR_Assembler::emit_op1(LIR_Op1*)+0x38c
      V [libjvm.so+0x19b9a8] LIR_Assembler::emit_lir_list(LIR_List*)+0xdc
      V [libjvm.so+0x19c6ec] LIR_Assembler::emit_code(BlockList*)+0xec
      V [libjvm.so+0x139434] Compilation::emit_code_body()+0x130

      replay_pidxxxx.log last line is always "compile jdk/internal/misc/Unsafe getReferenceAcquire (Ljava/lang/Object;J)Ljava/lang/Object; -1 1"

      The actual wrong displasement value is 259. Originally it comes from LIR_Address::LIR_Address(InstanceKlass::reference_type_offset):

      LIR_Address::LIR_Address
      G1BarrierSetC1::load_at_resolved
      LIRGenerator::access_load_at
      LIRGenerator::do_UnsafeGetObject
      LIRGenerator::do_root
      LIRGenerator::block_do
      BlockList::iterate_forward
      Compilation::emit_lir
      Compilation::compile_java_method

      src/hotspot/share/gc/shared/c1/barrierSetC1.cpp
      =============================
      >void BarrierSetC1::generate_referent_check(LIRAccess& access, LabelObj* cont) {
      >..
      >..if (gen_pre_barrier) {
      >..
      >....if (gen_type_check) {
      >......
      >......LIR_Address* reference_type_addr = new LIR_Address(src_klass, in_bytes(InstanceKlass::reference_type_offset()), T_BYTE);

      Failing tests:
      > compiler/gcbarriers/PreserveFPRegistersTest.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > compiler/regalloc/C1ObjectSpillInLogicOp.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/arguments/TestAlignmentToUseLargePages_id2.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/class_unloading/TestClassUnloadingDisabled_id2.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/concurrent_phase_control/TestConcurrentPhaseControlG1Basics.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/concurrent_phase_control/TestConcurrentPhaseControlG1.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/humongousObjects/TestHumongousClassLoader.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/humongousObjects/TestHumongousMovement.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/humongousObjects/TestHumongousNonArrayAllocation.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/humongousObjects/TestHumongousThreshold.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/humongousObjects/TestNoAllocationsInHRegions.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/humongousObjects/TestObjectCollected.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/ihop/TestIHOPErgo.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/ihop/TestIHOPStatic.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/mixedgc/TestLogging.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/mixedgc/TestOldGenCollectionUsage.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/numa/TestG1NUMATouchRegions.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/plab/TestPLABResize.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestConcurrentSystemGC.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestEagerReclaimHumongousRegionsClearMarkBits.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestEdenSurvivorLessThanMax.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestGreyReclaimedHumongousObjects.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestHumongousAllocInitialMark.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestHumongousRemsetsMatch.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestHumongousShrinkHeap.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestJNIWeakG1/TestJNIWeakG1.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestLargePageUseForAuxMemory.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestLargePageUseForHeap.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestNoEagerReclaimOfHumongousRegions.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestNoUseHCC.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestParallelAlwaysPreTouch.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestPeriodicCollectionJNI.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestPeriodicCollection.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestRegionAlignment.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestRegionLivenessPrint.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestShrinkAuxiliaryData00.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestShrinkDefragmentedHeap.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestShrinkToOneRegion.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestStringDeduplicationAgeThreshold.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestStringDeduplicationFullGC.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestStringDeduplicationInterned.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestStringDeduplicationPrintOptions.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestStringDeduplicationTableRehash.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestStringDeduplicationTableResize.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/g1/TestStringDeduplicationYoungGC.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/metaspace/G1AddMetaspaceDependency.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/metaspace/TestMetaspacePerfCounters_id2.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/stress/gcold/TestGCOldWithG1.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/stress/jfr/TestStressAllocationGCEventsWithG1.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/stress/jfr/TestStressBigAllocationGCEventsWithG1.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/stress/systemgc/TestSystemGCWithG1.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/stress/TestMultiThreadStressRSet.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/stress/TestStressG1Humongous.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/stress/TestStressIHOPMultiThread.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/stress/TestStressRSetCoarsening.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/TestAgeOutput_id1.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/TestGenerationPerfCounter_id2.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/TestHumongousReferenceObject_id1.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/TestMemoryMXBeansAndPoolsPresence_id0.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/TestNumWorkerOutput.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/TestPolicyNamePerfCounter_id2.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/TestSystemGC_id2.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint
      > gc/whitebox/TestConcMarkCycleWB.jtr:# assert(-256 < _disp && _disp < 256) failed: encoding constraint

        Attachments

          Activity

            People

            Assignee:
            bulasevich Boris Ulasevich
            Reporter:
            bulasevich Boris Ulasevich
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: