0 Replies Latest reply: Jun 4, 2009 3:24 PM by 807574 RSS

    imexpire hangs

    807574
      # imsimta version
      Sun Java(tm) System Messaging Server 6.2-7.05 (built Sep 5 2006)
      libimta.so 6.2-7.05 (built 12:18:44, Sep 5 2006)
      SunOS v491 5.10 Generic_138888-01 sun4u sparc SUNW,Sun-Fire-V490

      I've written some imexpire rules and tested them on individuals and partitions. For the most part the rules work as expected. However, sometimes they will hang. At first I was running the rules against a whole partition and they would hang on one particular user. If I kill it and run it again it will hang on the same user. However, if I run it just against that same user, it will work just fine. Originally my solution was to run individual instances of imexpire against each individual user with a batch sh script calling the 100's of imexpire commands sequentially, and that worked for a few hundred users, however, then I encountered cases where that would freeze up too. However, running imexpire again against the same user will work fine.

      I've also experimented with running only some of my rules and not all of them at once. It seems that if I run rules Trash1-4 I never get any stuck processes. However, if I run just Trash5 or Trash1-5, then that will hang eventually.

      ---------
      root# cat store.expirerule
      # Expire/Purge any messages that have been saved for more
      # than 90 days in "Trash", "Deleted Items", "Deleted"
      # or "Deleted Messages"
      # folder for more than 90 days
      Trash1.regexp: 1
      Trash1.folderpattern: user/.*/Trash
      Trash1.savedays: 90
      #
      Trash2.regexp: 1
      Trash2.folderpattern: user/.*/Deleted Items
      Trash2.savedays: 90
      #
      Trash3.regexp: 1
      Trash3.folderpattern: user/.*/Deleted
      Trash3.savedays: 90
      #
      Trash4.regexp: 1
      Trash4.folderpattern: user/.*/Deleted Messages
      Trash4.savedays: 90
      #
      # Move to "Trash" any messages that marked for deletion from
      # any other folders
      Trash5.regexp: 1
      Trash5.folderpattern: user/.*/INBOX
      Trash5.deleted: or
      Trash5.action: fileinto: Trash

      -------

      Running truss on the process shows this at the end:

      <snip>
      fstat(21, 0xFFBFB548) = 0
      lseek(21, 0, SEEK_SET) = 0
      read(21, "\0\00102\0\002C4\0\0\001".., 80) = 80
      mmap(0x00000000, 54064, PROT_READ, MAP_SHARED, 21, 0) = 0xFD850000
      fstat(21, 0xFFBFBDF8) = 0
      lwp_cond_wait(0xF9544CC0, 0xF9544CA8, 0x00000000, 0) (sleeping...)

      -------

      After I finish running an imexpire on the partition successfully (after many kill -9's and re-runs) then it seems to run fine on that partition on subsequent runs. However, I have limited data on this, so it might just not have crashed yet.

      ---------

      I was hoping someone on here can assist me with two things:

      1) What is the best way to kill stuck imexpire processes without also killing stored or mshttpd. Or is that even possible? I've been using kill -9, but if there is a gentler way, I'm all ears.
      2) Why are my imexpire processes getting hung and how can I prevent that?

      Thanks,
      Breeze