Missing headers when forwarding html message as RFC822
[notmuch-archives.git] / ca / ece13604a6a09a68d27e65a8790f0521d8426e
1 Return-Path: <kaz.rag@gmail.com>\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 C2AF0431FD0\r
6         for <notmuch@notmuchmail.org>; Thu, 29 Dec 2011 10:20:41 -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: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id OaaXwer9o-ij for <notmuch@notmuchmail.org>;\r
17         Thu, 29 Dec 2011 10:20:40 -0800 (PST)\r
18 Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com\r
19         [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 7AC5C431FB6\r
22         for <notmuch@notmuchmail.org>; Thu, 29 Dec 2011 10:20:40 -0800 (PST)\r
23 Received: by qcha6 with SMTP id a6so10298910qch.26\r
24         for <notmuch@notmuchmail.org>; Thu, 29 Dec 2011 10:20:38 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=message-id:content-type:mime-version:to:from:subject:date;\r
27         bh=DRSaXNXXtS0GSNR+X7Asx7ESmDoUcihSM3pM6TIKuyw=;\r
28         b=DJYdosowf02QZVlPBjAlmGSSPsvdGjWISMgQbIYCWqoPuEzAyIaC/l28kanXBHQ/px\r
29         XenchXSRYuqazrWHQaKJRq6haRn0c5KdKeh9hLyXIWh9zkXxTrMbroahp6jvj+KmNthz\r
30         022hoY04iKp2c5R4VSdi6sZZIKZ7GLrIcmBRc=\r
31 Received: by 10.229.111.154 with SMTP id s26mr13324044qcp.93.1325182837563;\r
32         Thu, 29 Dec 2011 10:20:37 -0800 (PST)\r
33 Received: from localhost (201-1-35-143.dsl.telesp.net.br. [201.1.35.143])\r
34         by mx.google.com with ESMTPS id h9sm66776727qac.13.2011.12.29.10.20.35\r
35         (version=TLSv1/SSLv3 cipher=OTHER);\r
36         Thu, 29 Dec 2011 10:20:36 -0800 (PST)\r
37 Message-ID: <4efcaf74.491be00a.4c32.ffffd497@mx.google.com>\r
38 Content-Type: multipart/mixed; boundary="===============7715145529118809203=="\r
39 MIME-Version: 1.0\r
40 To: notmuch <notmuch@notmuchmail.org>,\r
41 From: Kazuo Teramoto <kaz.rag@gmail.com>\r
42 Subject: Segmentation fault at gmime-iconv with python binding\r
43 Date: Thu, 29 Dec 2011 16:20:33 -0200\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.13\r
46 Precedence: list\r
47 List-Id: "Use and development of the notmuch mail system."\r
48         <notmuch.notmuchmail.org>\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
52 List-Post: <mailto:notmuch@notmuchmail.org>\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
56 X-List-Received-Date: Thu, 29 Dec 2011 18:20:41 -0000\r
57 \r
58 --===============7715145529118809203==\r
59 Content-Type: text/plain; charset="utf-8"\r
60 MIME-Version: 1.0\r
61 Content-Transfer-Encoding: quoted-printable\r
62 \r
63 Hi!\r
64 \r
65 When I try to run the attached test.py after adding the attached email\r
66 (4EFC743A.3060609_april.org) to notmuch db I got a segmentation fault\r
67 (gdb bt attached).\r
68 \r
69 This is what I think a relevant part of the gdb:\r
70 ~~~~~~~~\r
71 (gdb) frame 1\r
72 #1  0x00007ffff5f2759c in g_mime_iconv_open (to=3D0x761ef0 "UTF-8", from=3D=\r
73 0x83d590 "iso-8859-1") at gmime-iconv.c:261\r
74 261             if ((node =3D (IconvCacheNode *) cache_node_lookup (iconv_cache, key, =\r
75 TRUE))) {\r
76 (gdb) list\r
77 256             key =3D g_alloca (strlen (from) + strlen (to) + 2);\r
78 257             sprintf (key, "%s:%s", from, to);\r
79 258             =\r
80 \r
81 259             ICONV_CACHE_LOCK ();\r
82 260             =\r
83 \r
84 261             if ((node =3D (IconvCacheNode *) cache_node_lookup (iconv_cache, key, =\r
85 TRUE))) {\r
86 262                     if (node->used) {\r
87 263                             if ((cd =3D iconv_open (to, from)) =3D=3D (iconv_t) -1)\r
88 264                                     goto exception;\r
89 265                     } else {\r
90 (gdb) print iconv_cache\r
91 $1 =3D (Cache *) 0x0\r
92 (gdb) =\r
93 \r
94 ~~~~~~~~\r
95 \r
96 iconv_cache is initialized in g_mime_iconv_init() that is called by\r
97 g_mime_init().\r
98 \r
99 notmuch CLI show the message correct. I know nothing about gmime or\r
100 notmuch code, but can this be the case of the python bindings not\r
101 calling g_mime_init() correctly?\r
102 \r
103 Regards,\r
104 Kazuo Teramoto\r
105 \r
106 --===============7715145529118809203==\r
107 Content-Type: text/plain; charset="utf-8"\r
108 MIME-Version: 1.0\r
109 Content-Transfer-Encoding: quoted-printable\r
110 Content-Disposition: attachment; filename="test.py"\r
111 \r
112 #!/usr/bin/env python2\r
113 import notmuch\r
114 db =3D notmuch.Database(mode=3Dnotmuch.Database.MODE.READ_WRITE)\r
115 q_new =3D notmuch.Query(db, 'id:"4EFC743A.3060609@april.org"')\r
116 for t in q_new.search_threads():\r
117     pass\r
118 \r
119 --===============7715145529118809203==\r
120 Content-Type: text/plain; charset="utf-8"\r
121 MIME-Version: 1.0\r
122 Content-Transfer-Encoding: quoted-printable\r
123 Content-Disposition: attachment; filename="4EFC743A.3060609_april.org"\r
124 \r
125 Message-ID: <4EFC743A.3060609@april.org>\r
126 Date: Thu, 29 Dec 2011 15:07:54 +0100\r
127 From: "=3D?ISO-8859-1?Q?Fran=3DE7ois_Boulogne?=3D" <boulogne.f@gmail.com>\r
128 User-Agent: Mozilla/5.0 (X11; Linux i686;\r
129  rv:9.0) Gecko/20111224 Thunderbird/9.0.1\r
130 MIME-Version: 1.0\r
131 To: Allan McRae <allan@archlinux.org>, =\r
132 \r
133  "Discussion about the Arch User Repository (AUR)" <aur-general@archlinux.o=\r
134 rg>\r
135 References: <4EFC3931.6030007@april.org> <4EFC3D62.4030202@archlinux.org>\r
136 In-Reply-To: <4EFC3D62.4030202@archlinux.org>\r
137 Content-Type: text/plain; charset=3DISO-8859-1\r
138 Content-Transfer-Encoding: 8bit\r
139 Subject: Re: [aur-general] Guidelines: cp, mkdir vs install\r
140 \r
141 Le 29/12/2011 11:13, Allan McRae a =C3=A9crit :\r
142 > On 29/12/11 19:56, Fran=C3=A7ois Boulogne wrote:\r
143 >> Hi,\r
144 >>\r
145 >> Looking to improve the quality of my packages, I read again the guidelin=\r
146 es.\r
147 >> https://wiki.archlinux.org/index.php/Arch_Packaging_Standards\r
148 >>\r
149 >> However, it don't see anything about the install command like\r
150 >> install -d $pkgdir/usr/{bin,share/man/man1,share/locale}\r
151 >>\r
152 >> Some contributors on AUR use cp or mkdir to install files/dir (when no\r
153 >> makefile is provided) and others use install command.\r
154 >>\r
155 >> What's the opinion of TU on this point?\r
156 >>\r
157 > =\r
158 \r
159 > Use install with -m specifying the correct permissions\r
160 > =\r
161 \r
162 \r
163 Thank you Allan\r
164 \r
165 \r
166 -- =\r
167 \r
168 Fran=C3=A7ois Boulogne.\r
169 https://www.sciunto.org\r
170 \r
171 --===============7715145529118809203==\r
172 Content-Type: text/plain; charset="utf-8"\r
173 MIME-Version: 1.0\r
174 Content-Transfer-Encoding: quoted-printable\r
175 Content-Disposition: attachment; filename="notmuch_py_gmime.gdb_bt"\r
176 \r
177 GNU gdb (GDB) 7.3.1\r
178 Copyright (C) 2011 Free Software Foundation, Inc.\r
179 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.htm=\r
180 l>\r
181 This is free software: you are free to change and redistribute it.\r
182 There is NO WARRANTY, to the extent permitted by law.  Type "show copying"\r
183 and "show warranty" for details.\r
184 This GDB was configured as "x86_64-unknown-linux-gnu".\r
185 For bug reporting instructions, please see:\r
186 <http://www.gnu.org/software/gdb/bugs/>...\r
187 Reading symbols from /usr/bin/python2...(no debugging symbols found)...done.\r
188 (gdb) run\r
189 Starting program: /usr/bin/python2 test.py\r
190 [Thread debugging using libthread_db enabled]\r
191 \r
192 Program received signal SIGSEGV, Segmentation fault.\r
193 0x00007ffff5f4fd82 in cache_node_lookup (cache=3D0x0, key=3D0x7fffffffaab0 =\r
194 "iso-8859-1:UTF-8", use=3D1) at cache.c:110\r
195 110             node =3D g_hash_table_lookup (cache->node_hash, key);\r
196 (gdb) bt\r
197 #0  0x00007ffff5f4fd82 in cache_node_lookup (cache=3D0x0, key=3D0x7fffffffa=\r
198 ab0 "iso-8859-1:UTF-8", use=3D1) at cache.c:110\r
199 #1  0x00007ffff5f2759c in g_mime_iconv_open (to=3D0x761ef0 "UTF-8", from=3D=\r
200 0x83d590 "iso-8859-1") at gmime-iconv.c:261\r
201 #2  0x00007ffff5f4633f in rfc2047_decode_word (in=3D0x82f350 "=3D?ISO-8859-=\r
202 1?Q?Fran=3DE7ois_Boulogne?=3D", inlen=3D36) at gmime-utils.c:1839\r
203 #3  0x00007ffff5f46ad1 in g_mime_utils_header_decode_phrase (phrase=3D0x82f=\r
204 350 "=3D?ISO-8859-1?Q?Fran=3DE7ois_Boulogne?=3D") at gmime-utils.c:2084\r
205 #4  0x00007ffff5f4a759 in _internet_address_decode_name (ia=3D0x83d630, nam=\r
206 e=3D0x88fae0) at internet-address.c:1367\r
207 #5  0x00007ffff5f4afab in decode_address (in=3D0x7fffffffad60) at internet-=\r
208 address.c:1659\r
209 #6  0x00007ffff5f4b003 in internet_address_list_parse_string (str=3D0x76653=\r
210 0 "\"=3D?ISO-8859-1?Q?Fran=3DE7ois_Boulogne?=3D\" <boulogne.f@gmail.com>") =\r
211 at internet-address.c:1692\r
212 #7  0x00007ffff61915d7 in _thread_add_message (thread=3D0x6d99d0, message=\r
213 =3D0x6d9330) at lib/thread.cc:236\r
214 #8  0x00007ffff6191dd7 in _notmuch_thread_create (ctx=3D0x7d54e0, notmuch=\r
215 =3D0x6e01d0, seed_doc_id=3D213092, match_set=3D0x83c888, sort=3DNOTMUCH_SOR=\r
216 T_NEWEST_FIRST) at lib/thread.cc:470\r
217 #9  0x00007ffff61906b7 in notmuch_threads_get (threads=3D0x83c870) at lib/q=\r
218 uery.cc:392\r
219 #10 0x00007ffff65a7e34 in ffi_call_unix64 () from /usr/lib/libffi.so.5\r
220 #11 0x00007ffff65a7855 in ffi_call () from /usr/lib/libffi.so.5\r
221 #12 0x00007ffff67bb1f7 in _ctypes_callproc () from /usr/lib/python2.7/lib-d=\r
222 ynload/_ctypes.so\r
223 #13 0x00007ffff67b4a86 in ?? () from /usr/lib/python2.7/lib-dynload/_ctypes=\r
224 .so\r
225 #14 0x00007ffff7a66683 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0\r
226 #15 0x00007ffff7afbbda in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.=\r
227 so.1.0\r
228 #16 0x00007ffff7afe8ef in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.s=\r
229 o.1.0\r
230 #17 0x00007ffff7a8b15c in function_call () from /usr/lib/libpython2.7.so.1.0\r
231 #18 0x00007ffff7a66683 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0\r
232 #19 0x00007ffff7a752bf in instancemethod_call () from /usr/lib/libpython2.7=\r
233 .so.1.0\r
234 #20 0x00007ffff7a66683 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0\r
235 #21 0x00007ffff7abc002 in call_method () from /usr/lib/libpython2.7.so.1.0\r
236 #22 0x00007ffff7af8b1f in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.=\r
237 so.1.0\r
238 #23 0x00007ffff7afe8ef in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.s=\r
239 o.1.0\r
240 #24 0x00007ffff7afea22 in PyEval_EvalCode () from /usr/lib/libpython2.7.so.=\r
241 1.0\r
242 #25 0x00007ffff7b18d8c in run_mod () from /usr/lib/libpython2.7.so.1.0\r
243 #26 0x00007ffff7b19b90 in PyRun_FileExFlags () from /usr/lib/libpython2.7.s=\r
244 o.1.0\r
245 #27 0x00007ffff7b1a60f in PyRun_SimpleFileExFlags () from /usr/lib/libpytho=\r
246 n2.7.so.1.0\r
247 #28 0x00007ffff7b2bd25 in Py_Main () from /usr/lib/libpython2.7.so.1.0\r
248 #29 0x00007ffff747e38d in __libc_start_main () from /lib/libc.so.6\r
249 #30 0x00000000004006a1 in _start ()\r
250 (gdb) frame 1\r
251 #1  0x00007ffff5f2759c in g_mime_iconv_open (to=3D0x761ef0 "UTF-8", from=3D=\r
252 0x83d590 "iso-8859-1") at gmime-iconv.c:261\r
253 261             if ((node =3D (IconvCacheNode *) cache_node_lookup (iconv_cache, key, =\r
254 TRUE))) {\r
255 (gdb) list\r
256 256             key =3D g_alloca (strlen (from) + strlen (to) + 2);\r
257 257             sprintf (key, "%s:%s", from, to);\r
258 258             =\r
259 \r
260 259             ICONV_CACHE_LOCK ();\r
261 260             =\r
262 \r
263 261             if ((node =3D (IconvCacheNode *) cache_node_lookup (iconv_cache, key, =\r
264 TRUE))) {\r
265 262                     if (node->used) {\r
266 263                             if ((cd =3D iconv_open (to, from)) =3D=3D (iconv_t) -1)\r
267 264                                     goto exception;\r
268 265                     } else {\r
269 (gdb) print iconv_cache\r
270 $1 =3D (Cache *) 0x0\r
271 (gdb)=20\r
272 --===============7715145529118809203==--\r