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

SLS can deadlock when all the threads are taken by AMSimulators

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.5.1
    • 2.6.0
    • None
    • Reviewed

    Description

      The simulation may enter deadlock if all application simulators hold all threads provided by the thread pool, and all wait for AM container allocation. In that case, all AM simulators wait for NM simulators to do heartbeat to allocate resource, and all NM simulators wait for AM simulators to release some threads. The simulator is deadlocked.

      To solve this deadlock, need to remove the while() loop in the MRAMSimulator.

          // waiting until the AM container is allocated
          while (true) {
            if (response != null && ! response.getAllocatedContainers().isEmpty()) {
              // get AM container
              .....
              break;
            }
            // this sleep time is different from HeartBeat
            Thread.sleep(1000);
            // send out empty request
            sendContainerRequest();
            response = responseQueue.take();
          }
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ywskycn Wei Yan Assign to me
            ywskycn Wei Yan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment