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 8LDVFUS831+hfgAA0tVLHw (envelope-from ) for ; Sun, 20 Dec 2020 21:04:04 +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 oMGgEUS831/aKwAAbx9fmQ (envelope-from ) for ; Sun, 20 Dec 2020 21:04:04 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 DA84F94042C for ; Sun, 20 Dec 2020 21:04:03 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 524AF29C98; Sun, 20 Dec 2020 16:03:57 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 14D4D2852F for ; Sun, 20 Dec 2020 16:03:55 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id CC4FF5FC36; Sun, 20 Dec 2020 16:03:54 -0500 (EST) Received: (nullmailer pid 1409840 invoked by uid 1000); Sun, 20 Dec 2020 21:03:53 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: flub@devork.be Subject: Re: Adding config cache to notmuch_database_t breaks python-cffi test In-Reply-To: <20201220192033.1361895-1-david@tethera.net> References: <20201220192033.1361895-1-david@tethera.net> Date: Sun, 20 Dec 2020 17:03:53 -0400 Message-ID: <871rfkchqe.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: XGETIG3H3JFPEYZ6CI4Y5AIP25BHD2LJ X-Message-ID-Hash: XGETIG3H3JFPEYZ6CI4Y5AIP25BHD2LJ X-MailFrom: david@tethera.net 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.52 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: DA84F94042C X-Spam-Score: -0.52 X-Migadu-Scanner: scn1.migadu.com X-TUID: ZaBQz0QmPgZY 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. d