From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OP1ECF3TjGLt1QAAbAwnHQ (envelope-from ) for ; Tue, 24 May 2022 14:45:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aO9FCF3TjGKOwgAAauVa8A (envelope-from ) for ; Tue, 24 May 2022 14:45:17 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C7C0B3942E for ; Tue, 24 May 2022 14:45:16 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 054295F70D; Tue, 24 May 2022 12:45:13 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 9A27E5F6E8 for ; Tue, 24 May 2022 12:45:10 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id D36B45FBD7; Tue, 24 May 2022 08:45:09 -0400 (EDT) Received: (nullmailer pid 3751524 invoked by uid 1000); Tue, 24 May 2022 12:45:08 -0000 From: David Bremner To: Eliza Velasquez , notmuch@notmuchmail.org Subject: Re: [BUG] notmuch_message_tags_to_maildir_flags does not always invalidate filenames_list In-Reply-To: <877d6g1t7e.fsf@eliza.sh> References: <877d6g1t7e.fsf@eliza.sh> Date: Tue, 24 May 2022 09:45:08 -0300 Message-ID: <87leur85gr.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: TDKV7SSRCO4LA43FPFCGAM3JHY7U6GBK X-Message-ID-Hash: TDKV7SSRCO4LA43FPFCGAM3JHY7U6GBK 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; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653396316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=a7E8ObptKQposVUKj83lXttfuZVARSJZlFOWoXGCY/w=; b=lRUDvmHBMz+iar3vQjMyuOS/refN4gD+gSu7TljPnMkXrJtHHrSb4urSHsZFBDKEb3pFaL hoxkcJMV8TCrxQhgzRnZK2C5CFqI42FiMB1qnbxIYIAF+3cWEc+ylB08c0OKsRo0WqyurF /QiQpBI/9EgpJbbe5Cl/YZXKWXGOIzyhfcX9v8U5wolTQedg32VZ9yw1tW6Oeq/PsP/5Vy L+wMVCYQ+owP2uLhByAehmnOXFZu04Q6bJ128nKIiZK9DML0evOPb+ghzaf08M4v0RnB0s GZDS3e5q2uI0L+wMbtDalcPCX2Vk+Y7O4gYKRpc2Z9YKjFe51v1OCRuKzP6n+w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653396316; a=rsa-sha256; cv=none; b=tP+etdxNHHUfj0gdztLN3Nez3BmWUOkOvxX8XiqfWtZiAWOOpcVZg5GoZiHwoJRt9PSbwZ nzrSQ5GH4/j2m3FkHUl7nWqsLSjFXw9n6Q6ZwE4xu9B1bXkpU79rAuD/GA87PoiPFTM2R3 PSfSzF/BeBapp68UmQQ2Io+Xl97bgpw84GFAlbNogDQOGCQfPgpNGpqwy79vr4YAq2QUhw /Ryi7SJyC1amaldccXKn2NFE0BfZVCaslVb55In/fiMHGeR6MfMlyv0VAI9ops+wjZCK+U Cvx+hPVOtq43r2wzYHQ6s7nNi/k+nkyUDzjPLf8lG8nRu+Xnspvb4OGwS8/UEQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.52 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: C7C0B3942E X-Spam-Score: -2.52 X-Migadu-Scanner: scn0.migadu.com X-TUID: xS+cF/1gpN3M Eliza Velasquez writes: > Hello notmuch, > > As the subject says, it seems like the filename cache for a message is > not reliably invalidated when notmuch_message_tags_to_maildir_flags is > called, causing the following series of function calls to behave > unexpectedly. > > - notmuch_database_index_file > - notmuch_message_get_filenames > - notmuch_message_tags_to_maildir_flags > - notmuch_message_get_filenames (stale list returned) > > According to the investigator [1], this happens about 10% of the time, > but it's possible that this is just because there is some quirk in the > client-side code causing it to trigger only sometimes. > > [1] https://github.com/elizagamedev/mujmap/pull/10#issuecomment-1131587169 > I have been looking at this code, and making some small improvements [1], but without a C reproducer I don't really know if it helps the submitter's issue. d [1]: https://nmbug.notmuchmail.org/nmweb/show/20220523233901.3506880-1-david@tethera.net