Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11499

Check of executorThreadsStarted in ValueQueue#submitRefillTask() evades lock acquisition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.7.0
    • None
    • None
    • Reviewed

    Description

          if (!executorThreadsStarted) {
            synchronized (this) {
              // To ensure all requests are first queued, make coreThreads =
              // maxThreads
              // and pre-start all the Core Threads.
              executor.prestartAllCoreThreads();
              executorThreadsStarted = true;
            }
          }
      

      It is possible that two threads executing the above code both see executorThreadsStarted as being false, leading to executor.prestartAllCoreThreads() called twice.

      Attachments

        Activity

          People

            yuzhihong@gmail.com Ted Yu
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: