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

[REDO][REDO] G1 Needs pre barrier on dereference of weak JNI handles

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b164
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        Mach 5 9-hs detected test failures due to this changeset:

        Changeset: 3bc68ff68250
        Author: kbarrett
        Date: 2017-02-15 22:19 -0500
        URL: http://hg.openjdk.java.net/jdk9/hs/hotspot/rev/3bc68ff68250

        8166188: G1 Needs pre barrier on dereference of weak JNI handles
        Summary: Add low tag to jweaks and G1 barrier for jweak loads.
        Reviewed-by: mgerdin, mdoerr, pliden, dlong, dcubed, coleenp, aph, tschatzl
        Contributed-by: kim.barrett@oracle.com, martin.doerr@sap.com, volker.simonis@sap.com


        which was pushed at 2028 PT/2128 MT/2328 ET so it did not make the 1900 PT
        2017.02.15 nightly cutoff. Mach5's 14 test failures appear to all be in JDK
        tests... Of course, we don't know if there will be additional failures in
        JDK9-hs nightly testing.


        So the good news: Mach5 detected this failure earlier than we would
        have seen it with our normal HotSpot nightly! And with the email
        notification to all of the folks involved, there has already been
        eight follow-up messages (I don't count this one).

          Issue Links

            Activity

            Hide
            mgerdin Mikael Gerdin added a comment -
            Transferred integration_blocker and hs_nightly labels from duplicate bug.
            Show
            mgerdin Mikael Gerdin added a comment - Transferred integration_blocker and hs_nightly labels from duplicate bug.
            Hide
            jwilhelm Jesper Wilhelmsson added a comment -
            Is this actually a new issue? If it is caused by JDK-8162795 as suggested in JDK-8176325 the problem is already in jdk9/jdk9 so this would not be an integration blocker.
            Show
            jwilhelm Jesper Wilhelmsson added a comment - Is this actually a new issue? If it is caused by JDK-8162795 as suggested in JDK-8176325 the problem is already in jdk9/jdk9 so this would not be an integration blocker.
            Hide
            mgerdin Mikael Gerdin added a comment -
            Oh, that's right!
            Show
            mgerdin Mikael Gerdin added a comment - Oh, that's right!
            Hide
            mgerdin Mikael Gerdin added a comment -
            Fix Request
            This day-one bug in G1 has become more critical as usage of weak JNI handles has drastically increased since the reintroduction of the fix in JDK-8162795. This issue is suspected to be a duplicate of an issue that has impacted both WLS JDK 9 uptake (JDK-8176365) and has occurred in hotspot nightly testing in JDK-8176325.
            The fix adds a tag bit to all JNI weak handles (jweak), this is needed because G1 needs to detect when a weak reference is dereferenced but the jweak type is aliased to jobject so the type system is of no help to us. The tag bit needs to be stripped out and acted upon in several pieces of platform specific code.
            The risk of the fix is not negligible since it has in fact been backed out twice but the problems uncovered have been easy to fix.
            The fix comes with regression tests for the problematic cases we came up with. It has also been tested with HS tier 2-5 common+gc and has been reviewed by a large amount of people since this is the third iteration of the fix:
            mdoerr, pliden, dlong, dcubed, coleenp, aph, tschatzl (both mgerdin and kbarrett have worked on the fix in different iterations and have reviewed the changesets as well). A webrev of the fix is located at: http://cr.openjdk.java.net/~mgerdin/8176100/
            Show
            mgerdin Mikael Gerdin added a comment - Fix Request This day-one bug in G1 has become more critical as usage of weak JNI handles has drastically increased since the reintroduction of the fix in JDK-8162795 . This issue is suspected to be a duplicate of an issue that has impacted both WLS JDK 9 uptake ( JDK-8176365 ) and has occurred in hotspot nightly testing in JDK-8176325 . The fix adds a tag bit to all JNI weak handles (jweak), this is needed because G1 needs to detect when a weak reference is dereferenced but the jweak type is aliased to jobject so the type system is of no help to us. The tag bit needs to be stripped out and acted upon in several pieces of platform specific code. The risk of the fix is not negligible since it has in fact been backed out twice but the problems uncovered have been easy to fix. The fix comes with regression tests for the problematic cases we came up with. It has also been tested with HS tier 2-5 common+gc and has been reviewed by a large amount of people since this is the third iteration of the fix: mdoerr, pliden, dlong, dcubed, coleenp, aph, tschatzl (both mgerdin and kbarrett have worked on the fix in different iterations and have reviewed the changesets as well). A webrev of the fix is located at: http://cr.openjdk.java.net/~mgerdin/8176100/
            Hide
            kvn Vladimir Kozlov added a comment -
            Fix approved.
            Show
            kvn Vladimir Kozlov added a comment - Fix approved.
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/hs/hotspot/rev/b163435e40b3
            User: mgerdin
            Date: 2017-03-22 15:57:36 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs/hotspot/rev/b163435e40b3 User: mgerdin Date: 2017-03-22 15:57:36 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/b163435e40b3
            User: lana
            Date: 2017-04-05 18:30:46 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/b163435e40b3 User: lana Date: 2017-04-05 18:30:46 +0000
            Hide
            lmesnik Leonid Mesnik added a comment -
            Bugs found by nightly testing. Verified by passed nightly.
            Show
            lmesnik Leonid Mesnik added a comment - Bugs found by nightly testing. Verified by passed nightly.

              People

              • Assignee:
                mgerdin Mikael Gerdin
                Reporter:
                jwilhelm Jesper Wilhelmsson
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: