Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.23.0, 2.0.0-alpha, 3.0.0-alpha1
    • Fix Version/s: 0.23.11, 2.3.0
    • Component/s: util
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      JDK7's Process output streams have an async fd-close race bug. This manifests as commands run via o.a.h.u.Shell causing threads to hang, OOM, or cause other bizarre behavior. The NM is likely to encounter the bug under heavy load.

      Specifically, ProcessBuilder's UNIXProcess starts a thread to reap the process and drain stdout/stderr to avoid a lingering zombie process. A race occurs if the thread using the stream closes it, the underlying fd is recycled/reopened, while the reaper is draining it. ProcessPipeInputStream.drainInputStream's will OOM allocating an array if in.available() returns a huge number, or may wreak havoc by incorrectly draining the fd.

        Attachments

        1. HADOOP-10146.patch
          2 kB
          Daryn Sharp
        2. HADOOP-10146.branch-23.patch
          2 kB
          Daryn Sharp
        3. HADOOP-10129.patch
          2 kB
          Daryn Sharp
        4. HADOOP-10129.branch-23.patch
          2 kB
          Daryn Sharp

          Issue Links

            Activity

              People

              • Assignee:
                daryn Daryn Sharp
                Reporter:
                daryn Daryn Sharp
              • Votes:
                1 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: