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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.3.0
    • nodemanager
    • 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

        1. YARN-10019-002.patch
          11 kB
          Peter Bacsko
        2. YARN-10019-001.patch
          10 kB
          Peter Bacsko

        Activity

          People

            pbacsko Peter Bacsko
            pbacsko Peter Bacsko
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: