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

Race conditions and possible leaks in the Shell class

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

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.10.0, 3.2.0
    • None
    • None
    • None

    Description

      YARN-5641 introduced some cleanup code in the Shell class. It has a race condition. Shell.runCommand() can be called while/after Shell.getAllShells() returned all the shells to be cleaned up. This new thread can avoid the clean up, so that the process held by it can be leaked causing leaked localized files/etc.

      I see another issue as well. Shell.runCommand() has a finally block with a process.destroy(); to clean up. However, the try catch block does not cover all instructions after the process is started, so for example we can exit the thread and leak the process, if timeOutTimer.schedule(timeoutTimerTask, timeOutInterval); causes an exception.

      Attachments

        Issue Links

        Activity

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

          People

            ebadger Eric Badger Assign to me
            miklos.szegedi@cloudera.com Miklos Szegedi

            Dates

              Created:
              Updated:

              Slack

                Issue deployment