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 D21946DE180F for ; Mon, 18 Jan 2016 04:45:18 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.474 X-Spam-Level: X-Spam-Status: No, score=-0.474 tagged_above=-999 required=5 tests=[AWL=0.227, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001] 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 u9s4eK6XP4gY for ; Mon, 18 Jan 2016 04:45:16 -0800 (PST) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by arlo.cworth.org (Postfix) with ESMTPS id 641E26DE17FD for ; Mon, 18 Jan 2016 04:45:16 -0800 (PST) Received: by mail-lb0-f176.google.com with SMTP id oh2so346791488lbb.3 for ; Mon, 18 Jan 2016 04:45:16 -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-type:content-transfer-encoding; bh=5RIPm81YJN5IkfS93qM2SKR2k6BhzT8aviQQtD1TUI4=; b=X+tbsk40GV6VJ+aPEm4HOvPIBEKJU+NkSYQdPXHTVRaeep7ieBa0KzqrsmHz48kMt1 vBWYmtjHWG1wxx6jVaPGCjO/RyA7APYC1sfhxabzTy+rVx1NME1adDAZlYJw1eS+plug K61+yL/Lb09Y5b8LudCf2bEx+DEjcT4BSj4vGizhPHvWVL3nljnf4+3Oo3tCcKnHjxon Jl+WiA1OMKAY9xYM9SA4BH1R9z8YIMScRJjoudYFx/4RQaYCtYZrNtcrTtxWJQId6S3E chP7JPzAL4O48dU7AQpdIbYL/nFjL7VeCpT2PYEgMuzD5rry1xonho68LEJRxIT9IrRM mmrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:subject:to:references:in-reply-to :user-agent:message-id:mime-version:content-type :content-transfer-encoding; bh=5RIPm81YJN5IkfS93qM2SKR2k6BhzT8aviQQtD1TUI4=; b=f0wLqCVnW9Q/Y55f3uKE6m2uGTG3ZTBE1JlNZXnv+K0m+xdny78z+bxvbfxvuFxfyA UxPkojioyKWP/KcU338ws6zHQQ+PqdDa7nlRUccWkrYlGWfJOQYeL36chyZVhdq2Qg3Z 2x18Mo0dsCjNDE/gzGSky6zSsyWc/xWyXr66YdeZbmpjUjcsBsLUmH/bzllyXzSkT4cZ CXfTnAP2z0vdDwG3bYf8o+HNiaBpLg2ZHOIb2ldVIdymduDMmZWR8S84vHiHUYoDjsGC iKjf+u1EGbMDKu1AP/AH3Qeu8BNEZbKFHipFo6WaRxssykxeVjOj6+XC0rCsJeh1lwnO FvXA== X-Gm-Message-State: ALoCoQnR6/qwHjWqKJIlL9P/fkNBkdj3XqVnW74gkR6maYxEiAbS1ZXqER8YwFNuNHKhPH0abpfi4/Y8x9105A4uxsF6G31cbg== X-Received: by 10.112.14.102 with SMTP id o6mr8090856lbc.87.1453121114129; Mon, 18 Jan 2016 04:45:14 -0800 (PST) Received: from localhost ([128.39.46.106]) by smtp.gmail.com with ESMTPSA id nv8sm3159577lbb.7.2016.01.18.04.45.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2016 04:45:13 -0800 (PST) Date: Mon, 18 Jan 2016 12:45:12 +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: In-Reply-To: User-Agent: astroid/vv0.4-213-g53abb3e2 (https://github.com/gauteh/astroid) Message-Id: <1453121100-astroid-2-c62fwcrm91-18877@strange> 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.20 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: Mon, 18 Jan 2016 12:45:19 -0000 David Bremner writes on January 18, 2016 13:25: > The most likely cause of such a crash looks to me like nm_thread is NULL > or corrupted when passed in to get_tags. It's used without checking as a > talloc context, and that call to talloc never returns. > Ok, I'll check some further. I am checking whether nm_thread is NULL though, the preceding code is as follows (astroid/src/modes/thread_index/thread_index.cc:258): ``` for (; notmuch_threads_valid (threads); notmuch_threads_move_to_next (threads)) { notmuch_thread_t * thread; thread =3D notmuch_threads_get (threads); if (thread =3D=3D NULL) { log << error << "ti: error: could not get thread." << endl; throw database_error ("ti: could not get thread (is NULL)"); } /* test for revision discarded */ const char * ti =3D notmuch_thread_get_thread_id (thread); if (ti =3D=3D NULL) { log << error << "ti: revision discarded, trying to reopen." << endl= ; reopen_tries++; refresh (all, current_thread + count, false); return; } NotmuchThread *t =3D new NotmuchThread (thread); // get_tags is insid= e here notmuch_thread_destroy (thread); ``` (note that there is a bit of code there trying to determine whether the db is still valid, or needs to be re-opened) - g =