From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sMAFJVW85F/YEAAA0tVLHw (envelope-from ) for ; Thu, 24 Dec 2020 16:05:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EOvAIFW85F+aLgAAbx9fmQ (envelope-from ) for ; Thu, 24 Dec 2020 16:05:41 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0ADDC940142 for ; Thu, 24 Dec 2020 16:05:40 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 9BEBB29CB4; Thu, 24 Dec 2020 11:05:33 -0500 (EST) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by mail.notmuchmail.org (Postfix) with ESMTPS id 21D50270DC for ; Thu, 24 Dec 2020 11:05:31 -0500 (EST) Received: by mail-ed1-x533.google.com with SMTP id g24so2461624edw.9 for ; Thu, 24 Dec 2020 08:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version; bh=Il9GmqKPHcJ1gGiYIAc6HoPVyK09i2clVi16jIYdlYU=; b=W9R/UBpgwBhicumVziNboWx6LihOuxf5IaFfz/b4G7QP9NKM8gtp/huKTTcgJgIE+n jp1dwJckloEJebpn8xLlCAE3ISQdHWze6x4RODYah2C2NUjGrCBS2qVMGCOt8uphaksu y1gNYuSD6qMMa4zMtJZIvSZw9gNn6eYh64hk1sGYj2L+DgisucMvx5EvmBUqNdKnlx0l 1Rx1+TqBzErolOWQjWyXzEZsKlBfRoRR7jWi8PiPxh/IdZ/IQtR0COCeTml73kfWbqUL fjHs0oHbBIIj07JWvLhDcskiTx6OzdJPEObzeEwsQSGrXqdEUspqvszITYI+TGBcaPRk E7tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:in-reply-to:references :date:message-id:mime-version; bh=Il9GmqKPHcJ1gGiYIAc6HoPVyK09i2clVi16jIYdlYU=; b=H+ph6qhATRAS3TadNKNJBhZRaFF/9VDnoki3+l2VatKQUySPOnEsX7Qz0Lx5Wg3803 sPjccUqJIOhYxTt43T+TQXgHvSGv7MwiCJngC3cQL3KXIyMiidE9ZK71C7ugxOsD50XY HckPhxc+sdSLtzObymM0HW4mRsYNJX7xo7Z1hI+JZD6eCZdSQH+dnE6b6SGi6uA/B8Cz Qh3H2k42v7KOZm8QqkiWwElAFx/8Uzm8syFhd8IpDEzwRW0wIsJffUYh8GjJgWmBT1P3 /CC8f9n+KipCCvL6HCPyhSBHaXFMEs/y3zfPjJDpTPVDaQutKJ28r5AeunrvwY5Vr1B+ Q8Hw== X-Gm-Message-State: AOAM533gn/yAHygL2plNInI6gtpPx7WPqPx6+8hLFu0bbjTNDFY1rEBh jdICdyHMkEFuWiwxGiab+YHb2Cxdx6I= X-Google-Smtp-Source: ABdhPJx3QtXrZX7j1lKuzHK1JHzgEWkxlTl58zbjFzbbq89Vc8pUKdEHVeLIrrx+A/4lXna0veS4ww== X-Received: by 2002:aa7:de0f:: with SMTP id h15mr29470390edv.110.1608825926081; Thu, 24 Dec 2020 08:05:26 -0800 (PST) Received: from powell.devork.be (2a02-8388-8480-1180-4c18-fc69-8d8c-22b5.cable.dynamic.v6.surfer.at. [2a02:8388:8480:1180:4c18:fc69:8d8c:22b5]) by smtp.gmail.com with ESMTPSA id j7sm33180165edp.52.2020.12.24.08.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Dec 2020 08:05:25 -0800 (PST) Sender: Floris Bruynooghe Received: (nullmailer pid 519020 invoked by uid 1000); Thu, 24 Dec 2020 16:05:24 -0000 From: Floris Bruynooghe To: David Bremner , notmuch@notmuchmail.org Subject: Re: Adding config cache to notmuch_database_t breaks python-cffi test In-Reply-To: <87y2hsawra.fsf@tethera.net> References: <20201220192033.1361895-1-david@tethera.net> <871rfkchqe.fsf@tethera.net> <87y2hsawra.fsf@tethera.net> Date: Thu, 24 Dec 2020 17:05:24 +0100 Message-ID: <877dp7b35n.fsf@powell.devork.be> MIME-Version: 1.0 Message-ID-Hash: JUW2QUBSJSFXLSCGHTSOMJRK2PJIFPFH X-Message-ID-Hash: JUW2QUBSJSFXLSCGHTSOMJRK2PJIFPFH X-MailFrom: floris.bruynooghe@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.60 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=W9R/UBpg; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 0ADDC940142 X-Spam-Score: 0.60 X-Migadu-Scanner: scn0.migadu.com X-TUID: pWJhRCWgjRIC On Sun 20 Dec 2020 at 19:22 -0400, David Bremner wrote: Hi David, I'm just catching up on some mailing lists... > David Bremner writes: > >> David Bremner writes: >> >>> I hope Floris (or someone) can tell me what is going on here, I don't >>> understand the memory management in the CFFI bindings very well. >>> >>> As part of my attempt to remodel config handling, I've added a cache >>> for the configuration information stored in the database. This doesn't >>> seem to break any other tests, and valgrind doesn't spot any memory >>> errors. >>> >>> Here's the output from pytest >> >> Oh, I bet I know what it is. I need to update the cache when calling >> notmuch_database_set_config. It's just a surprise that nothing in our >> test suite does a read after write for configuration information in the >> same database session. >> > > Yep, that was it, sorry for the noise. I guess I kindof panicked at not > understanding what was going on in the bindings tests. Yes, this test is checking deletion actually works. Glad the python tests helped catch an issue. :) Cheers, Floris