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

serviceability/jvmti/HeapMonitor tests intermittently fail due to large TLAB size

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • hotspot
    • b17
    • generic
    • generic

    Description

      test/hotspot/jtreg/serviceability/jvmti/HeapMonitor tests
      Test with 'JTREG=JOBS=12;VM_OPTIONS=-XX:ActiveProcessorCount=1' on Linux X64 machine with 256G memory

      serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorArrayAllSampledTest.java Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Could not set the sampler
      serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorInterpreterArrayTest.java Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: No expected events were found: false, false
      serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorInterpreterObjectTest.java Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Statistics should show about 1801.8018018018017 samples.
      serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorMultiArrayTest.java Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Could not set the sampler
      serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorRecursiveTest.java Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Could not set the sampler
      serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorVMEventsTest.java Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Could not set the sampler

      intermittently failure happens when use serial/parallel, when initial TLAB is bigger than about 20M, Heap Monitor test might fails. When using G1/ZGC region based GC, TLAB is less than region size and fine in most configuration.

      It takes two steps to enable expected Object Sampling
      1. consume current TLAB
         then allocation enters allocate_inside_tlab_slow and check
         JvmtiExport::should_post_sampled_object_alloc
      2. consume initial ThreadHeapSampler::_bytes_until_sample
         then runtime invokes pick_next_sample and check sampleing interval
         and update _bytes_until_sample.
         initial _bytes_until_sample is geometric variable with the specified mean
         (512K by default), check ThreadHeapSampler::pick_next_geometric_sample()

      Attachments

        Issue Links

          Activity

            People

              hshi Hui Shi
              hshi Hui Shi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: