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

        Noel J. Bergman created issue -
        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.
        Noel J. Bergman made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        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.
        Noel J. Bergman made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Noel J. Bergman made changes -
        Assignee Noel J. Bergman [ noel ]
        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.
        Noel J. Bergman made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Noel J. Bergman added a comment -

        Resolve and close.

        Show
        Noel J. Bergman added a comment - Resolve and close.
        Noel J. Bergman made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        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
        Norman Maurer made changes -
        Status Closed [ 6 ] Reopened [ 4 ]
        Assignee Noel J. Bergman [ noel ] Stefano Bagnara [ bago ]
        Resolution Fixed [ 1 ]
        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.
        Stefano Bagnara made changes -
        Assignee Stefano Bagnara [ bago ] Noel J. Bergman [ noel ]
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Danny Angus added a comment -

        Closing issue fixed in released version.

        Show
        Danny Angus added a comment - Closing issue fixed in released version.
        Danny Angus made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Workflow jira [ 12377331 ] Default workflow, editable Closed status [ 12566310 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12566310 ] jira [ 12581676 ]

          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