Hadoop Common
  1. Hadoop Common
  2. HADOOP-7194

Potential Resource leak in IOUtils.java

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.1, 0.22.0, 0.23.0
    • Component/s: io
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      IOUtils.java
      
      try {
            copyBytes(in, out, buffSize);
          } finally {
            if(close) {
              out.close();
              in.close();
            }
          }
      

      In the above code if any exception throws from the out.close() statement, in.close() statement will not execute and the input stream will not be closed.

        Issue Links

          Activity

          Devaraj K created issue -
          Devaraj K made changes -
          Field Original Value New Value
          Attachment HADOOP-7194.patch [ 12474511 ]
          Devaraj K made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Tsz Wo Nicholas Sze made changes -
          Hadoop Flags [Reviewed]
          Assignee Devaraj K [ devaraj.k ]
          Tsz Wo Nicholas Sze made changes -
          Affects Version/s 0.23.0 [ 12315569 ]
          Tsz Wo Nicholas Sze made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Fix Version/s 0.21.1 [ 12315270 ]
          Fix Version/s 0.22.0 [ 12314296 ]
          Fix Version/s 0.23.0 [ 12315569 ]
          Resolution Fixed [ 1 ]
          Uma Maheswara Rao G made changes -
          Link This issue relates to HADOOP-7437 [ HADOOP-7437 ]
          Arun C Murthy made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Plamen Jeliazkov made changes -
          Link This issue is duplicated by HDFS-4588 [ HDFS-4588 ]

            People

            • Assignee:
              Devaraj K
              Reporter:
              Devaraj K
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development