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

[JVMCI] don't clear InstalledCode reference when unloading JVMCI nmethods

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b29

      Backports

        Description

        We have been getting crashes running our unit tests in our gates with JDK15. The crashes are mostly in nmethod::is_unloaded because IsUnloadingBehaviour::current() is null. It seemed like there was some inconsistency in the notion of is_unloading for JVMCI nmethods that was leading to the crashes. I noticed that the is_unloading path rescans the nmethod using a closure to determine if it's unloading and since make_unloaded will clear the InstalledCode reference at the end if you ran the closure again it might return false since the oop is now null instead of being an unmarked oop. There's no point in clearing the oop in this path anyway since the nmethod is dead and leaving the oop around seem to solve this crash. We're only see this crash in 15 but I don't see why it couldn't occur in 11 or later.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                never Tom Rodriguez
                Reporter:
                never Tom Rodriguez
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: