From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id DBA6F6DE1BA8 for ; Fri, 17 Feb 2017 06:01:41 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.218 X-Spam-Level: X-Spam-Status: No, score=-0.218 tagged_above=-999 required=5 tests=[AWL=-0.198, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6PPDDKjjg2BG for ; Fri, 17 Feb 2017 06:01:40 -0800 (PST) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by arlo.cworth.org (Postfix) with ESMTPS id 7D90F6DE1BA6 for ; Fri, 17 Feb 2017 06:01:40 -0800 (PST) Received: by mail-lf0-f45.google.com with SMTP id z134so22967611lff.3 for ; Fri, 17 Feb 2017 06:01:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaute-vetsj-com.20150623.gappssmtp.com; s=20150623; h=date:from:subject:to:references:in-reply-to:user-agent:message-id :mime-version:content-transfer-encoding; bh=JxJOFNm8FGMPIMy2inl7X/Y8dLg8q4Nqh4EQjdis/fw=; b=GkwK+uq7D3IImmuhydff6l3FvAcUOB/ImICiwKQYT84ouoCTP0nx8rMIZ9Ma0RcPwK wtniEtPlWPCfHCn6HnhwuQ4HYn79nI4vDI5UcuiMGUfNZk0OxNtYhZ3uE7NftfvMltRD PuVLWdJp5zIIB6PKkpU8QIrnTecbjro/coyPkRAcBo5v62JFcIKugZ4FS+OrZNJ4k3La Sax46+YHids0iJaJqtjgiH67lXDQq4ZLRSryZ9gAvXXSWYp2HAEstnJJTPhMuad5ZzEm vwDOge3RhQ+1GGTq6/en8aN1X0l4qpjJjuPotIM5KJQnv7qSm3T3j5+gpS4P1BPa723c u0gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:references:in-reply-to :user-agent:message-id:mime-version:content-transfer-encoding; bh=JxJOFNm8FGMPIMy2inl7X/Y8dLg8q4Nqh4EQjdis/fw=; b=YaVMupNh1Dux9bHqLzpi+JGIIAvYGR8XK3idtROCG9nPN+WywRt4zMBQJ93GuSfIV3 2cHELwLJmVptokkdLHKQtIon/ev0qwJaw72dStOMEaH/XvLrXgl+pcuotBc/EOvsLCyZ RFFOVibwIC3yoA0dCIqT7Xv06LSc9Vjeki1HJPU246V4xStdoEMYMOJqFyELv9oGc4ZR +UMFP0gxGbIt9ZfUrAkHKh/YSVXMBrxw8zkz4X63CI+xyHVeUn2c+iBX5JlI3zwbRRSb VbVR9QsVBDTRrFwzFx3NXyam4znWV2rBvSRHp2IJdGTu/1bbp8MJXvatZNl0buxCPf8O 9zlg== X-Gm-Message-State: AMke39kJ7cygrphiGC9Vwr4FpQiAsAqiVcI2D5Fp2oAo2S7URHWxypF2VzH5Bt+zx2PIsg== X-Received: by 10.46.6.26 with SMTP id 26mr2267197ljg.46.1487340097824; Fri, 17 Feb 2017 06:01:37 -0800 (PST) Received: from localhost ([128.39.46.106]) by smtp.gmail.com with ESMTPSA id e21sm2531833ljb.38.2017.02.17.06.01.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Feb 2017 06:01:36 -0800 (PST) Date: Fri, 17 Feb 2017 14:01:35 +0000 From: Gaute Hope Subject: Re: talloc_abort in notmuch_thread_get_tags () when db has been modified To: David Bremner , notmuch@notmuchmail.org References: <1453121100-astroid-2-c62fwcrm91-18877@strange> <1457341792-astroid-0-2wtydh6y1q-15951@strange> <87r3fmts2y.fsf@zancas.localnet> <1487199120.tz5yvag0pm.astroid@strange.none> <877f4p9f2m.fsf@tethera.net> In-Reply-To: <877f4p9f2m.fsf@tethera.net> User-Agent: astroid/v0.7-24-g0db9798e (https://github.com/astroidmail/astroid) Message-Id: <1487339566.mz8acpov1j.astroid@strange.none> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Fri, 17 Feb 2017 14:01:42 -0000 David Bremner writes on februar 17, 2017 13:28: > Gaute Hope writes: >=20 >> David Bremner writes on mars 7, 2016 13:01: >>> Gaute Hope writes: >>>=20 >>> Of course _why_ this error is happening could still be notmuch's >>> fault. Can you reproduce the problem under valgrind? >> >=20 >> Hi again, >> >> For future reference: Attached is C++ test code that demonstrates the pr= oblem >> (at least on my setup). It is part of the astroid test suite. >> >=20 > And did you try running this under valgrind? >=20 ```=20 $ valgrind test/test_notmuch_standalone =3D=3D9543=3D=3D Memcheck, a memory error detector =3D=3D9543=3D=3D Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward e= t al. =3D=3D9543=3D=3D Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyri= ght info =3D=3D9543=3D=3D Command: test/test_notmuch_standalone =3D=3D9543=3D=3D=20 db: running test query.. query: *, approx: 10 threads. thread id to change: 0000000000000002, thread no: 3 restarting query.. moving to thread: 2 tags: unread=20 tags: inbox=20 continue loading.. threads !=3D NULL terminate called after throwing an instance of 'Xapian::DatabaseModifiedErr= or' =3D=3D9543=3D=3D=20 =3D=3D9543=3D=3D Process terminating with default action of signal 6 (SIGAB= RT): dumping core =3D=3D9543=3D=3D at 0xE46E04F: raise (in /usr/lib/libc-2.24.so) =3D=3D9543=3D=3D by 0xE46F479: abort (in /usr/lib/libc-2.24.so) =3D=3D9543=3D=3D by 0xD7494EC: __gnu_cxx::__verbose_terminate_handler() = (vterminate.cc:95) =3D=3D9543=3D=3D by 0xD7472A5: __cxxabiv1::__terminate(void (*)()) (eh_t= erminate.cc:47) =3D=3D9543=3D=3D by 0xD7472F0: std::terminate() (eh_terminate.cc:57) =3D=3D9543=3D=3D by 0xD747507: __cxa_throw (eh_throw.cc:87) =3D=3D9543=3D=3D by 0xEEB987D: ??? (in /usr/lib/libxapian.so.30.2.0) =3D=3D9543=3D=3D by 0xEEBC4A7: ??? (in /usr/lib/libxapian.so.30.2.0) =3D=3D9543=3D=3D by 0xEEBEE14: ??? (in /usr/lib/libxapian.so.30.2.0) =3D=3D9543=3D=3D by 0xEEBF0B7: ??? (in /usr/lib/libxapian.so.30.2.0) =3D=3D9543=3D=3D by 0xEEBFF77: ??? (in /usr/lib/libxapian.so.30.2.0) =3D=3D9543=3D=3D by 0xEE9539A: ??? (in /usr/lib/libxapian.so.30.2.0) =3D=3D9543=3D=3D=20 =3D=3D9543=3D=3D HEAP SUMMARY: =3D=3D9543=3D=3D in use at exit: 332,606 bytes in 1,171 blocks =3D=3D9543=3D=3D total heap usage: 28,503 allocs, 27,332 frees, 3,835,392= bytes allocated =3D=3D9543=3D=3D=20 =3D=3D9543=3D=3D LEAK SUMMARY: =3D=3D9543=3D=3D definitely lost: 232 bytes in 1 blocks =3D=3D9543=3D=3D indirectly lost: 285 bytes in 2 blocks =3D=3D9543=3D=3D possibly lost: 8,577 bytes in 93 blocks =3D=3D9543=3D=3D still reachable: 323,432 bytes in 1,074 blocks =3D=3D9543=3D=3D of which reachable via heuristic: =3D=3D9543=3D=3D newarray : 1,536 bytes i= n 16 blocks =3D=3D9543=3D=3D suppressed: 0 bytes in 0 blocks =3D=3D9543=3D=3D Rerun with --leak-check=3Dfull to see details of leaked me= mory =3D=3D9543=3D=3D=20 =3D=3D9543=3D=3D For counts of detected and suppressed errors, rerun with: = -v =3D=3D9543=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 fro= m 0) Aborted (core dumped) ``` >> The test-code must be adapted to your _test_ notmuch db. >> >> To pick up on this again, this issue started cropping up more frequently >> again, and I can't see a way currently to anticipate or recover from >> this from a user application of the notmuch library. There seems to be >> an XapianError, which may or may not be handled by notmuch. >=20 > Previously you only reported a talloc error. Do you have a new stacktrace= ? >=20 Yeah - unsure if it is the same. ``` (gdb) r Starting program: /home/gaute/dev/mail/notm/astroid/test/test_notmuch_stand= alone=20 [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". db: running test query.. query: *, approx: 10 threads. thread id to change: 0000000000000002, thread no: 3 restarting query.. moving to thread: 2 tags: unread=20 tags: inbox=20 continue loading.. threads !=3D NULL terminate called after throwing an instance of 'Xapian::DatabaseModifiedErr= or' Program received signal SIGABRT, Aborted. 0x00007fffee46b04f in raise () from /usr/lib/libc.so.6 (gdb) bt #0 0x00007fffee46b04f in raise () at /usr/lib/libc.so.6 #1 0x00007fffee46c47a in abort () at /usr/lib/libc.so.6 #2 0x00007fffef2624ed in __gnu_cxx::__verbose_terminate_handler() () at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/vterminate.cc:95 #3 0x00007fffef2602a6 in __cxxabiv1::__terminate(void (*)()) (handler=3D) at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:4= 7 #4 0x00007fffef2602f1 in std::terminate() () at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:5= 7 #5 0x00007fffef260508 in __cxxabiv1::__cxa_throw(void*, std::type_info*, v= oid (*)(void*)) (obj=3D0xb0eff0, tinfo=3D0x7fffede100b8 , dest=3D0x7fffedaa7e30 ) at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:87 #6 0x00007fffedac587e in () at /usr/lib/libxapian.so.30 #7 0x00007fffedac84a8 in () at /usr/lib/libxapian.so.30 #8 0x00007fffedacae15 in () at /usr/lib/libxapian.so.30 #9 0x00007fffedacb0b8 in () at /usr/lib/libxapian.so.30 #10 0x00007fffedacbf78 in () at /usr/lib/libxapian.so.30 #11 0x00007fffedaa139b in () at /usr/lib/libxapian.so.30 #12 0x00007fffeda55e3c in Xapian::Document::termlist_begin() const () at /usr/lib/libxapian.so.30 #13 0x00007ffff716e11b in _notmuch_message_ensure_metadata(_notmuch_message= *) (message=3Dmessage@entry=3D0xb11430) at lib/message.cc:331 #14 0x00007ffff716e989 in notmuch_message_get_thread_id(notmuch_message_t*)= (message=3Dmessage@entry=3D0xb11430) at lib/message.cc:536 #15 0x00007ffff7174685 in _notmuch_thread_create(void*, notmuch_database_t*= , unsigned int, notmuch_doc_id_set_t*, notmuch_string_list_t*, notmuch_excl= ude_t, notmuch_sort_t) (ctx=3D0xb0f270, notmuch=3D0xaf62c0, seed_doc_id=3D3= , match_set=3Dmatch_set@entry=3D0xb0ef28, exclude_terms=3D0xabb060, omit_ex= cluded=3DNOTMUCH_EXCLUDE_TRUE, sort=3DNOTMUCH_SORT_NEWEST_FIRST) at lib/thr= ead.cc:456 #16 0x00007ffff71715bd in notmuch_threads_get(notmuch_threads_t*) (threads= =3D0xb0ef10) at lib/query.cc:532 #17 0x00000000005f85a5 in main() () at test/test_notmuch_standalone.cc:191 ``` =