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 7F60C6DE021D for ; Mon, 7 Mar 2016 01:14:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.604 X-Spam-Level: X-Spam-Status: No, score=-0.604 tagged_above=-999 required=5 tests=[AWL=0.307, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.211] 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 7_2lrbajME3u for ; Mon, 7 Mar 2016 01:14:08 -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 A04D46DE020D for ; Mon, 7 Mar 2016 01:14:07 -0800 (PST) Received: by mail-lb0-f176.google.com with SMTP id xr8so26226435lbb.1 for ; Mon, 07 Mar 2016 01:14:07 -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=IyKCXE+PfUM7ixZxsQi7Cl9HDDLY8FQo1KHuZCo9DQc=; b=qP4sJaZqR5xHoPWb0cHGynD/6N4YhaxD1vAeN63vDtubFTqzAL2XePO2UgKIL3QyWf s4bf5iWU3zhlL43s5snK0cTX3DpljH6rLFsWFRzQkoY8119w/NZA0T5QbNpBz8DcHx/H 0OEypwc608RVI4SbaivY4hi60/JLvfIwsG7pVLrwKGX1N6IsfH/NDLYQfSETha0FVOxm /4Nbz7h14cMRQj1dmdFghp2YCKRvRsWTdlmKIlSDuT7TV1/mMn+Itovb/ewaHleg0maA S+1L1E4QB2NEjNDEZEIgMglajS909q75ii7CeyyTfoARvnkYLWXlklSvSPvf4fladEv/ 7r+g== 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-transfer-encoding; bh=IyKCXE+PfUM7ixZxsQi7Cl9HDDLY8FQo1KHuZCo9DQc=; b=LatXzirL/PyWxFb7zSNLNsDOCKbcbhzOnDduX/Fna/+RZb1PU6i8i66TyxtSneqiXe 86usxOyc/Srto3YmCAXjRqyNvmLAPgduSP/g5/o8w88UEqZZvSfbgSQuWF+6eWsp51Pw KNI+X8BdDcqX2SqltxJfoLwvArTaTS53y9yAT5KfppnuH29gTnnPQZEL2sHKDNvKtDvF m7fGxI15o7FiM+VqFLoejEbqmquWGCaygMyA1UbtwfRY/UrRKMmpMYuLHjjbfpW2D3uL BJjxo9J1zTtHb0h+WtpG6GJk5R5cxj9d2uICM26gYbNaxnTPltFJkvLJm5j3gYePCuXx 4HyQ== X-Gm-Message-State: AD7BkJKnFH5r7dQ28jZNZexXyS8Q7jQ+sZgoqGXAnvvIi+eONLQ/+BreS9hlQL99/Ze/eQ== X-Received: by 10.112.201.133 with SMTP id ka5mr7529494lbc.1.1457342042936; Mon, 07 Mar 2016 01:14:02 -0800 (PST) Received: from localhost ([128.39.46.106]) by smtp.gmail.com with ESMTPSA id f134sm2654531lff.34.2016.03.07.01.14.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Mar 2016 01:14:01 -0800 (PST) Date: Mon, 07 Mar 2016 09:14:00 +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> In-Reply-To: <1453121100-astroid-2-c62fwcrm91-18877@strange> User-Agent: astroid/v0.5-84-gb119b4ce (https://github.com/gauteh/astroid) Message-Id: <1457341792-astroid-0-2wtydh6y1q-15951@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, 07 Mar 2016 09:14:12 -0000 Gaute Hope writes on January 18, 2016 13:45: > 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. >> >=20 > Ok, I'll check some further. I am checking whether nm_thread is NULL > though, [...] Hi, The stack trace that I get is as follows: ``` Stack trace of thread 15719: #0 0x00007fc80cd9f2a8 raise (libc.so.6) #1 0x00007fc80cda072a abort (libc.so.6) #2 0x00007fc80c95889c n/a (libtalloc.so.2) #3 0x00007fc80c95a02d talloc_named_const (libtalloc.so.2) #4 0x00007fc814d674c5 _notmuch_string_list_create (libnotm= uch.so.4) #5 0x00007fc814d75f32 notmuch_thread_get_tags (libnotmuch.= so.4) #6 0x00000000004757cb _ZN7Astroid13NotmuchThread8get_tagsE= P15_notmuch_thread (astroid) ``` this happens when: 1) start a long running query loading in the background 2) modify the db enough for the query to get invalidated. as far as I can see, there is _no_ way to catch this error without completely crashing the application. I would have to isolate this code in a separate process or trap SIGABRT (which is certainly messy). Best regards, Gaute =