#652065 out of memory crash, always on the same file (not out of system memory)

Package:
mairix
Source:
mairix
Description:
indexes and searches locally-stored email
Submitter:
Joey Hess
Date:
2026-03-02 17:41:02 UTC
Severity:
normal
#652065#5
Date:
2011-12-13 21:49:54 UTC
From:
To:
Scanning /home/joey/mail/archive/inbox/2009-07.gz[271] at [2056196,2058821)
Out of memory (at rfc822.c:459, -2177 bytes)

This does not have to do with the amount of system memory -- I have much more
than mairix is using and no ulimit.  Instead, it's caused by something in
the content of the file. If I move that file away, mairix successfully indexes
the rest of my mail. Then incrementally indexing only that file will cause
the same crash.

I've bisected the mailbox to find a single message that is sufficient to crash
mairix. It's message-id is <196456.57040.qm@web62501.mail.re1.yahoo.com>
But, running mairix on this file alone is not sufficient, it has to have
already indexed my other mail.

#652065#8
Date:
2012-04-10 17:29:14 UTC
From:
To:
Greetings!

I noticed that there are a couple of message I had not yet forwarded
on to you. This is the second of three.

I think this *might* be the issue that is fixed by this commit you
shared a few weeks ago:

https://github.com/rc0/mairix/commit/752fb61c32e38a3480706a8c2361d39ef8ece8c9

What do you think?

Regards,
Mako


<quote who="Joey Hess" date="Tue, Dec 13, 2011 at 05:49:54PM -0400">

#652065#9
Date:
2012-04-10 18:39:52 UTC
From:
To:
Benj. Mako Hill wrote:

I tried pulling this into mairix 0.22, unfortunatly it still crashes the
same.

#652065#14
Date:
2024-03-13 16:07:27 UTC
From:
To:
Hi,

I had something similar on the current version in bookworm (0.24-2).
Rebuilding from upstream's git seemed to resolve the problem.  After some
testing, the problem hasn't reoccurred.  The head commit used is
1cc06f4a73ba4b940008c1ffc398d2ac708cd6d6.

HTH,
Phil.

#652065#19
Date:
2026-03-02 17:11:22 UTC
From:
To:
Phil Brooke wrote:

Same here. At upstream commit c1a587e694f1ea618fa2b4b6b4ebe3848fa345fb

Thanks for the solution Phil
*t