JDK-8217790 : owstTaskTerminator::do_spin_master_work checks termination condition without lock
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 12,13
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2019-01-25
  • Updated: 2019-02-18
  • Resolved: 2019-01-25
Related Reports
Duplicate :  
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).

Comments
Has to fold into JDK-8215047
25-01-2019