3 Replies Latest reply on Jun 22, 2004 1:54 PM by acoliver

    POP problem

    kabirkhan

      I've not been able to reproduce the issue with the mails delivered wrong users. BTW I did not receive anything not meant for me today (can't really find out for my jboss_user subscription). Has anything changed on the server? I think there was talk about upgrading to 3.2.4RC2? I'm running RC1 locally.

      There is another issue though related to POP and mailbox locking. The following assumes a mailbox with one mail in it, Thread 1 is an app written in JavaMail, and Thread 2 is me connecting via telnet. In the examples they are already logged in, and have issued the STAT command. For Thread I I am showing the JavaMail command followed by the actual POP commands issued in brackets when it gets around to the closing.

      Case 1:

      Thread 1 Thread 2
      ======== ========
      RETR 1
       DELE 1
      
      Folder.close()
      (
      DELE 1
      QUIT
      )
      
       QUIT
      

      Here thread 1 finishes OK, Thread 2 on the other hand causes the following error on the server:

      19:43:09,257 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.String org.jboss.mail.mailbox.entity.message.LocalMessage.getId(), causedBy:
      javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=-5271467427629056184

      The telnet window appears to stay connected and you can still type stuff into it, but whatever you type is ignored by the server. The thread on the server does not appear to be closed.

      Case 2:

      Thread 1 Thread 2
      ======== ========
       DELE 1
      
      RETR 1
      Causes a MessageRemovedException
      ->
      Folder.close()
      (
      QUIT
      )
      
       QUIT
      


      Again Thread 2 shows the same behaviour as in case 1, which must mean that Thread 1 is committing the delete done by thread 2 on QUIT


      Case 3:

      Thread 1 Thread 2
      ======== ========
       DELE 1
       QUIT
      Folder.close()
      (
      DELE 1
      QUIT
      )
      


      Kind of the reverse of Case 1. Here Thread 2 finishes OK, Thread 1 causes the entity not found error on the server, and the app hangs in the call to Folder.close().

      These are just my observations, I'll post more once I've looked to see what could be going on.

      Cheers,

      Kab

        • 1. Re: POP problem
          acoliver

          That is funky. Note that I have not upgraded yet. I just increased the amount of memory (now tomcat is crashing) -- Relax, I plan on upgrading my server *real soon now*. The andy resource is ATM locked in a transaction regarding getting the jboss newsletter running.

          • 2. Re: POP problem
            kabirkhan

            The "hanging socket/telnet" stuff above was due to that the server thread with the error does in fact gets terminated somewhere in PooledExecutor stuff, but the socket wasn't getting closed. I've made it close.

            A new EntityFolder is created on every request and gets locked, but the lock is never reused since everybody else gets their own instance of EntityFolder. I'll try to add something for this, assuming that we want strict mailbox locking.

            • 3. Re: POP problem
              acoliver

              Look at what the Spec says. It says something about the locking. Presently we can't *send* from two different threads with the same user...