Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-268

Spooler.accept(...) can leave locked messages and leak memory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.2.0
    • None

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            noel Noel J. Bergman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: