
|
If you were logged in you would be able to see more operations.
|
|
|
| Resolution Date: |
04/Aug/06 01:05 PM
|
|
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.
|
|
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. |
Show » |
| Repository |
Revision |
Date |
User |
Message |
| ASF |
#428237 |
Thu Aug 03 04:53:49 UTC 2006 |
noel |
JAMES-585. This change consists of the following changes:
1) RemoteManagerHander.java
Added two UNDOCUMENTED commands:
1) SHOWTRACKERS - Call the FileCleaner to display
a list of files that it is tracking to delete.
2) GC - Force a JVM garbage collection, which will
normally cause the FileCleaner to delete files
whose marker object (MimeMessageInputStreamSource
in our case) is not currently reachable.
2) MimeMessageInputStreamSource.java
Three changes:
1) Register all temporary files with FileCleaner.
2) At Stefano's suggestion, revert change to use
SharedFileInputStream,
3) Comment out finalize(), which is replaced by
using FileCleaner. The mere presence of the
finalize() method can actually cause problems.
3) FileCleaner
Two changes from what I copied from Commons I/O:
1) Add some instrumentation to let us inspect the
state of the tracker collection.
2) Print (to System.err, normally redirected to
${JAMES}/temp/phoenix.console) an error if
we cannot delete the file when asked.
In both cases, a stack trace is used to let us see
how the file was allocated, just to make sure that
we're not missing something about the behavior.
So far, with these changes I am no longer seeing any leaks. A few times, there were some files still around, but forcing a GC cleaned them up. The instrumentation was added to help investigate this behavior.
|
| Files Changed |
MODIFY
/james/server/branches/v2.3/src/java/org/apache/james/util/io/FileCleaner.java
MODIFY
/james/server/branches/v2.3/src/java/org/apache/james/remotemanager/RemoteManagerHandler.java
MODIFY
/james/server/branches/v2.3/src/java/org/apache/james/core/MimeMessageInputStreamSource.java
|
|