RVM
  1. RVM
  2. RVM-626

Objects in SortTODObjectReferenceStack popped from data structure in wrong order, causing Merlin traces to be incorrect

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.9.1, 2.9.2, 2.9.3, 3.0, 3.0.1
    • Fix Version/s: 3.1.4
    • Component/s: MMTk: GCTrace
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      3

      Description

      The Merlin codes in Jikes RVM uses a SortTODObjectReferenceStack to maintain a list of all dead objects during each collection. After the collection, the data structure is sorted from high to low, and ObjectReferences are expected to be popped off in high-to-low order. However, the ObjectReferences are actually popped off in low-to-high order, which causes the Merlin algorithm to compute incorrect death times for objects.

      The problem is that the data structure that stores the ObjectReferences is supposed to be a deque, so you should be able to push/pop to either end of it. Somewhere along the line it lost the ability to pop from one end, and the Merlin code assumes you are popping from the other end of the data structure. So the references come out in the wrong order.

      I have attached two patches against 2.9.1. The first, gctrace-build-run.diff, allows you first to build and run the GCTrace configuration (it did not work in stock 2.9.1). The second, gctrace-sort-order-fix.diff, fixes the SortTODObjectReferenceStack issue described in this bug report.

      1. updated-gctrace-sort-order-fix.diff
        7 kB
        Erik Brangs
      2. gctrace-sort-order-fix.diff
        8 kB
        Eddie Aftandilian
      3. gctrace-build-run.diff
        2 kB
        Eddie Aftandilian

        Activity

        Hide
        David Grove added a comment -

        Defer to 3.1.1

        Show
        David Grove added a comment - Defer to 3.1.1
        Hide
        David Grove added a comment -

        bulk defer open issues to 3.1.2

        Show
        David Grove added a comment - bulk defer open issues to 3.1.2
        Hide
        David Grove added a comment -

        Bulk defer to 3.1.3; not essential to address for 3.1.2.

        Show
        David Grove added a comment - Bulk defer to 3.1.3; not essential to address for 3.1.2.
        Hide
        Erik Brangs added a comment -

        This issue has been deferred multiple times although patches were provided.

        The provided GCTrace build patch is no longer relevant but GCTrace still does not build (see RVM-858).

        I'm not really familiar with Merlin so I can't do any review of the contents of Eddie's sort order patch. However, I'm attaching an updated version of Eddie Aftandilian's sort order fix patch that complies with the checkstyle rules. It also removes a @SuppressWarnings that is made unnecessary by Eddie's patch.

        It would be nice if someone from the core team could fix this issue and RVM-858 for 3.1.3.

        Show
        Erik Brangs added a comment - This issue has been deferred multiple times although patches were provided. The provided GCTrace build patch is no longer relevant but GCTrace still does not build (see RVM-858 ). I'm not really familiar with Merlin so I can't do any review of the contents of Eddie's sort order patch. However, I'm attaching an updated version of Eddie Aftandilian's sort order fix patch that complies with the checkstyle rules. It also removes a @SuppressWarnings that is made unnecessary by Eddie's patch. It would be nice if someone from the core team could fix this issue and RVM-858 for 3.1.3.
        Hide
        David Grove added a comment -

        Someone from MMTk has to handle this one. Steve (or delegate to Daniel)...

        Show
        David Grove added a comment - Someone from MMTk has to handle this one. Steve (or delegate to Daniel)...
        Hide
        David Grove added a comment -

        bulk defer to 3.1.4

        Show
        David Grove added a comment - bulk defer to 3.1.4

          People

          • Assignee:
            Steve Blackburn
            Reporter:
            Eddie Aftandilian
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: