From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C2AF0431FD0 for ; Thu, 29 Dec 2011 10:20:41 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OaaXwer9o-ij for ; Thu, 29 Dec 2011 10:20:40 -0800 (PST) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 7AC5C431FB6 for ; Thu, 29 Dec 2011 10:20:40 -0800 (PST) Received: by qcha6 with SMTP id a6so10298910qch.26 for ; Thu, 29 Dec 2011 10:20:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:content-type:mime-version:to:from:subject:date; bh=DRSaXNXXtS0GSNR+X7Asx7ESmDoUcihSM3pM6TIKuyw=; b=DJYdosowf02QZVlPBjAlmGSSPsvdGjWISMgQbIYCWqoPuEzAyIaC/l28kanXBHQ/px XenchXSRYuqazrWHQaKJRq6haRn0c5KdKeh9hLyXIWh9zkXxTrMbroahp6jvj+KmNthz 022hoY04iKp2c5R4VSdi6sZZIKZ7GLrIcmBRc= Received: by 10.229.111.154 with SMTP id s26mr13324044qcp.93.1325182837563; Thu, 29 Dec 2011 10:20:37 -0800 (PST) Received: from localhost (201-1-35-143.dsl.telesp.net.br. [201.1.35.143]) by mx.google.com with ESMTPS id h9sm66776727qac.13.2011.12.29.10.20.35 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Dec 2011 10:20:36 -0800 (PST) Message-ID: <4efcaf74.491be00a.4c32.ffffd497@mx.google.com> Content-Type: multipart/mixed; boundary="===============7715145529118809203==" MIME-Version: 1.0 To: notmuch , From: Kazuo Teramoto Subject: Segmentation fault at gmime-iconv with python binding Date: Thu, 29 Dec 2011 16:20:33 -0200 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2011 18:20:41 -0000 --===============7715145529118809203== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi! When I try to run the attached test.py after adding the attached email (4EFC743A.3060609_april.org) to notmuch db I got a segmentation fault (gdb bt attached). This is what I think a relevant part of the gdb: ~~~~~~~~ (gdb) frame 1 #1 0x00007ffff5f2759c in g_mime_iconv_open (to=3D0x761ef0 "UTF-8", from=3D= 0x83d590 "iso-8859-1") at gmime-iconv.c:261 261 if ((node =3D (IconvCacheNode *) cache_node_lookup (iconv_cache, key, = TRUE))) { (gdb) list 256 key =3D g_alloca (strlen (from) + strlen (to) + 2); 257 sprintf (key, "%s:%s", from, to); 258 = 259 ICONV_CACHE_LOCK (); 260 = 261 if ((node =3D (IconvCacheNode *) cache_node_lookup (iconv_cache, key, = TRUE))) { 262 if (node->used) { 263 if ((cd =3D iconv_open (to, from)) =3D=3D (iconv_t) -1) 264 goto exception; 265 } else { (gdb) print iconv_cache $1 =3D (Cache *) 0x0 (gdb) = ~~~~~~~~ iconv_cache is initialized in g_mime_iconv_init() that is called by g_mime_init(). notmuch CLI show the message correct. I know nothing about gmime or notmuch code, but can this be the case of the python bindings not calling g_mime_init() correctly? Regards, Kazuo Teramoto --===============7715145529118809203== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="test.py" #!/usr/bin/env python2 import notmuch db =3D notmuch.Database(mode=3Dnotmuch.Database.MODE.READ_WRITE) q_new =3D notmuch.Query(db, 'id:"4EFC743A.3060609@april.org"') for t in q_new.search_threads(): pass --===============7715145529118809203== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="4EFC743A.3060609_april.org" Message-ID: <4EFC743A.3060609@april.org> Date: Thu, 29 Dec 2011 15:07:54 +0100 From: "=3D?ISO-8859-1?Q?Fran=3DE7ois_Boulogne?=3D" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111224 Thunderbird/9.0.1 MIME-Version: 1.0 To: Allan McRae , = "Discussion about the Arch User Repository (AUR)" References: <4EFC3931.6030007@april.org> <4EFC3D62.4030202@archlinux.org> In-Reply-To: <4EFC3D62.4030202@archlinux.org> Content-Type: text/plain; charset=3DISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [aur-general] Guidelines: cp, mkdir vs install Le 29/12/2011 11:13, Allan McRae a =C3=A9crit : > On 29/12/11 19:56, Fran=C3=A7ois Boulogne wrote: >> Hi, >> >> Looking to improve the quality of my packages, I read again the guidelin= es. >> https://wiki.archlinux.org/index.php/Arch_Packaging_Standards >> >> However, it don't see anything about the install command like >> install -d $pkgdir/usr/{bin,share/man/man1,share/locale} >> >> Some contributors on AUR use cp or mkdir to install files/dir (when no >> makefile is provided) and others use install command. >> >> What's the opinion of TU on this point? >> > = > Use install with -m specifying the correct permissions > = Thank you Allan -- = Fran=C3=A7ois Boulogne. https://www.sciunto.org --===============7715145529118809203== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="notmuch_py_gmime.gdb_bt" GNU gdb (GDB) 7.3.1 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/bin/python2...(no debugging symbols found)...done. (gdb) run Starting program: /usr/bin/python2 test.py [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x00007ffff5f4fd82 in cache_node_lookup (cache=3D0x0, key=3D0x7fffffffaab0 = "iso-8859-1:UTF-8", use=3D1) at cache.c:110 110 node =3D g_hash_table_lookup (cache->node_hash, key); (gdb) bt #0 0x00007ffff5f4fd82 in cache_node_lookup (cache=3D0x0, key=3D0x7fffffffa= ab0 "iso-8859-1:UTF-8", use=3D1) at cache.c:110 #1 0x00007ffff5f2759c in g_mime_iconv_open (to=3D0x761ef0 "UTF-8", from=3D= 0x83d590 "iso-8859-1") at gmime-iconv.c:261 #2 0x00007ffff5f4633f in rfc2047_decode_word (in=3D0x82f350 "=3D?ISO-8859-= 1?Q?Fran=3DE7ois_Boulogne?=3D", inlen=3D36) at gmime-utils.c:1839 #3 0x00007ffff5f46ad1 in g_mime_utils_header_decode_phrase (phrase=3D0x82f= 350 "=3D?ISO-8859-1?Q?Fran=3DE7ois_Boulogne?=3D") at gmime-utils.c:2084 #4 0x00007ffff5f4a759 in _internet_address_decode_name (ia=3D0x83d630, nam= e=3D0x88fae0) at internet-address.c:1367 #5 0x00007ffff5f4afab in decode_address (in=3D0x7fffffffad60) at internet-= address.c:1659 #6 0x00007ffff5f4b003 in internet_address_list_parse_string (str=3D0x76653= 0 "\"=3D?ISO-8859-1?Q?Fran=3DE7ois_Boulogne?=3D\" ") = at internet-address.c:1692 #7 0x00007ffff61915d7 in _thread_add_message (thread=3D0x6d99d0, message= =3D0x6d9330) at lib/thread.cc:236 #8 0x00007ffff6191dd7 in _notmuch_thread_create (ctx=3D0x7d54e0, notmuch= =3D0x6e01d0, seed_doc_id=3D213092, match_set=3D0x83c888, sort=3DNOTMUCH_SOR= T_NEWEST_FIRST) at lib/thread.cc:470 #9 0x00007ffff61906b7 in notmuch_threads_get (threads=3D0x83c870) at lib/q= uery.cc:392 #10 0x00007ffff65a7e34 in ffi_call_unix64 () from /usr/lib/libffi.so.5 #11 0x00007ffff65a7855 in ffi_call () from /usr/lib/libffi.so.5 #12 0x00007ffff67bb1f7 in _ctypes_callproc () from /usr/lib/python2.7/lib-d= ynload/_ctypes.so #13 0x00007ffff67b4a86 in ?? () from /usr/lib/python2.7/lib-dynload/_ctypes= .so #14 0x00007ffff7a66683 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0 #15 0x00007ffff7afbbda in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.= so.1.0 #16 0x00007ffff7afe8ef in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.s= o.1.0 #17 0x00007ffff7a8b15c in function_call () from /usr/lib/libpython2.7.so.1.0 #18 0x00007ffff7a66683 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0 #19 0x00007ffff7a752bf in instancemethod_call () from /usr/lib/libpython2.7= .so.1.0 #20 0x00007ffff7a66683 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0 #21 0x00007ffff7abc002 in call_method () from /usr/lib/libpython2.7.so.1.0 #22 0x00007ffff7af8b1f in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.= so.1.0 #23 0x00007ffff7afe8ef in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.s= o.1.0 #24 0x00007ffff7afea22 in PyEval_EvalCode () from /usr/lib/libpython2.7.so.= 1.0 #25 0x00007ffff7b18d8c in run_mod () from /usr/lib/libpython2.7.so.1.0 #26 0x00007ffff7b19b90 in PyRun_FileExFlags () from /usr/lib/libpython2.7.s= o.1.0 #27 0x00007ffff7b1a60f in PyRun_SimpleFileExFlags () from /usr/lib/libpytho= n2.7.so.1.0 #28 0x00007ffff7b2bd25 in Py_Main () from /usr/lib/libpython2.7.so.1.0 #29 0x00007ffff747e38d in __libc_start_main () from /lib/libc.so.6 #30 0x00000000004006a1 in _start () (gdb) frame 1 #1 0x00007ffff5f2759c in g_mime_iconv_open (to=3D0x761ef0 "UTF-8", from=3D= 0x83d590 "iso-8859-1") at gmime-iconv.c:261 261 if ((node =3D (IconvCacheNode *) cache_node_lookup (iconv_cache, key, = TRUE))) { (gdb) list 256 key =3D g_alloca (strlen (from) + strlen (to) + 2); 257 sprintf (key, "%s:%s", from, to); 258 = 259 ICONV_CACHE_LOCK (); 260 = 261 if ((node =3D (IconvCacheNode *) cache_node_lookup (iconv_cache, key, = TRUE))) { 262 if (node->used) { 263 if ((cd =3D iconv_open (to, from)) =3D=3D (iconv_t) -1) 264 goto exception; 265 } else { (gdb) print iconv_cache $1 =3D (Cache *) 0x0 (gdb)=20 --===============7715145529118809203==--