James Server
  1. James Server
  2. JAMES-585

SMTP Server may leak temporary ($[JAMES}/temp/*.m64) files

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.3.0
    • Component/s: SMTPServer
    • Labels:
      None

      Description

      If there is an exception during message processing, before the message is posted to the spooler, the temporary files may not be cleaned up. This appears to be due to an unintended and implied reliance on finalize() to dispose the temporary files.

        Activity

        Hide
        Noel J. Bergman added a comment -

        Should be resolved by r428097.

        An alternative would have been to incorporate the FileCleaner from Commons I/O, which is used for the same purpose in Commons FileUpload.

        Show
        Noel J. Bergman added a comment - Should be resolved by r428097. An alternative would have been to incorporate the FileCleaner from Commons I/O, which is used for the same purpose in Commons FileUpload.
        Hide
        Noel J. Bergman added a comment -

        I'm still seeing it ... need to find out why.

        Show
        Noel J. Bergman added a comment - I'm still seeing it ... need to find out why.
        Hide
        Noel J. Bergman added a comment -

        Current status:

        1) After applying r428097, even though some files appear to leak, they are deleted when the JVM terminates.
        2) A private build, using a copy of org.apache.commons.io.FileCleaner, does not appear to leak files at all during runtime.

        I will continue to test to see if the FileCleaner solution, which was written for just this purpose, resolves the issue.

        Show
        Noel J. Bergman added a comment - Current status: 1) After applying r428097, even though some files appear to leak, they are deleted when the JVM terminates. 2) A private build, using a copy of org.apache.commons.io.FileCleaner, does not appear to leak files at all during runtime. I will continue to test to see if the FileCleaner solution, which was written for just this purpose, resolves the issue.
        Hide
        Noel J. Bergman added a comment -

        Stefano had another though, involving changing

        MimeMessageInputStreamSource.getInputStream from:
        return new SharedFileInputStream(file);
        to
        return new BufferedInputStream(new FileInputStream(file));

        Show
        Noel J. Bergman added a comment - Stefano had another though, involving changing MimeMessageInputStreamSource.getInputStream from: return new SharedFileInputStream(file); to return new BufferedInputStream(new FileInputStream(file));
        Hide
        Noel J. Bergman added a comment -

        NOW I am closing this issue. The changes in r428404 appear to have done the trick, and r428480 backs out some of the earlier changes.

        Show
        Noel J. Bergman added a comment - NOW I am closing this issue. The changes in r428404 appear to have done the trick, and r428480 backs out some of the earlier changes.
        Hide
        Noel J. Bergman added a comment -

        Resolve and close.

        Show
        Noel J. Bergman added a comment - Resolve and close.
        Hide
        Norman Maurer added a comment -

        This bug is still not fixed. Stefano has a idea.. so i assign it to him

        Show
        Norman Maurer added a comment - This bug is still not fixed. Stefano has a idea.. so i assign it to him
        Hide
        Stefano Bagnara added a comment -

        Norman, you reopened the wrong bug
        JAMES-584 is the one still being reproducible.

        Show
        Stefano Bagnara added a comment - Norman, you reopened the wrong bug JAMES-584 is the one still being reproducible.
        Hide
        Danny Angus added a comment -

        Closing issue fixed in released version.

        Show
        Danny Angus added a comment - Closing issue fixed in released version.

          People

          • Assignee:
            Noel J. Bergman
            Reporter:
            Noel J. Bergman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development