James Server
  1. James Server
  2. JAMES-268

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.0
    • Labels:
      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.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1h 8m 1 Noel J. Bergman 22/Apr/04 02:50
        Resolved Resolved Closed Closed
        44d 17h 38m 1 Vincenzo Gianferrari Pini 05/Jun/04 20:29
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12565826 ] jira [ 12581236 ]
        Mark Thomas made changes -
        Workflow jira [ 31108 ] Default workflow, editable Closed status [ 12565826 ]
        Vincenzo Gianferrari Pini made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Noel J. Bergman made changes -
        Fix Version/s 2.2.0RC2 [ 10700 ]
        Fix Version/s 2.2.0RC1 [ 10689 ]
        Noel J. Bergman made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Noel J. Bergman added a comment -

        Committed fix to CVS. Initial tests appear to indicate that all is well.

        Show
        Noel J. Bergman added a comment - Committed fix to CVS. Initial tests appear to indicate that all is well.
        Noel J. Bergman created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Noel J. Bergman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development