You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ji...@apache.org on 2004/04/22 03:50:57 UTC

[jira] Resolved: (JAMES-268) Spooler.accept(...) can leave locked messages and leak memory

Message:

   The following issue has been resolved as FIXED.

   Resolver: Noel J. Bergman
       Date: Wed, 21 Apr 2004 6:50 PM

Committed fix to CVS.  Initial tests appear to indicate that all is well.
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-268

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-268
    Summary: Spooler.accept(...) can leave locked messages and leak memory
       Type: Bug

     Status: Resolved
   Priority: Major
 Resolution: FIXED

    Project: James
 Components: 
             MailStore & MailRepository
   Fix Fors:
             2.2.0RC1
   Versions:
             2.2.0RC1

   Assignee: 
   Reporter: Noel J. Bergman

    Created: Wed, 21 Apr 2004 5:42 PM
    Updated: Wed, 21 Apr 2004 6:50 PM

Description:
I believe there is a memory leak under an error condition in the spooler that I'll be fixing, but that should be able to wait for a 2.2.1.  If I am correct, the nature of the error is here:

 if (lock(s)) {
     MailImpl mail = null;
     try {
        mail = retrieve(s);
     } catch (javax.mail.MessagingException e) {
       ...
     }
     if (mail == null) {
        continue;
     }

If retrieve returns null or throws an exception, the lock is kept, and we leak memory.  Also ...

     if (filter.accept (mail.getName(),
                        mail.getState(),
                        mail.getLastUpdated().getTime(),
                        mail.getErrorMessage())) {
        return mail;
     }

If the filter doesn't accept, we leak the lock info, although we'll eventually clean it up.  The problem here is that the message is forever locked for this specific thread.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org