Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Mailmate crashes when searching "Unquoted Body Text" or

#800

Mailmate crashes every time that I try to run a search within "Unquoted Body Text" or "Common Headers or Body". Other fields, including "Quoted Body Text", work fine. I experienced this problem with the latest 1.7 as well as 1.8 (4214). I would really like to have this functionality.

Thanks,

-Dan

Reported by Dan Deighton · June 4th, 2014 @ 02:04 AM

State: new
Milestone: none
Assigned to: benny benny

Activity

  1. benny
    benny

    Have you allowed MailMate to send crash reports (General preferences pane)?

    Is it really crashing or is it hanging until you have to force quit?

    June 4th, 2014 @ 01:23 PM

  2. Dan Deighton
    Dan Deighton

    I enabled the crash report option. I will send a report shortly.

    It is actually crashing, not hanging.

    June 4th, 2014 @ 02:15 PM

  3. Dan Deighton
    Dan Deighton

    I just initiated a search that caused a crash. Can you verify that you received the crash report?

    June 4th, 2014 @ 02:23 PM

  4. benny
    benny

    I did. The crash happens when loading a database index (probably for the unquoted text). Three things to do:

    1. Update MailMate to the latest test version by holding down ⌥ when clicking “Check Now” in the Software Update preferences pane.
    2. Run this command and provide the output:

      ls -al ~/Library/Application\ Support/MailMate/Database.noindex/Headers/#unquoted*
      
    3. Run MailMate from the Terminal to see any error messages before the crash:

      /Applications/MailMate.app/Contents/MacOS/MailMate
      

    June 9th, 2014 @ 12:28 PM

  5. Dan Deighton
    Dan Deighton

    Here is the directory listing:

    $ ls -al ~/Library/Application\ Support/MailMate/Database.noindex/Headers/#unquoted*
    -rw-------+ 33 deighton  1031  1124946280 Jun  9 11:02 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted#lc.cache
    -rw-------+ 38 deighton  1031    75953556 Jun  9 11:02 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted#lc.offsets
    -rw-------+  1 deighton  1031          62 Jun  9 11:02 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted#lc.plist
    -rw-------+ 33 deighton  1031  1789645154 Jun  9 11:02 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted.cache
    -rw-------+ 38 deighton  1031   127588080 Jun  9 11:02 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted.offsets
    -rw-------+  1 deighton  1031          63 Jun  9 11:02 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted.plist
    

    Here is the Terminal output from the crash:

    $ /Applications/MailMate.app/Contents/MacOS/MailMate
    2014-06-09 11:04:02.425 MailMate[26009:507] Bartender: Loaded BartenderHelperSixtySeven
    Problems while parsing reported for one or more messages. Details can be found in
     /tmp/mailmate_logs/mailmate_parser_problems.log
    mmap: Cannot allocate memory
    ENOMEM: Unsuccessfully tried to map '/Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted#lc.cache' (1124955524)
    Abort trap: 6
    

    June 9th, 2014 @ 03:10 PM

  6. benny
    benny

    Ok, the problem is that MailMate runs out of address space. Those database files are huge. They are roughly 20 times bigger than mine. That would correspond to around 1 million messages if I scale up my numbers. MailMate cannot handle that which means your emails might be very large on average? If you have 100K messages then they contain 11KB of unquoted text on average...

    How many messages do you have (estimated)?

    Have you deleted a large number of messages (or removed accounts)?

    June 9th, 2014 @ 09:47 PM

  7. Dan Deighton
    Dan Deighton

    I have >500k messages across 3 different accounts. I haven't deleted a large number of messages nor have I removed accounts.

    What can MailMate handle? Is it worth rebuilding the indexes to see if they should be smaller? I can do some cleanup, but I'm sure I will run into the problem down the road. Can I restrict the indexes to ignore messages over X number of days?

    Any help would be appreciated.

    June 9th, 2014 @ 10:26 PM

  8. benny
    benny

    You are close to the limit I think. (I know some other users have ~500K messages, but it wouldn't work on my hardware.)

    Rebuilding the indexes is only going to help if it's a bug that made them so big. Is there any reason that you might have a very large average message size (unquoted text, not attachments)?

    For the sake of comparison, I would also like to see the following:

    ls -al ~/Library/Application\ Support/MailMate/Database.noindex/Headers/#quoted*
    

    I'll think about possible workarounds, but first I would like to figure out if there is a bug in play as well.

    June 9th, 2014 @ 10:40 PM

  9. Dan Deighton
    Dan Deighton

    Here is the output:

    $ ls -al ~/Library/Application\ Support/MailMate/Database.noindex/Headers/#quoted*
    -rw-------+ 15 deighton  1031  53468013 Jun  9 18:16 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#quoted#lc.cache
    -rw-------+ 17 deighton  1031  35510052 Jun  9 18:16 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#quoted#lc.offsets
    -rw-------+  1 deighton  1031        60 Jun  9 18:16 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#quoted#lc.plist
    -rw-------+  1 deighton  1031        22 May 10 11:31 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#quoted-markup.cache
    -rw-------+  1 deighton  1031     30096 Jun  9 18:16 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#quoted-markup.offsets
    -rw-------+  1 deighton  1031        53 Jun  9 18:16 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#quoted-markup.plist
    -rw-------+ 15 deighton  1031  53563307 Jun  9 18:16 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#quoted.cache
    -rw-------+ 17 deighton  1031  35510064 Jun  9 18:16 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#quoted.offsets
    -rw-------+  1 deighton  1031        60 Jun  9 18:16 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#quoted.plist
    

    June 9th, 2014 @ 10:53 PM

  10. Dan Deighton
    Dan Deighton

    Offhand, I don't know why my average, unquoted size would be so high.

    June 9th, 2014 @ 10:57 PM

  11. Dan Deighton
    Dan Deighton

    I cleaned up a bunch of messages. Now, when I start MailMate, I receive a "Segmentation fault:11" error. I can't do anything before it crashes. Any thoughts on this or should I just start from scratch with MailMate?

    June 10th, 2014 @ 01:25 PM

  12. benny
    benny

    First try a manual rebuild if possible: http://manual.mailmate-app.com/rebuild

    I'm still puzzled by the file sizes. If a rebuild is possible then it would be nice to see the result of the ls commands afterwards.

    For how long have you used MailMate?

    Do you ever delete messages permanently (empty the trash)? If yes, How many messages would you say are deleted per day (rough estimate)?

    June 10th, 2014 @ 01:33 PM

  13. Dan Deighton
    Dan Deighton

    I initiated a manual rebuild by moving the #unquoted* files out of the Headers directory. The good news is that after the rebuild the #unquoted* indexes are much smaller:

    $ ls -al ~/Library/Application\ Support/MailMate/Database.noindex/Headers/#unquoted*
    -rw-------+ 9 deighton  STSCI\science  599400257 Jun 10 15:19 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted#lc.cache
    -rw-------+ 5 deighton  STSCI\science   40428708 Jun 10 15:19 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted#lc.offsets
    -rw-------+ 1 deighton  STSCI\science         61 Jun 10 15:19 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted#lc.plist
    -rw-------+ 9 deighton  STSCI\science  599430688 Jun 10 15:19 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted.cache
    -rw-------+ 5 deighton  STSCI\science   40428708 Jun 10 15:19 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted.offsets
    -rw-------+ 1 deighton  STSCI\science         61 Jun 10 15:19 /Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted.plist
    

    The bad news is that MailMate is still crashing:

    mmap: Cannot allocate memory
    ENOMEM: Unsuccessfully tried to map '/Users/deighton/Library/Application Support/MailMate/Database.noindex/Headers/#unquoted#lc.cache' (599353379)
    

    June 10th, 2014 @ 07:23 PM

  14. Dan Deighton
    Dan Deighton

    BTW, I have been using MailMate since May 2013. (I love it BTW).

    I permanently delete messages about once a month. When I do, it is probably 100s or even 1000s of messages at a time.

    June 10th, 2014 @ 07:25 PM

  15. benny
    benny

    It's positive that MailMate was able to complete the rebuild, but that doesn't help when the files are still too large. How long did the rebuild take?

    I have an experimental 64 bit version of MailMate which would probably not run into this problem. Unfortunately, it is even more memory hungry which means I don't think that is a viable solution before that is improved. But you probably cannot wait for that.

    MailMate has some (large) upper limits on how much plain text is indexed from any given message. I could make these configurable in order for you to limit the size of these files (requiring another rebuild though). Would that be a viable solution for you?

    Actually, you could also quit MailMate and then delete the files without the #lc suffix. This would prevent you from doing case sensitive search, but that might be acceptable.

    June 11th, 2014 @ 03:35 PM

  16. Dan Deighton
    Dan Deighton

    I would estimate the rebuild took ~2 hours. I wasn't paying attention though.

    Limiting the amount of indexed text would be useful. That would certainly be better than the current situation. I would try that. In the meantime, I can remove the non-#lc files. That would be another improvement for me.

    Thanks!

    June 11th, 2014 @ 09:20 PM

  17. benny
    benny

    There is a whole set of hidden preferences now to control this (untested though). The most interesting are probably these:

    defaults write com.freron.MailMate MmMaximumTotalSizeIndexed -integer 40000
    defaults write com.freron.MailMate MmMaximumQuoteLevelIndexed -integer 256
    

    Those are also the default values. The first one means that at most 40000 bytes are indexed from a text body part (unquoted+quoted). The second one controls the number of quote levels indexed which is practically all quoted levels by default.

    If your indexes are large because you receive a lot of long quote-all emails with large quote levels then it might be sufficient to change the second setting, e.g.,

    defaults write com.freron.MailMate MmMaximumQuoteLevelIndexed -integer 3
    

    There is unfortunately no way to only re-index these parts of the database (it would be nice though for this kind of debugging).

    You need to fetch this update as a direct download: http://updates.mailmate-app.com/archives/MailMate_r4321.tbz

    June 12th, 2014 @ 10:03 AM

  18. benny
    benny

    Oh, I forgot that we already saw that the unquoted files are the problem. In other words you should change the other setting, e.g.,

    defaults write com.freron.MailMate MmMaximumTotalSizeIndexed -integer 10000
    

    Alternatively, these are also available:

    defaults write com.freron.MailMate MmMaximumTextLinesIndexed -integer 1000
    defaults write com.freron.MailMate MmMaximumTextParagraphSizeIndexed -integer 4096
    

    First one tells MailMate the maximum of lines (paragraphs) to be indexed from a body part. The second one puts a limit on the size of such a line (paragraph).

    June 12th, 2014 @ 10:11 AM

  19. Dan Deighton
    Dan Deighton

    I installed r4321, set MmMaximumTotalSizeIndexed to 10000, then forced a database rebuild. Unfortunately, it crashed at some point in the night. I restarted and it did finish the rebuild. I was able to search on unquoted text while my accounts were offline. Then, I brought the accounts back online and MailMate crashed soon after. While rebuilding the database again, I received the following error

    MailMate(25147,0xb0115000) malloc: *** mach_vm_map(size=67108864) failed (error code=3)
    *** error: can't allocate region
    *** set a breakpoint in malloc_error_break to debug
    libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
    

    I will try some of the other settings.

    June 17th, 2014 @ 02:05 PM

  20. benny
    benny

    Sounds like r4321 might be more unstable or memory-hungry than previous revisions. Have you enabled sending crash reports in the General preferences pane of MailMate? I'm mostly interested in the crash when taking accounts online. Did this happen repeatedly? (Is this why you chose rebuilding again?)

    I've fixed a somewhat unrelated bug which should reduce the memory usage when importing. That might help with respect to the crash during rebuilding (crashes during rebuilding are not a problem with respect to database corruption - MailMate should be able to recover and continue rebuilding although the message count does not reflect that it doesn't start over).

    Thanks for taking the time to do this.

    June 17th, 2014 @ 04:00 PM

  21. Dan Deighton
    Dan Deighton

    I've had several more crashes. I've enabled the crash reports, so you should have some additional information. I also changed MmMaximumTotalSizeIndexed to 5000, but it didn't seam to help. Should I go back to the stable version of MailMate to try and get up and running or would it help to try other settings or another dev version?

    June 17th, 2014 @ 09:20 PM

  22. benny
    benny

    Sorry about the late response. Could you update to the latest test release (hold down ⌥ when clicking Check Now in the Software Update preferences pane). You can let it crash once or twice such that I'll get some “fresh” crash reports. Some intermediate revisions of MailMate have been very buggy, but I don't think that was the case for r4321 which means I don't expect the latest test version to behave much better for you.

    June 20th, 2014 @ 06:34 PM

  23. Dan Deighton
    Dan Deighton

    I'm now running r4351 and I haven't had any problems. I'll let you know if I run into any issues.

    June 25th, 2014 @ 07:14 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.