Issue Details (XML | Word | Printable)

Key: JAMES-585
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Noel J. Bergman
Reporter: Noel J. Bergman
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JAMES Server

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

Created: 02/Aug/06 05:30 PM   Updated: 21/Nov/07 08:31 AM
Return to search
Component/s: SMTPServer
Affects Version/s: 2.3.0
Fix Version/s: 2.3.0

Time Tracking:
Not Specified

Resolution Date: 04/Aug/06 01:05 PM


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Noel J. Bergman added a comment - 02/Aug/06 07:18 PM
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 added a comment - 02/Aug/06 08:03 PM
I'm still seeing it ... need to find out why.

Noel J. Bergman added a comment - 02/Aug/06 11:11 PM
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.

Noel J. Bergman added a comment - 02/Aug/06 11:39 PM
Stefano had another though, involving changing

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

Noel J. Bergman added a comment - 03/Aug/06 11:55 PM
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 added a comment - 03/Aug/06 11:55 PM
Resolve *and* close.

Norman Maurer added a comment - 04/Aug/06 10:44 AM
This bug is still not fixed. Stefano has a idea.. so i assign it to him ;-)

Stefano Bagnara added a comment - 04/Aug/06 01:05 PM
Norman, you reopened the wrong bug ;-)
JAMES-584 is the one still being reproducible.

Danny Angus added a comment - 21/Nov/07 08:31 AM
Closing issue fixed in released version.