Uploaded image for project: 'OODT'
  1. OODT
  2. OODT-145

StreamGobbler stopGobblingAndDie() method doesn't wait until gobble is really dead

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.2
    • Fix Version/s: 0.3
    • Component/s: commons
    • Labels:
      None
    • Environment:

      none

      Description

      This causes the streams in ExecUtils to close its output and input streams before the gobbler finishes it's flush causing the following errors:

      java.io.IOException: Stream closed
      at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:145)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:308)
      at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
      at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
      at java.io.InputStreamReader.read(InputStreamReader.java:167)
      at java.io.BufferedReader.fill(BufferedReader.java:136)
      at java.io.BufferedReader.readLine(BufferedReader.java:299)
      at java.io.BufferedReader.readLine(BufferedReader.java:362)
      at org.apache.oodt.commons.exec.StreamGobbler.run(StreamGobbler.java:67)

      java.io.IOException: Bad file descriptor
      at java.io.FileInputStream.readBytes(Native Method)
      at java.io.FileInputStream.read(FileInputStream.java:199)
      at java.lang.UNIXProcess$DeferredCloseInputStream.read(UNIXProcess.java:227)
      at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
      at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
      at java.io.InputStreamReader.read(InputStreamReader.java:167)
      at java.io.BufferedReader.fill(BufferedReader.java:136)
      at java.io.BufferedReader.readLine(BufferedReader.java:299)
      at java.io.BufferedReader.readLine(BufferedReader.java:362)
      at org.apache.oodt.commons.exec.StreamGobbler.run(StreamGobbler.java:67)

        Attachments

          Activity

            People

            • Assignee:
              bfoster Brian Foster
              Reporter:
              bfoster Brian Foster
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: