Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-5809

AsyncDispatcher possibly invokes multiple shutdown thread when handling exception

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha2
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      below code when handling exceptions: it is possible to launch multiple shutdown threads if there are events left in the queue that caused to throw exceptions.

          } catch (Throwable t) {
            //TODO Maybe log the state of the queue
            LOG.fatal("Error in dispatcher thread", t);
            // If serviceStop is called, we should exit this thread gracefully.
            if (exitOnDispatchException
                && (ShutdownHookManager.get().isShutdownInProgress()) == false
                && stopped == false) {
              Thread shutDownThread = new Thread(createShutDownThread());
              shutDownThread.setName("AsyncDispatcher ShutDown handler");
              shutDownThread.start();
            }
          }
      

        Attachments

          Activity

            People

            • Assignee:
              jianhe Jian He
              Reporter:
              jianhe Jian He
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: