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

G1: FreeRegionList_test() fails with G1 after the JDK-8058534 fix to HeapRegion::orig_end()

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b42

      Backports

        Description

        The internal VM tests fail when they are run with G1:

        $ java -XX:+UseG1GC -XX:+ExecuteInternalVMTests -version

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/localhome/repos/jdk9-hs-gc-push/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp:202), pid=29853, tid=139726758901504
        # assert(_end == orig_end()) failed: we should have already filtered out humongous regions
        #
        # JRE version: Java(TM) SE Runtime Environment (9.0-b30) (build 1.9.0-ea-b30)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.9.0-internal mixed mode linux-amd64 compressed oops)
        # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
        #
        # If you would like to submit a bug report, please visit:
        # http://bugreport.sun.com/bugreport/crash.jsp
        #

        --------------- T H R E A D ---------------

        Current thread (0x00007f14a400b800): JavaThread "main" [_thread_in_vm, id=29858, stack(0x00007f14abc47000,0x00007f14abd48000)]

        Stack: [0x00007f14abc47000,0x00007f14abd48000], sp=0x00007f14abd45b00, free space=1018k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x10a5690] VMError::report_and_die()+0x160
        V [libjvm.so+0x74096b] report_vm_error(char const*, int, char const*, char const*)+0x7b
        V [libjvm.so+0x90b41f] HeapRegion::initialize(MemRegion, bool, bool)+0x10f
        V [libjvm.so+0x90b9fd] HeapRegion::HeapRegion(unsigned int, G1BlockOffsetSharedArray*, MemRegion)+0x29d
        V [libjvm.so+0x91b7fc] FreeRegionList_test()+0x26c
        V [libjvm.so+0xa6a9f6] execute_internal_vm_tests()+0x2d6
        V [libjvm.so+0xab0197] JNI_CreateJavaVM+0x287
        C [libjli.so+0x747c] JavaMain+0x8c
        C [libpthread.so.0+0x8182] start_thread+0xc2


        The test fails on this assert in HeapRegion::hr_clear():

        assert(_end == orig_end(),

        The reason for the failure is that the internal test, FreeRegionList_test() in heapRegionSet.cpp, creates heap regions with invalid memory regions. There is this comment in the test:


          // Create a fake heap. It does not need to be valid, as the HeapRegion constructor
          // does not access it.
          MemRegion heap(NULL, num_regions_in_test * HeapRegion::GrainWords);

        The problem is that this is no longer true. The assert in HeapRegion::hr_clear() actually looks at the memory region.

        So, my guess is that the fix is to create more consistent memory regions in the test.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  brutisso Bengt Rutisson (Inactive)
                  Reporter:
                  brutisso Bengt Rutisson (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: