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

Client$Connection#waitForWork may suffer from spurious wakeups

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 2.8.0
    • None
    • ipc
    • None

    Description

      Client$Connection#waitForWork may suffer spurious wakeup because the wait is not surrounded by a loop. See https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#wait().

      Client$Connection#waitForWork
            if (calls.isEmpty() && !shouldCloseConnection.get() && running.get())  {
              long timeout = maxIdleTime-
                    (Time.now()-lastActivity.get());
              if (timeout>0) {
                try {
                  wait(timeout);                          <<<<<<==== spurious wakeup
                } catch (InterruptedException e) {}
              }
            }
      

      Attachments

        1. HADOOP-14519.001.patch
          2 kB
          John Zhuge

        Activity

          People

            jzhuge John Zhuge
            jzhuge John Zhuge
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated: