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

owstTaskTerminator::do_spin_master_work checks termination condition without lock

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 12, 13
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc

      Description

      owstTaskTerminator.cpp

       156 if (exit_termination(tasks, terminator)) {
       157 MonitorLockerEx locker(_blocker, Mutex::_no_safepoint_check_flag);
       158 if (tasks >= _offered_termination - 1) {
       159 locker.notify_all();
       160 } else {
       161 for (; tasks > 1; tasks--) {
       162 locker.notify();
       163 }
       164 }
       165 _spin_master = NULL;
       166 return false;
       167 } else if (_offered_termination == _n_threads) {
       168 return true;
       169 }
       170 }

      Line 167, it checks termination without _blocker lock( _offer_termination is a shared variable).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zgu Zhengyu Gu
                Reporter:
                zgu Zhengyu Gu
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: