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

G1 sometimes performs one or more young gcs with zero sized eden after evacuation failure before issuing a full gc

    Details

    • Type: Bug
    • Status: Open
    • Priority: P5
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd_major
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc

      Description

      After an evacuation failure, G1 sometimes issues young-only gcs (maybe more than one) with zero sized eden (which accomplish nothing) before doing a full gc.

      E.g.

      2016-08-24T15:29:12.302+0000: 17776.029: [GC pause (G1 Evacuation Pause) (young)
      Desired survivor size 1795162112 bytes, new threshold 2 (max 2)
       17776.029: [G1Ergonomics (CSet Construction) start choosing CSet, _pending_cards: 0, predicted base time: 14.07 ms, remaining time: 285.93 ms, target pause time: 300.00 ms]
       17776.029: [G1Ergonomics (CSet Construction) add young regions to CSet, eden: 0 regions, survivors: 0 regions, predicted young region time: 0.00 ms]
       17776.029: [G1Ergonomics (CSet Construction) finish choosing CSet, eden: 0 regions, survivors: 0 regions, old: 0 regions, predicted pause time: 14.07 ms, target pause time: 300.00 ms]
      2016-08-24T15:29:12.305+0000: 17776.033: [SoftReference, 0 refs, 0.0012417 secs]2016-08-24T15:29:12.307+0000: 17776.034: [WeakReference, 0 refs, 0.0007101 secs]2016-08-24T15:29:12.307+0000: 17776.035: [FinalReference, 0 refs, 0.0007027 secs]2016-08-24T15:29:12.308+0000: 17776.035: [PhantomReference, 0 refs, 0 refs, 0.0013585 secs]2016-08-24T15:29:12.309+0000: 17776.037: [JNI Weak Reference, 0.0000118 secs], 0.0089758 secs]
         [Parallel Time: 3.1 ms, GC Workers: 23]

      [...]

         [Eden: 0.0B(30.0G)->0.0B(30.0G) Survivors: 0.0B->0.0B Heap: 95.2G(96.0G)->95.2G(96.0G)]
       [Times: user=0.08 sys=0.00, real=0.01 secs]
      2016-08-24T15:29:12.311+0000: 17776.038: Total time for which application threads were stopped: 0.0103002 seconds, Stopping threads took: 0.0000566 seconds
       17776.039: [G1Ergonomics (Heap Sizing) attempt heap expansion, reason: allocation request failed, allocation request: 32 bytes]
       17776.039: [G1Ergonomics (Heap Sizing) expand the heap, requested expansion amount: 33554432 bytes, attempted expansion amount: 33554432 bytes]
       17776.039: [G1Ergonomics (Heap Sizing) did not expand the heap, reason: heap already fully expanded]
      2016-08-24T15:29:12.312+0000: 17776.039: [Full GC (Allocation Failure) 2016-08-24T15:29:40.727+0000: 17804.454: [SoftReference, 5504 refs, 0.0012432 secs]2016-08-24T15:29:40.728+0000: 17804.456: [WeakReference, 1964 refs, 0.0003012 secs]2016-08-24T15:29:40.728+0000: 17804.456: [FinalReference, 3270 refs, 0.0033290 secs]2016-08-24T15:29:40.732+0000: 17804.459: [PhantomReference, 0 refs, 75 refs, 0.0000257 secs]2016-08-24T15:29:40.732+0000: 17804.459: [JNI Weak Reference, 0.0000172 secs] 95G->38G(96G), 95.5305034 secs]
         [Eden: 0.0B(30.0G)->0.0B(30.0G) Survivors: 0.0B->0.0B Heap: 95.2G(96.0G)->38.9G(96.0G)], [Metaspace: 104180K->103365K(106496K)]
       [Times: user=157.02 sys=0.28, real=95.54 secs]

      See also the thread at http://mail.openjdk.java.net/pipermail/hotspot-gc-use/2016-August/002443.html

        Activity

        Hide
        ehelin Erik Helin added a comment -
        Deferring to tbd_major. Thid behavior, although strange, causes no harm in product builds. Users will at most experience one, or a few (depending on number of threads with allocation failure), YCs when the heap is full due to evacuation failure.
        Show
        ehelin Erik Helin added a comment - Deferring to tbd_major. Thid behavior, although strange, causes no harm in product builds. Users will at most experience one, or a few (depending on number of threads with allocation failure), YCs when the heap is full due to evacuation failure.

          People

          • Assignee:
            Unassigned
            Reporter:
            tschatzl Thomas Schatzl
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: