Uploaded image for project: 'JikesRVM'
  1. JikesRVM
  2. RVM-626

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

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 3.0.1, 3.0, 2.9.3, 2.9.2, 2.9.1
    • Fix Version/s: 3.1.4
    • Component/s: MMTk: GCTrace
    • Labels:
      None

      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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            dgrove David Grove added a comment -

            Defer to 3.1.1

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

            bulk defer open issues to 3.1.2

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

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

            Show
            dgrove David Grove added a comment - Bulk defer to 3.1.3; not essential to address for 3.1.2.
            Hide
            ebrangs 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
            ebrangs 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
            dgrove David Grove added a comment -

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

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

            bulk defer to 3.1.4

            Show
            dgrove David Grove added a comment - bulk defer to 3.1.4

              People

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

                Dates

                • Created:
                  Updated: