Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-4573

Potential resource leak due to unclosed RandomAccessFile in TaskManagerLogHandler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.2.0
    • None
    • None

    Description

                                                      try {
                                                              raf = new RandomAccessFile(file, "r");
                                                      } catch (FileNotFoundException e) {
                                                              display(ctx, request, "Displaying TaskManager log failed.");
                                                              LOG.error("Displaying TaskManager log failed.", e);
                                                              return;
                                                      }
                                                      long fileLength = raf.length();
                                                      final FileChannel fc = raf.getChannel();
      

      If length() throws IOException, raf would be left unclosed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yuzhihong@gmail.com Ted Yu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: