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 eDEIHLjc3194dQAA0tVLHw (envelope-from ) for ; Sun, 20 Dec 2020 23:22:32 +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 6Ny0F7jc319xEwAAbx9fmQ (envelope-from ) for ; Sun, 20 Dec 2020 23:22:32 +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 D67889403C8 for ; Sun, 20 Dec 2020 23:22:31 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 9F59229C28; Sun, 20 Dec 2020 18:22:23 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 338C028535 for ; Sun, 20 Dec 2020 18:22:21 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id 5F94E5FC36; Sun, 20 Dec 2020 18:22:19 -0500 (EST) Received: (nullmailer pid 1466340 invoked by uid 1000); Sun, 20 Dec 2020 23:22:17 -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: <871rfkchqe.fsf@tethera.net> References: <20201220192033.1361895-1-david@tethera.net> <871rfkchqe.fsf@tethera.net> Date: Sun, 20 Dec 2020 19:22:17 -0400 Message-ID: <87y2hsawra.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: JZ62TAY5POSHMJJ7FJDRFBTDEP7U3ALP X-Message-ID-Hash: JZ62TAY5POSHMJJ7FJDRFBTDEP7U3ALP 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: D67889403C8 X-Spam-Score: -0.52 X-Migadu-Scanner: scn1.migadu.com X-TUID: Gt9DcpMnFR++ 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. d