james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Closed: (JAMES-268) Spooler.accept(...) can leave locked messages and leak memory
Date Sat, 05 Jun 2004 19:29:53 GMT
Message:

   The following issue has been closed.

---------------------------------------------------------------------
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: Closed
   Priority: Major
 Resolution: FIXED

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

   Assignee: 
   Reporter: Noel J. Bergman

    Created: Wed, 21 Apr 2004 5:42 PM
    Updated: Sat, 5 Jun 2004 12:29 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


Mime
View raw message