Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / c2 / 9037cc1231d026a7a365d0c7df60f6875b7835
1 Return-Path: <cworth@cworth.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id D9F65431FBD\r
6         for <notmuch@notmuchmail.org>; Fri,  5 Feb 2010 10:59:20 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.963\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.963 tagged_above=-999 required=5\r
12         tests=[ALL_TRUSTED=-1.8, AWL=0.022, BAYES_40=-0.185] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id aZa3+UAiozaW; Fri,  5 Feb 2010 10:59:19 -0800 (PST)\r
16 Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
17         by olra.theworths.org (Postfix) with ESMTP id D166B431FAE;\r
18         Fri,  5 Feb 2010 10:59:19 -0800 (PST)\r
19 Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
20         id 87C20254181; Sat,  6 Feb 2010 07:59:19 +1300 (NZDT)\r
21 From: Carl Worth <cworth@cworth.org>\r
22 To: Dominik Epple <dominik.epple@googlemail.com>\r
23 In-Reply-To: <87vdgxqepm.fsf@yoom.home.cworth.org>\r
24 References: <123554aa0911200056h73def158pb0db64a2a78ed687@mail.gmail.com>\r
25         <87skc8oqyn.fsf@yoom.home.cworth.org>\r
26         <123554aa0911230826o11e54d5ckc90e5ae8dab6ffd3@mail.gmail.com>\r
27         <123554aa0911250139l907c4efs60d704dae962c473@mail.gmail.com>\r
28         <87y6ltqg2p.fsf@yoom.home.cworth.org>\r
29         <87vdgxqepm.fsf@yoom.home.cworth.org>\r
30 Date: Fri, 05 Feb 2010 10:59:12 -0800\r
31 Message-ID: <87d40jpkzj.fsf@yoom.home.cworth.org>\r
32 MIME-Version: 1.0\r
33 Content-Type: multipart/signed; boundary="=-=-=";\r
34         micalg=pgp-sha1; protocol="application/pgp-signature"\r
35 Cc: notmuch@notmuchmail.org\r
36 Subject: Re: [notmuch] notmuch new: Memory problem (with uuencoded content)\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Fri, 05 Feb 2010 18:59:21 -0000\r
50 \r
51 --=-=-=\r
52 \r
53 On Thu, 26 Nov 2009 11:16:21 -0800, Carl Worth <cworth@cworth.org> wrote:\r
54 > Clearly, some experimenting is needed. Dominik, if you can share the\r
55 > large file, (with either me alone or with the whole list), a pointer to\r
56 > where we could download it would be appreciated.\r
57 \r
58 Dominik replied to me privately and described a way for me to create a\r
59 file that replicates the bug. Here's a recipe I came up with from his\r
60 description:\r
61 \r
62         mkdir tmp\r
63         cd tmp/\r
64         echo [database]$'\n'path=mail > notmuch-config\r
65         mkdir mail\r
66         echo From: Me$'\n'To: You$'\n'Subject: uuencode$'\n' > mail/msg\r
67         dd if=/dev/urandom of=blob bs=1024 count=10240\r
68         uuencode blob < blob >> mail/msg\r
69         NOTMUCH_CONFIG=notmuch-config notmuch new\r
70 \r
71 So that's a 10MB blob of random data which uuencodes to a ~14MB mail\r
72 file. And notmuch (before a patch I just pushed) chews on it for quite a\r
73 while, consuming several hundred MB of memory and resulting finally in a\r
74 76MB Xapian database (with chert).\r
75 \r
76 I'm not sure if there is a Xapian bug there or not, (or perhaps a bug in\r
77 how notmuch is using Xapian to generate the terms for this large of an\r
78 email message).\r
79 \r
80 But the thing that's obvious to me is that indexing encoded data like\r
81 this doesn't make any sense at all. So I've just pushed a set of patches\r
82 to notmuch to make it detect uuencoded data within a mail message and\r
83 ignore it.\r
84 \r
85 Of course, I also pushed a set of tests to the test suite for this, (and\r
86 some new "notmuch search" tests while I was at it).\r
87 \r
88 -Carl\r
89 \r
90 --=-=-=\r
91 Content-Type: application/pgp-signature\r
92 \r
93 -----BEGIN PGP SIGNATURE-----\r
94 Version: GnuPG v1.4.10 (GNU/Linux)\r
95 \r
96 iD8DBQFLbGqA6JDdNq8qSWgRAmZJAJ9LV4r6PzG1IhZBFIzxTYVu4KxicwCgleGH\r
97 kv+WIZSatWQLrDvM2KtFxpQ=\r
98 =6BSl\r
99 -----END PGP SIGNATURE-----\r
100 --=-=-=--\r