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

AM heartbeat stuck when responseId overflows MAX_INT

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: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0-beta1, 2.8.2
    • None
    • None

    Description

      The current code in ApplicationMasterService:
      if ((request.getResponseId() + 1) == lastResponse.getResponseId())

      {/* old heartbeat */ return lastResponse;}

      else if (request.getResponseId() + 1 < lastResponse.getResponseId())

      { throw ... }

      process the heartbeat...

      When a heartbeat comes in, in usual case we are expecting request.getResponseId() == lastResponse.getResponseId(). The “if“ is for the duplicate heartbeat that’s one step old, the “else if” is to throw and complain for heartbeats more than two steps old, otherwise we accept the new heartbeat and process it.

      So the bug is: when lastResponse.getResponseId() == MAX_INT, the newest heartbeat comes in with responseId == MAX_INT. However reponseId + 1 will be MIN_INT, and we will fall into the “else if” case and RM will throw. Then we are stuck here…

      Attachments

        Issue Links

        Activity

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

          People

            botong Botong Huang Assign to me
            botong Botong Huang
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment