When I tried to index my mail using Ubuntu's 0.21-1 on a 32-bit system,
I got an out of memory error:

  Out of memory (at rfc822.c:439, -246 bytes)

At first I thought this was the same problem that others had reported,
but the negative number made me suspicious.  I changed emit_int to 
take a size_t instead of an int, and saw in fact that mairix was trying
to malloc roughly 4.2G of ram in uuencode_data().

Most of my mail is in mbox format, and after a long binary search, I
found the offending message, which turned out to be malformatted.  And
then I produced this test case (without the leading "> "; also attached):

> From nobody Wed Dec 15 13:33:29 2004
> From nobody Wed Dec 15 13:33:13 2004
> From nobody Wed Dec 15 13:33:01 2004
> Message-Id: <sc7bb803....@mailhost2.ioppublishing.com>
> Date: Tue, 26 Feb 2002 16:29:31 +0000
> From: j...@uwo.ca
> To: <j...@uwo.ca>
> Subject: test
> Lines: 2
> X-Gnus-Article-Number: 1   Tue, 01 Dec 2009 12:53:56 -0500
> 
> This is a test.

The repeated "From " headers seem to be causing the problem.  

1) Could mairix be adjusted to be more tolerant of such things,
producing a warning and continuing?

2) Could the oom message use size_t instead of int?

Thanks,

Dan

Attachment: mairix.oom
Description: Binary data

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Mairix-users mailing list
Mairix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mairix-users

Reply via email to