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

container-executor: misc improvements in child processes and exec() calls

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0
    • Component/s: nodemanager
    • Labels:
      None

      Description

      There are a couple of improvements that we can do in container-executor regarding how we exit from child processes and how we handle failed exec() calls:

      1. If we're in the child code path and we detect an erroneous condition, the usual way is just simply call _exit(). Normal exit() occurs in the parent. Calling _exit() prevents flushing stdio buffers twice and any cleanup logic registered with atexit() or on_exit() will run only once.

      2. There's code like if (execlp(script_file_dest, script_file_dest, NULL) != 0) ... which is not necessary. Exec functions are not supposed to return. If they do, it's definitely an error, so no need to check the return value.

        Attachments

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              pbacsko Peter Bacsko Assign to me
              Reporter:
              pbacsko Peter Bacsko

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment