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

Deflate monitors of dead objects before they become unreachable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • 21
    • 21, repo-lilliput
    • hotspot
    • generic
    • generic

      With compact object headers (JDK-8305895), I've seen occasional failures in G1, where the refinement thread tries to parse a heap region that has dead objects, and would sometimes see an object with a monitor that has already been deflated. And because deflation does not bother to restore the header of dead objects, when heap iteration tries to load the Klass* of the dead object, it would reach to unknown memory and crash.

      The fix is to restore the header of dead objects just before they become unreachable. This can be done in the closures used by WeakProcessor::weak_oops_do(), right before the weak root will be cleared.

      Notice that this is only a bug with compact object headers. It doesn't hurt to fix this in general, though.

      See Lilliput PR: https://github.com/openjdk/lilliput/pull/28

            rkennke Roman Kennke
            rkennke Roman Kennke
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: