database error
[notmuch-archives.git] / ce / 5502b81af5de1a36d4efafa4b4fa9935e2b065
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 C353D431FD0\r
6         for <notmuch@notmuchmail.org>; Thu, 29 Dec 2011 16:52:42 -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 zBq4KqDaayXa for <notmuch@notmuchmail.org>;\r
17         Thu, 29 Dec 2011 16:52:41 -0800 (PST)\r
18 Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com\r
19         [209.85.216.53]) (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 37237431FB6\r
22         for <notmuch@notmuchmail.org>; Thu, 29 Dec 2011 16:52:41 -0800 (PST)\r
23 Received: by qadb15 with SMTP id b15so10615713qad.5\r
24         for <notmuch@notmuchmail.org>; Thu, 29 Dec 2011 16:52:39 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=date:from:to:subject:message-id:mime-version:content-type\r
27         :content-disposition:user-agent;\r
28         bh=vFcOjcdUI7I5FyWQdY8swRQnqFRoAoEr9a93S+Ormmg=;\r
29         b=QLCZKOh/yCq3JK8UMYlQiEogB25QJmD4z040BwNbMt6BCRzxO5raBYqh/jgTTDaoRp\r
30         uazMSXjo84LN4M007OL4W1dfMvrjnD2svwNo7xYXja3GWp6bPF0pHygl0bu5jj1igg56\r
31         6/BUGOwv0ZoEPPuldnCefNX2uOVXYI9XrSayc=\r
32 Received: by 10.224.168.84 with SMTP id t20mr13944519qay.2.1325206359191;\r
33         Thu, 29 Dec 2011 16:52:39 -0800 (PST)\r
34 Received: from localhost (201-1-35-143.dsl.telesp.net.br. [201.1.35.143])\r
35         by mx.google.com with ESMTPS id dk2sm284470qab.12.2011.12.29.16.52.37\r
36         (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Thu, 29 Dec 2011 16:52:37 -0800 (PST)\r
38 Date: Thu, 29 Dec 2011 22:52:34 -0200\r
39 From: Kazuo Teramoto <kaz.rag@gmail.com>\r
40 To: notmuch@notmuchmail.org\r
41 Subject: Segmentation fault at gmime-iconv with python binding\r
42 Message-ID: <20111230005234.GA23592@sophie>\r
43 MIME-Version: 1.0\r
44 Content-Type: multipart/mixed; boundary="17pEHd4RhPHOinZp"\r
45 Content-Disposition: inline\r
46 User-Agent: Mutt/1.5.21 (2010-09-15)\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Fri, 30 Dec 2011 00:52:42 -0000\r
60 \r
61 \r
62 --17pEHd4RhPHOinZp\r
63 Content-Type: text/plain; charset=us-ascii\r
64 Content-Disposition: inline\r
65 \r
66 Hi!\r
67 \r
68 When I try to run the attached test.py after adding the attached email\r
69 (4EFC743A.3060609_april.org) to notmuch db I got a segmentation fault\r
70 (gdb bt attached).\r
71 \r
72 This is what I think a relevant part of it:\r
73 ~~~~~~~~\r
74 (gdb) frame 1\r
75 #1  0x00007ffff5f2759c in g_mime_iconv_open (to=0x761ef0 "UTF-8", from=0x83d590 "iso-8859-1") at gmime-iconv.c:261\r
76 261             if ((node = (IconvCacheNode *) cache_node_lookup (iconv_cache, key, TRUE))) {\r
77 (gdb) list\r
78 256             key = g_alloca (strlen (from) + strlen (to) + 2);\r
79 257             sprintf (key, "%s:%s", from, to);\r
80 258             \r
81 259             ICONV_CACHE_LOCK ();\r
82 260             \r
83 261             if ((node = (IconvCacheNode *) cache_node_lookup (iconv_cache, key, TRUE))) {\r
84 262                     if (node->used) {\r
85 263                             if ((cd = iconv_open (to, from)) == (iconv_t) -1)\r
86 264                                     goto exception;\r
87 265                     } else {\r
88 (gdb) print iconv_cache\r
89 $1 = (Cache *) 0x0\r
90 (gdb) \r
91 ~~~~~~~~\r
92 \r
93 iconv_cache is initialized in g_mime_iconv_init() that is called by\r
94 g_mime_init().\r
95 \r
96 notmuch CLI show the message correct. I know nothing about gmime or\r
97 notmuch code, but can this be the case of the python bindings not\r
98 calling g_mime_init() correctly?\r
99 \r
100 Regards,\r
101 Kazuo Teramoto\r
102 \r
103 --17pEHd4RhPHOinZp\r
104 Content-Type: text/x-python; charset=us-ascii\r
105 Content-Disposition: attachment; filename="test.py"\r
106 \r
107 #!/usr/bin/env python2\r
108 import notmuch\r
109 db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)\r
110 q_new = notmuch.Query(db, 'id:"4EFC743A.3060609@april.org"')\r
111 for t in q_new.search_threads():\r
112     pass\r
113 \r
114 --17pEHd4RhPHOinZp\r
115 Content-Type: application/vnd.lotus-organizer\r
116 Content-Disposition: attachment; filename="4EFC743A.3060609_april.org"\r
117 Content-Transfer-Encoding: quoted-printable\r
118 \r
119 Message-ID: <4EFC743A.3060609@april.org>=0ADate: Thu, 29 Dec 2011 15:07:54 =\r
120 +0100=0AFrom: "=3D?ISO-8859-1?Q?Fran=3DE7ois_Boulogne?=3D" <boulogne.f@gmai=\r
121 l.com>=0AUser-Agent: Mozilla/5.0 (X11; Linux i686;=0A rv:9.0) Gecko/2011122=\r
122 4 Thunderbird/9.0.1=0AMIME-Version: 1.0=0ATo: Allan McRae <allan@archlinux.=\r
123 org>, =0A "Discussion about the Arch User Repository (AUR)" <aur-general@ar=\r
124 chlinux.org>=0AReferences: <4EFC3931.6030007@april.org> <4EFC3D62.4030202@a=\r
125 rchlinux.org>=0AIn-Reply-To: <4EFC3D62.4030202@archlinux.org>=0AContent-Typ=\r
126 e: text/plain; charset=3DISO-8859-1=0AContent-Transfer-Encoding: 8bit=0ASub=\r
127 ject: Re: [aur-general] Guidelines: cp, mkdir vs install=0A=0ALe 29/12/2011=\r
128  11:13, Allan McRae a =E9crit :=0A> On 29/12/11 19:56, Fran=E7ois Boulogne =\r
129 wrote:=0A>> Hi,=0A>>=0A>> Looking to improve the quality of my packages, I =\r
130 read again the guidelines.=0A>> https://wiki.archlinux.org/index.php/Arch_P=\r
131 ackaging_Standards=0A>>=0A>> However, it don't see anything about the insta=\r
132 ll command like=0A>> install -d $pkgdir/usr/{bin,share/man/man1,share/local=\r
133 e}=0A>>=0A>> Some contributors on AUR use cp or mkdir to install files/dir =\r
134 (when no=0A>> makefile is provided) and others use install command.=0A>>=0A=\r
135 >> What's the opinion of TU on this point?=0A>>=0A> =0A> Use install with -=\r
136 m specifying the correct permissions=0A> =0A=0AThank you Allan=0A=0A=0A-- =\r
137 =0AFran=E7ois Boulogne.=0Ahttps://www.sciunto.org=0A\r
138 --17pEHd4RhPHOinZp\r
139 Content-Type: text/plain; charset=us-ascii\r
140 Content-Disposition: attachment; filename="notmuch_py_gmime.gdb_bt"\r
141 \r
142 GNU gdb (GDB) 7.3.1\r
143 Copyright (C) 2011 Free Software Foundation, Inc.\r
144 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r
145 This is free software: you are free to change and redistribute it.\r
146 There is NO WARRANTY, to the extent permitted by law.  Type "show copying"\r
147 and "show warranty" for details.\r
148 This GDB was configured as "x86_64-unknown-linux-gnu".\r
149 For bug reporting instructions, please see:\r
150 <http://www.gnu.org/software/gdb/bugs/>...\r
151 Reading symbols from /usr/bin/python2...(no debugging symbols found)...done.\r
152 (gdb) run\r
153 Starting program: /usr/bin/python2 test.py\r
154 [Thread debugging using libthread_db enabled]\r
155 \r
156 Program received signal SIGSEGV, Segmentation fault.\r
157 0x00007ffff5f4fd82 in cache_node_lookup (cache=0x0, key=0x7fffffffaab0 "iso-8859-1:UTF-8", use=1) at cache.c:110\r
158 110             node = g_hash_table_lookup (cache->node_hash, key);\r
159 (gdb) bt\r
160 #0  0x00007ffff5f4fd82 in cache_node_lookup (cache=0x0, key=0x7fffffffaab0 "iso-8859-1:UTF-8", use=1) at cache.c:110\r
161 #1  0x00007ffff5f2759c in g_mime_iconv_open (to=0x761ef0 "UTF-8", from=0x83d590 "iso-8859-1") at gmime-iconv.c:261\r
162 #2  0x00007ffff5f4633f in rfc2047_decode_word (in=0x82f350 "=?ISO-8859-1?Q?Fran=E7ois_Boulogne?=", inlen=36) at gmime-utils.c:1839\r
163 #3  0x00007ffff5f46ad1 in g_mime_utils_header_decode_phrase (phrase=0x82f350 "=?ISO-8859-1?Q?Fran=E7ois_Boulogne?=") at gmime-utils.c:2084\r
164 #4  0x00007ffff5f4a759 in _internet_address_decode_name (ia=0x83d630, name=0x88fae0) at internet-address.c:1367\r
165 #5  0x00007ffff5f4afab in decode_address (in=0x7fffffffad60) at internet-address.c:1659\r
166 #6  0x00007ffff5f4b003 in internet_address_list_parse_string (str=0x766530 "\"=?ISO-8859-1?Q?Fran=E7ois_Boulogne?=\" <boulogne.f@gmail.com>") at internet-address.c:1692\r
167 #7  0x00007ffff61915d7 in _thread_add_message (thread=0x6d99d0, message=0x6d9330) at lib/thread.cc:236\r
168 #8  0x00007ffff6191dd7 in _notmuch_thread_create (ctx=0x7d54e0, notmuch=0x6e01d0, seed_doc_id=213092, match_set=0x83c888, sort=NOTMUCH_SORT_NEWEST_FIRST) at lib/thread.cc:470\r
169 #9  0x00007ffff61906b7 in notmuch_threads_get (threads=0x83c870) at lib/query.cc:392\r
170 #10 0x00007ffff65a7e34 in ffi_call_unix64 () from /usr/lib/libffi.so.5\r
171 #11 0x00007ffff65a7855 in ffi_call () from /usr/lib/libffi.so.5\r
172 #12 0x00007ffff67bb1f7 in _ctypes_callproc () from /usr/lib/python2.7/lib-dynload/_ctypes.so\r
173 #13 0x00007ffff67b4a86 in ?? () from /usr/lib/python2.7/lib-dynload/_ctypes.so\r
174 #14 0x00007ffff7a66683 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0\r
175 #15 0x00007ffff7afbbda in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0\r
176 #16 0x00007ffff7afe8ef in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0\r
177 #17 0x00007ffff7a8b15c in function_call () from /usr/lib/libpython2.7.so.1.0\r
178 #18 0x00007ffff7a66683 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0\r
179 #19 0x00007ffff7a752bf in instancemethod_call () from /usr/lib/libpython2.7.so.1.0\r
180 #20 0x00007ffff7a66683 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0\r
181 #21 0x00007ffff7abc002 in call_method () from /usr/lib/libpython2.7.so.1.0\r
182 #22 0x00007ffff7af8b1f in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0\r
183 #23 0x00007ffff7afe8ef in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0\r
184 #24 0x00007ffff7afea22 in PyEval_EvalCode () from /usr/lib/libpython2.7.so.1.0\r
185 #25 0x00007ffff7b18d8c in run_mod () from /usr/lib/libpython2.7.so.1.0\r
186 #26 0x00007ffff7b19b90 in PyRun_FileExFlags () from /usr/lib/libpython2.7.so.1.0\r
187 #27 0x00007ffff7b1a60f in PyRun_SimpleFileExFlags () from /usr/lib/libpython2.7.so.1.0\r
188 #28 0x00007ffff7b2bd25 in Py_Main () from /usr/lib/libpython2.7.so.1.0\r
189 #29 0x00007ffff747e38d in __libc_start_main () from /lib/libc.so.6\r
190 #30 0x00000000004006a1 in _start ()\r
191 (gdb) frame 1\r
192 #1  0x00007ffff5f2759c in g_mime_iconv_open (to=0x761ef0 "UTF-8", from=0x83d590 "iso-8859-1") at gmime-iconv.c:261\r
193 261             if ((node = (IconvCacheNode *) cache_node_lookup (iconv_cache, key, TRUE))) {\r
194 (gdb) list\r
195 256             key = g_alloca (strlen (from) + strlen (to) + 2);\r
196 257             sprintf (key, "%s:%s", from, to);\r
197 258             \r
198 259             ICONV_CACHE_LOCK ();\r
199 260             \r
200 261             if ((node = (IconvCacheNode *) cache_node_lookup (iconv_cache, key, TRUE))) {\r
201 262                     if (node->used) {\r
202 263                             if ((cd = iconv_open (to, from)) == (iconv_t) -1)\r
203 264                                     goto exception;\r
204 265                     } else {\r
205 (gdb) print iconv_cache\r
206 $1 = (Cache *) 0x0\r
207 (gdb) \r
208 --17pEHd4RhPHOinZp--\r