From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 0AuTGN4/R2aNtgAAe85BDQ:P1 (envelope-from ) for ; Fri, 17 May 2024 13:30:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 0AuTGN4/R2aNtgAAe85BDQ (envelope-from ) for ; Fri, 17 May 2024 13:30:38 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OlA70FD5; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715945438; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=6Ebpeog+368zKxQX6gKWAsuKXawng2SgAxRGduy3bxE=; b=qG4oZKuo88pjERve33EhEFupmzrKouZerS3APExHpTtRT6YoYQPRAyT06mjbxuIPJ8lmh+ VVoHp8McxtrGajRxPP3sXgazXadQWCS23QIr1ElojYc6uxDkI9PUoPz8m5HeSnyrDO7HVL O0FRy1zQyIzjqIfYkpRSnDAdM1y4uC0QDFIeE1usVONlJqzhJRq1FxKJGH/WCAb4cOoniI 7tzUZpFLNkm/hNyBrt4ZSwPOfiu5K6Ui9SMDes10A00XyJtw8kxmu8INy6FSF4uDOP/JtQ 0YFAkIVY1Rl97WJHc5ZMoTJCGOu49jGucxVf2gKeyXyBpp2R/YtrqFkGNPFv6g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OlA70FD5; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715945438; a=rsa-sha256; cv=none; b=gyBp+a/AeCORYPpu7v6OJXAKjU278DhRJfcSiK+mpNd65mHKcoluG0uxWinUeswQslaB3j Iyj0XPRwxfrWFFNh8QSKm5Jzpcz87YpKK9lAimgDuQoHftp4kyVa3R30CWyEdDNhj6avcW pb9nQGsYCk8D9F7/HXsjBiDS6LhR+aQJhA4oJKQ3fNbVLhUOtILzP1MlSi+50S4WHfiedp uFvXuHrDow9QH3MCmRWl0Pz1XUlcZmneXqCO4K3dfTQ26LlC4TAYL3EKGbQgZg6r0uQsI/ dtRORIlaZJwoU6j/E11ky07GC8IbfNadUXO1EGVd+zzA74bGvNVakoaIaGR5gw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 290C97881A for ; Fri, 17 May 2024 13:30:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7vma-0000qO-OH; Fri, 17 May 2024 07:29:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7vmY-0000qA-Dz for emacs-orgmode@gnu.org; Fri, 17 May 2024 07:29:51 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7vmW-0002pn-C8 for emacs-orgmode@gnu.org; Fri, 17 May 2024 07:29:50 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0E66F240028 for ; Fri, 17 May 2024 13:29:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1715945386; bh=LBAEy9Cl7nUPTggj8tAwC+g0Vy1XFvaAMIyd/d8oE7w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=OlA70FD5cafoYIFQWxNBNuXJgqxvE5CGr3gWRP8WJ19PbxGlpYCJbmsJEqdMY32c0 YqIfz4j15BqotxgZkAr6cu8kwbsPmpcA9A4tQDVQbVD4W5Q55ybmnf51QyC7u8c3wt GZz0ClOOzMBrttQT/pXjjlc5y9OrUOZnZ/tPQB3c0dlRzt1YOV9uHMO7ZE9UUUbO1c jRXdbehwMQgSBKI8QZ9DAbPQSzo2GtObCq27/4JjtA7/K/1n7m5lDVhdIcvpTbmKtz Vlwk/wPHT07uNVww+GyWKp9qvWzlGVM68Umy0CMf3KvSC0/yGecVJNCv152ROfyKNQ y1RQuvq/p/BvQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Vgl9j1R7Vz9rxN; Fri, 17 May 2024 13:29:45 +0200 (CEST) From: Ihor Radchenko To: Greg Minshall Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] cache file conflict? [9.7-pre (release_9.6.29-1441-gaa71fa @ /home/minshall/.emacs.d/straight/build/org/)] In-Reply-To: <574109.1715751441@archlinux> References: <574109.1715751441@archlinux> Date: Fri, 17 May 2024 11:31:26 +0000 Message-ID: <871q60ad4h.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.58 X-Migadu-Queue-Id: 290C97881A X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.58 X-TUID: cJOkWSAoXn4J --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Greg Minshall writes: > i run various Emacs instances, in each of which i run org. i frequently > get these messages (followed by errors when i reply 'q'): > ---- > ...rg-persist/gc-lock.eld locked by minshall@arch... (pid 546721): (s, q,= p, ?)?=20 > Error running timer =E2=80=98org-persist--refresh-gc-lock=E2=80=99: (file= -locked "/home/minshall/.cache/org-persist/gc-lock.eld" "minshall@archlinux= (pid 546721)") > ---- > > since i don't see a PID in the lock file name (i assume it is), i wonder > if the code occasionally has this problem when more than one instance > attempts to acquire this lock at a time? In theory, the odds should be quite slim, unless you open that file manually. Anyway... Does the attached patch fix the problem for you? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-lisp-org-persist.el-Ignore-lock-files-when-writing-c.patch >From 7f208e8802ed10017cce094114d395698523beec Mon Sep 17 00:00:00 2001 Message-ID: <7f208e8802ed10017cce094114d395698523beec.1715945418.git.yantar92@posteo.net> From: Ihor Radchenko Date: Fri, 17 May 2024 14:28:48 +0300 Subject: [PATCH] lisp/org-persist.el: Ignore lock files when writing cache * lisp/org-persist.el (org-persist--write-elisp-file): Unlock file before writing cache. Reported-by: Greg Minshall Link: https://orgmode.org/list/574109.1715751441@archlinux --- lisp/org-persist.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/org-persist.el b/lisp/org-persist.el index 0df345536..a8fc77c95 100644 --- a/lisp/org-persist.el +++ b/lisp/org-persist.el @@ -481,7 +481,10 @@ (defun org-persist--write-elisp-file (file data &optional no-circular pp) (if pp (let ((pp-use-max-width nil)) ; Emacs bug#58687 (pp data (current-buffer))) - (prin1 data (current-buffer)))) + (prin1 data (current-buffer))) + ;; Force writing even when the file happens to be opened by + ;; another Emacs process. + (unlock-buffer)) (org-persist--display-time (- (float-time) start-time) "Writing to %S" file))) -- 2.45.1 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--