GNU bug report logs - #75209
30.0.93; Emacs reader failed to read data in "/home/nlj/.cache/org-persist/gc-lock.eld"

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: "N. Jackson" <njackson@HIDDEN>; dated Mon, 30 Dec 2024 18:49:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 10 Feb 2025 17:59:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 10 12:59:09 2025
Received: from localhost ([127.0.0.1]:52363 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1thY3o-00089w-UV
	for submit <at> debbugs.gnu.org; Mon, 10 Feb 2025 12:59:09 -0500
Received: from mout01.posteo.de ([185.67.36.65]:43149)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1thY3k-00089N-Su
 for 75209 <at> debbugs.gnu.org; Mon, 10 Feb 2025 12:59:07 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id F243B240028
 for <75209 <at> debbugs.gnu.org>; Mon, 10 Feb 2025 18:58:57 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1739210338; bh=dRSr8zc8SEdFWJrNrIFEXSYIdXBnachYJGiyBteNSOY=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=bEzHh+WhMJjUPTBsVrGTDqvI4kzVjfUu+zKhaxz7hlt0/nHAnIGVkrve+eGHQl70x
 jdMEl29ovLC+wRfC2hNeXJEvDlux2c7tZxP0O06C5Yd9CBZKUJ/s/10Odl9Nvp/fG2
 Om/mAb5T2SPX4wbr0eOFbPSn7whmtCePLObB3DK8pHBbEOCKhBSspwi2mUnzypre58
 0ii6se0cRCON+5AMymTNpfpUqw+hI7MQ4cXHdf2ZJoSmUY06UlXm0umNLh8A82xoQS
 kriEJC0Un/MCWT+Mzo1tDfnVCIBn9LCW5sSqjYG4Tj7QllbjyC3BvVtxX32BG9yDJC
 sucf0s8rolV1g==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YsC4c73vgz6tw2;
 Mon, 10 Feb 2025 18:58:56 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: "N. Jackson" <njackson@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <871pw6fzti.fsf@Phoenix>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
 <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@HIDDEN>
 <87pll1pofu.fsf@localhost> <86ldvp8qaz.fsf@HIDDEN>
 <87h66dpfeq.fsf@localhost> <878qrh1m59.fsf@localhost>
 <86zfjxxvvg.fsf@HIDDEN> <87y0zepvyz.fsf@Phoenix> <86a5bfw9yu.fsf@HIDDEN>
 <87r04qquc2.fsf@Phoenix> <87zfj1d1pv.fsf@localhost>
 <871pw6fzti.fsf@Phoenix>
Date: Mon, 10 Feb 2025 18:01:10 +0000
Message-ID: <87ldudvfvd.fsf@localhost>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: Eli Zaretskii <eliz@HIDDEN>, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

"N. Jackson" <njackson@HIDDEN> writes:

>> This is strange. Was it still "end of file while reading"?
>
> No.  Yes, it was exactly the same error message, but the actual
> message is this:
>
>   Warning (emacs): Emacs reader failed to read data in
>   "/home/nlj/.cache/org-persist/gc-lock.eld". The error was: "End of
>   file during parsing"
>
> It comes from the error handler for the condition-case in
> org-persist--read-elisp-file.
>
> (To be absolutely clear, the changes I applied to my Emacs are the
> ones I showed in my earlier post[1].  This only applies the atomic
> write part of your patches, not the "write index before writing
> cache data" part (which I didn't see how to easily integrate into
> the org-persist.el in Emacs 30).)

Very strange.
How can it be if we do atomic writes?

Maybe try to install the attached diff that will also display the
contents of the file as an additional warning.
Maybe it can give us more clues.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=extra-warning.diff

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index a639699d93..58facc0b30 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -449,7 +449,9 @@ (defun org-persist--read-elisp-file (&optional buffer-or-file)
              (message "Emacs reader failed to read data in %S. The error was: %S"
                       buffer-or-file (error-message-string err))
            (warn "Emacs reader failed to read data in %S. The error was: %S"
-                 buffer-or-file (error-message-string err)))
+                 buffer-or-file (error-message-string err))
+           (warn "The problematic file contents is:\n-----\n%s\n------\n"
+                 (buffer-string)))
          nil)))))
 
 ;; FIXME: `pp' is very slow when writing even moderately large datasets

--=-=-=
Content-Type: text/plain


-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 9 Feb 2025 23:44:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 09 18:44:54 2025
Received: from localhost ([127.0.0.1]:46888 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1thGyr-00079a-Uw
	for submit <at> debbugs.gnu.org; Sun, 09 Feb 2025 18:44:54 -0500
Received: from mout01.posteo.de ([185.67.36.65]:51785)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1thGyp-00079L-E1
 for 75209 <at> debbugs.gnu.org; Sun, 09 Feb 2025 18:44:52 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 0F3DE240027
 for <75209 <at> debbugs.gnu.org>; Mon, 10 Feb 2025 00:44:43 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1739144684; bh=mI+xlK7t6NpsUh9/c/oIq9G8ETg/4uH2wPB7LAnXM9M=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=X0FkhviJRhs4qn9t1AC5XTDuo2o8eQDef7gO11TjKMost9tgAw3kXyRjXzYvNqbW2
 wXYWY2PA8dwgrZGUU3/SwHqQIv9lXIcMQxuehaFL3aLDmTrw4HF1t6udxZvFDb8YXm
 Fg5QcnjNnyOrN4h5w69WsqfaEYWx6ocQoQV2YlGyY/mI5tRX6I18elpw0gkGS6xCtE
 FfVUm+qB2VlB3M5wT0/ohgM6kmKx/qXH+XZQPmuSyDyz9UV3naJzxY/fCUnrQraga7
 9p03wFz3a79HhgacptsYcz6xsUvwRni+d01KbPwpErkGyQNXsrK2YyY0la6b+ut3Ti
 j7W7HBleKvSCg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Yrkp26q6gz6tm8;
 Mon, 10 Feb 2025 00:44:42 +0100 (CET)
From: "N. Jackson" <njackson@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <87zfj1d1pv.fsf@localhost> (Ihor Radchenko's message of "Tue, 04
 Feb 2025 18:06:04 +0000")
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
 <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@HIDDEN>
 <87pll1pofu.fsf@localhost> <86ldvp8qaz.fsf@HIDDEN>
 <87h66dpfeq.fsf@localhost> <878qrh1m59.fsf@localhost>
 <86zfjxxvvg.fsf@HIDDEN> <87y0zepvyz.fsf@Phoenix>
 <86a5bfw9yu.fsf@HIDDEN> <87r04qquc2.fsf@Phoenix>
 <87zfj1d1pv.fsf@localhost>
Date: Sun, 09 Feb 2025 23:44:41 +0000
Message-ID: <871pw6fzti.fsf@Phoenix>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -3.3 (---)
X-Debbugs-Envelope-To: 75209
Cc: Eli Zaretskii <eliz@HIDDEN>, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.3 (----)

At 18:06 +0000 on Tuesday 2025-02-04, Ihor Radchenko wrote:
>
> "N. Jackson" <njackson@HIDDEN> writes:
>
>> Yes.  Unfortunately I can report that when I woke my system from
>> suspend this morning I saw the bug -- after about eleven days.  So I
>> can say that the patch I showed above (that tests doing an atomic
>> write by renaming a temporary file) is not sufficient.
>
> This is strange. Was it still "end of file while reading"?

No.  Yes, it was exactly the same error message, but the actual
message is this:

  Warning (emacs): Emacs reader failed to read data in
  "/home/nlj/.cache/org-persist/gc-lock.eld". The error was: "End of
  file during parsing"

It comes from the error handler for the condition-case in
org-persist--read-elisp-file.

(To be absolutely clear, the changes I applied to my Emacs are the
ones I showed in my earlier post[1].  This only applies the atomic
write part of your patches, not the "write index before writing
cache data" part (which I didn't see how to easily integrate into
the org-persist.el in Emacs 30).)

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75209#80





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 4 Feb 2025 18:04:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 04 13:04:00 2025
Received: from localhost ([127.0.0.1]:46561 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tfNHE-0003BX-5R
	for submit <at> debbugs.gnu.org; Tue, 04 Feb 2025 13:04:00 -0500
Received: from mout02.posteo.de ([185.67.36.66]:55743)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1tfNHC-0003BI-63
 for 75209 <at> debbugs.gnu.org; Tue, 04 Feb 2025 13:03:58 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 43491240104
 for <75209 <at> debbugs.gnu.org>; Tue,  4 Feb 2025 19:03:51 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1738692231; bh=tlM72fOnqnz8f+sPv88PU7G9lOdtCIe20rhNaNJ7VZY=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=Z+XJTnCOHuXSEIIwpem4XX4XzIEb2BdgHsB32kNd0Nw2hM8UDIEunQ7k19S/fhNFD
 HqwJ32T7+NhJDz5qZnFZIulzXly7mejp5Gj1aYcp0+UFjAgH+astaTkjqmJokew4Ma
 ods+aD8c0hVjg98HdtxcaXNClbzPEa5qGFkdjYjU7HCrH0HTEDKuXCC7LZopvJ1VaT
 QdjnZCLWLqYQxSZ7D9j1CB/mHDzBDDtZmw5XfE0iMtEbt2BJdzU8/Rq5KAMFShMrZW
 7wJ0Pr/BbwQnkXoK+olKy42l9aYPTaKO9n9Pm38RAHvTwVMh9E9caKsUGm8PNemUfz
 gqyYLIeYGoF/Q==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YnWT21zV3z6tn4;
 Tue,  4 Feb 2025 19:03:50 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: "N. Jackson" <njackson@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <87r04qquc2.fsf@Phoenix>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
 <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@HIDDEN>
 <87pll1pofu.fsf@localhost> <86ldvp8qaz.fsf@HIDDEN>
 <87h66dpfeq.fsf@localhost> <878qrh1m59.fsf@localhost>
 <86zfjxxvvg.fsf@HIDDEN> <87y0zepvyz.fsf@Phoenix> <86a5bfw9yu.fsf@HIDDEN>
 <87r04qquc2.fsf@Phoenix>
Date: Tue, 04 Feb 2025 18:06:04 +0000
Message-ID: <87zfj1d1pv.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: Eli Zaretskii <eliz@HIDDEN>, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

"N. Jackson" <njackson@HIDDEN> writes:

> Yes.  Unfortunately I can report that when I woke my system from
> suspend this morning I saw the bug -- after about eleven days.  So I
> can say that the patch I showed above (that tests doing an atomic
> write by renaming a temporary file) is not sufficient.

This is strange. Was it still "end of file while reading"?

>> I recommend following https://orgmode.org/manual/Installation.html
>> In particular, the part about installing Org from git repository.
>
> If the presence of the bug were something that could be tested in a
> few minutes, I would be happy to test with Org mainline.  But the
> bug takes several days (or weeks) to manifest.  That would mean I
> would have to run the bleeding edge version of Org for my everyday
> tasks and I just wouldn't be comfortable not using a version that's
> been released and tested, because Org is critical to organising and
> scheduling everything in my world.

Well. I was hoping that e095d269e2 could improve the situation for
you. At least, it should reduce the frequency of the observed problem.

> Also, even if I did run Org mainline and after a suitable period of
> testing the bug seemed to be gone, where would that leave us in
> Emacs 30?

Emacs 30 will have to live with this bug. It is not critical, but the
fixes are not exactly trivial. And we do not usually install non-trivial
fixes onto release branch unless those fixes are against critical bugs.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 26 Jan 2025 07:02:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 02:02:38 2025
Received: from localhost ([127.0.0.1]:54037 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tbwfG-0004X5-Kf
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 02:02:38 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:43952)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tbwfD-0004Wl-Qu
 for 75209 <at> debbugs.gnu.org; Sun, 26 Jan 2025 02:02:36 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tbwf7-0002US-Lv; Sun, 26 Jan 2025 02:02:29 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=70JekeDlV56Gfpzwr+Wxj18x6Hk9QhZm4TUqgoZTqW0=; b=ZLXmCgE54Ckn
 GEEdTZMGU8w862aGPu1pmQtg1II3X+yA9ZUCjSFHLImIn60VHgPoeTQSyjU657W+fLxmZmZJn4Md8
 b8NNfTiCgsA1wuWvC6ubUZxqcyaQ1I7LVrpjMOkbL1pVOkYZLIfdtYhIn/fmqx+HPwamMNRVztMVY
 SEoaZVN1n8/ElVubAlROmxiKaInKepHo2Bk3WkWFrmo+1uPP1Bf0Wuda4V4AJIgFlzLBDANdx+4e5
 Ls9QnpAe9sie1ulD+cPgw08RIm2h4bL4HcmkxfeWXkj8LU74sCUuWMQpCemtZ79F1jVgf80ki6yE8
 v5CsfUo99Sy9bBmiN7VhyA==;
Date: Sun, 26 Jan 2025 09:02:28 +0200
Message-Id: <86frl6t5vf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: "N. Jackson" <njackson@HIDDEN>
In-Reply-To: <87cygaqmin.fsf@Phoenix> (njackson@HIDDEN)
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
References: <878qrxgg74.fsf@Phoenix> <87v7uxibl9.fsf@Phoenix>
 <878qrpbazd.fsf@Phoenix> <86pll16ut7.fsf@HIDDEN>
 <871pxgbvwy.fsf@Phoenix> <87cygaqmin.fsf@Phoenix>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: yantar92@HIDDEN, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: "N. Jackson" <njackson@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>, Ihor Radchenko <yantar92@HIDDEN>
> Date: Sun, 26 Jan 2025 03:31:12 +0000
> 
> The following is for completeness (with regards to bug#39824) and
> not directly relevant to the current bug.
> 
> At 19:58 -0500 on Sunday 2025-01-05, N. Jackson wrote:
> >
> > it says in bug#39824 that the broken timer moves farther into the
> > past, but here my broken timer is counting forward
> 
> I have to retract this assertion.  Further observations revealed
> that sometimes it seems the broken timer counts forwards in time and
> sometimes it jumps backwards by days.
> 
> This is because the information displayed by `list-timers' is bogus
> because it prepares the information using `format-seconds' which
> doesn't work properly for negative arguments (bug#75849 [1]).

I think this is a tangent here.  The problem in this bug is not caused
by timers, IMO.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 26 Jan 2025 03:31:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 25 22:31:26 2025
Received: from localhost ([127.0.0.1]:53583 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tbtMs-0001R5-0I
	for submit <at> debbugs.gnu.org; Sat, 25 Jan 2025 22:31:26 -0500
Received: from mout02.posteo.de ([185.67.36.66]:53839)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1tbtMo-0001Qm-Hb
 for 75209 <at> debbugs.gnu.org; Sat, 25 Jan 2025 22:31:23 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 59224240101
 for <75209 <at> debbugs.gnu.org>; Sun, 26 Jan 2025 04:31:16 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1737862276; bh=3pM4m3JJ8xx4cTMGTlr3ytSfjBJQAMV67hwGsCEiXdE=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=QvvaY+QGrnLYbTJLbkj6CNIJOrYezKII20D+sVRjp47gAusg0Knp/TPPcXj63R261
 fVLW0CLoq6Lf5GTT3K2TiVH8yAt973oDZoLoga9jRo1/n1vyn1IqkUtyv0Jznv4yFs
 nkORCo/aCQDkeQKDp6p8pAugA5ifs8AXR1+ivftd9O0jkz8BZMe0I4yAE3pISUGUrL
 f9Zt6NT6Dlwcyj1/SoY7t02788TbPAXWRc9xtmtIDLWaL1eHPA7gzsP9uR+KMU91sp
 EJf0oKuLTD7ZEAQv2H+SYqZM05FqQLhBETbkUJC1HX21P9MmmfT+APt2gX/6cS284O
 ZyCOeI4jnvw2w==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YgcXL1gslz9rxD;
 Sun, 26 Jan 2025 04:31:14 +0100 (CET)
From: "N. Jackson" <njackson@HIDDEN>
To: 75209 <at> debbugs.gnu.org
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <871pxgbvwy.fsf@Phoenix> (N. Jackson's message of "Mon, 06 Jan
 2025 00:58:21 +0000")
References: <878qrxgg74.fsf@Phoenix> <87v7uxibl9.fsf@Phoenix>
 <878qrpbazd.fsf@Phoenix> <86pll16ut7.fsf@HIDDEN>
 <871pxgbvwy.fsf@Phoenix>
Date: Sun, 26 Jan 2025 03:31:12 +0000
Message-ID: <87cygaqmin.fsf@Phoenix>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: Eli Zaretskii <eliz@HIDDEN>, Ihor Radchenko <yantar92@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

The following is for completeness (with regards to bug#39824) and
not directly relevant to the current bug.

At 19:58 -0500 on Sunday 2025-01-05, N. Jackson wrote:
>
> it says in bug#39824 that the broken timer moves farther into the
> past, but here my broken timer is counting forward

I have to retract this assertion.  Further observations revealed
that sometimes it seems the broken timer counts forwards in time and
sometimes it jumps backwards by days.

This is because the information displayed by `list-timers' is bogus
because it prepares the information using `format-seconds' which
doesn't work properly for negative arguments (bug#75849 [1]).

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75849





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 26 Jan 2025 00:42:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 25 19:42:36 2025
Received: from localhost ([127.0.0.1]:53224 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tbqjU-0000y5-6q
	for submit <at> debbugs.gnu.org; Sat, 25 Jan 2025 19:42:36 -0500
Received: from mout01.posteo.de ([185.67.36.65]:43879)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1tbqjQ-0000xn-Tj
 for 75209 <at> debbugs.gnu.org; Sat, 25 Jan 2025 19:42:34 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id E2C0F240027
 for <75209 <at> debbugs.gnu.org>; Sun, 26 Jan 2025 01:42:24 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1737852144; bh=2l+aPlKcc+jrc8Zym9tFNr5ASFbBHzOrg83loggvklU=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=dVDHgPB+UaAO9pivV8mUSqd9gR9HDyXMkTUpaqr8bCRQ2zB11QPmkTD+12iI1kf8r
 CcjLxVDaAe4QhTSRk2s61rFY5ZMG9L67OEnAEriw7+G2bhvHLASu7Tuz+XC5ZOOMdq
 x2Vt4Ss/qGGgkGOvyDh6FZqfWOpH1nNwmnMwo9Xa6PkzgHMa9K4YQOwzc+RFTYQXE0
 0VmzbXMWHjuh7v746ls1LPX2eV7qszlASV8L1PjK3SP/nx3y9WS3anQNls14onn83r
 hBPkK7YrPch79vpRW4oyLXOQWhoy7BZxd/kRY4ze7RJfQjFeokQLtx8+dXRHRh6hvW
 bEqeKQvIeSabg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YgXnW1TNCz6v0F;
 Sun, 26 Jan 2025 01:42:22 +0100 (CET)
From: "N. Jackson" <njackson@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Ihor Radchenko <yantar92@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <86a5bfw9yu.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 25 Jan
 2025 10:53:29 +0200")
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
 <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@HIDDEN>
 <87pll1pofu.fsf@localhost> <86ldvp8qaz.fsf@HIDDEN>
 <87h66dpfeq.fsf@localhost> <878qrh1m59.fsf@localhost>
 <86zfjxxvvg.fsf@HIDDEN> <87y0zepvyz.fsf@Phoenix>
 <86a5bfw9yu.fsf@HIDDEN>
Date: Sun, 26 Jan 2025 00:42:21 +0000
Message-ID: <87r04qquc2.fsf@Phoenix>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

At 10:53 +0200 on Saturday 2025-01-25, Eli Zaretskii wrote:
>
> Ping!  Any progress with this issue?  Any new data?
>
>> From: "N. Jackson" <njackson@HIDDEN>
>> Cc: Ihor Radchenko <yantar92@HIDDEN>,  75209 <at> debbugs.gnu.org
>> Date: Mon, 13 Jan 2025 15:36:04 +0000
>> 
>> This is the change I have made here for testing:
>> 
>> --- Emacs-30.0.93/org-persist.el	2024-12-18 17:30:29.000000000 -0500
>> +++ atomic_write/org-persist.el	2025-01-12 18:58:58.230823402 -0500
>> @@ -475,7 +475,8 @@
>>          (print-escape-nonascii t)
>>          (print-continuous-numbering t)
>>          print-number-table
>> -        (start-time (float-time)))
>> +        (start-time (float-time))
>> +        (tmp-file (make-temp-file "org-persist-")))
>>      (unless (file-exists-p (file-name-directory file))
>>        (make-directory (file-name-directory file) t))
>>      ;; Force writing even when the file happens to be opened by
>> @@ -483,12 +484,19 @@
>>      (cl-letf (((symbol-function #'ask-user-about-lock)
>>                 ;; FIXME: Emacs 27 does not yet have `always'.
>>                 (lambda (&rest _) t)))
>> -      (with-temp-file file
>> +      ;; Do not write to FILE directly.  Another Emacs instance may be
>> +      ;; doing the same at the same time.  Instead, write to new
>> +      ;; temporary file and then rename it (renaming is atomic
>> +      ;; operation that does not create data races).
>> +      ;; See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75209#35
>> +      (with-temp-file tmp-file
>>          (insert ";;   -*- mode: lisp-data; -*-\n")
>>          (if pp
>>              (let ((pp-use-max-width nil)) ; Emacs bug#58687
>>                (pp data (current-buffer)))
>> -          (prin1 data (current-buffer)))))
>> +          (prin1 data (current-buffer))))
>> +      (rename-file tmp-file file 'overwrite))
>> +    
>>      (org-persist--display-time
>>       (- (float-time) start-time)
>>       "Writing to %S" file)))

Hello Eli,

Yes.  Unfortunately I can report that when I woke my system from
suspend this morning I saw the bug -- after about eleven days.  So I
can say that the patch I showed above (that tests doing an atomic
write by renaming a temporary file) is not sufficient.

I'm not sure where to go from here.

[I have now advised the org-persist--refresh-gc-lock timer handler
to log (each time the timer is called and in separate log files,
one for each instance of Emacs) the exact time, the state of the
timer, and whether the handler returned cleanly.  Maybe this will
shed some more light on what is happening -- or at least suggest a
way to trigger the bug more quickly.]

At 17:27 +0000 on Monday 2025-01-13, Ihor Radchenko wrote:
>
> I recommend following https://orgmode.org/manual/Installation.html
> In particular, the part about installing Org from git repository.

If the presence of the bug were something that could be tested in a
few minutes, I would be happy to test with Org mainline.  But the
bug takes several days (or weeks) to manifest.  That would mean I
would have to run the bleeding edge version of Org for my everyday
tasks and I just wouldn't be comfortable not using a version that's
been released and tested, because Org is critical to organising and
scheduling everything in my world.

Also, even if I did run Org mainline and after a suitable period of
testing the bug seemed to be gone, where would that leave us in
Emacs 30?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 25 Jan 2025 08:53:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 25 03:53:40 2025
Received: from localhost ([127.0.0.1]:48408 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tbbvA-0004i3-1S
	for submit <at> debbugs.gnu.org; Sat, 25 Jan 2025 03:53:40 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:36496)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tbbv7-0004hm-NR
 for 75209 <at> debbugs.gnu.org; Sat, 25 Jan 2025 03:53:38 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tbbv1-0003OC-Fm; Sat, 25 Jan 2025 03:53:31 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=p1Pwm2cFZq7Tg8tZyDzAW9YZSoIVXVIp7W9S9HBSWoY=; b=OVfTZMc7/HR0
 spV73xAYNy81PshDCjJ5RfFlfjh0b91wgj+bSDo8N3TjvwFwp3Uu9rwPmk1QgWpKcwKWKeDt+WhSb
 xsMLrtiG2JjcwjFnijRgc/gNMmCdLOQTxa+JceE2o+yF6GD96RXhlCEW5LhcNNtUHcNItGEbw3swn
 8VPQiNteBcRSQVLk/b3sErcVIcveiMbvB4k44SkUT4slD2tIUowWCCx2eoGD+aJE9/HP5bswYEX9q
 zd2VF4bQpMQEHlo1ToIqkr2E3L3mVsmx+nVwSgcrqys7KFgEDoVDRe7DlF7jheqjWuLq2diZMMVMc
 kyFfER++QxUxQuGXF4A3qQ==;
Date: Sat, 25 Jan 2025 10:53:29 +0200
Message-Id: <86a5bfw9yu.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: "N. Jackson" <njackson@HIDDEN>
In-Reply-To: <87y0zepvyz.fsf@Phoenix> (njackson@HIDDEN)
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
 <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@HIDDEN>
 <87pll1pofu.fsf@localhost> <86ldvp8qaz.fsf@HIDDEN>
 <87h66dpfeq.fsf@localhost> <878qrh1m59.fsf@localhost>
 <86zfjxxvvg.fsf@HIDDEN> <87y0zepvyz.fsf@Phoenix>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: yantar92@HIDDEN, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ping!  Any progress with this issue?  Any new data?

> From: "N. Jackson" <njackson@HIDDEN>
> Cc: Ihor Radchenko <yantar92@HIDDEN>,  75209 <at> debbugs.gnu.org
> Date: Mon, 13 Jan 2025 15:36:04 +0000
> 
> 
> At 16:34 +0200 on Saturday 2025-01-11, Eli Zaretskii wrote:
> >
> >> From: Ihor Radchenko <yantar92@HIDDEN>
> >> Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
> >> Date: Sat, 11 Jan 2025 14:05:22 +0000
> >> 
> >> Ihor Radchenko <yantar92@HIDDEN> writes:
> >> 
> >> Done on Org main.
> >> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7999433067
> >> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2a620113c1
> >> 
> >> I will not risk bugfix.
> >> 
> >> Hopefully, the bug is resolved now.
> >
> > Thanks, I hope the OP will be able to install the changes locally
> 
> I will do my best to do that.
> 
> The commits are against the Org "Main" branch whereas I'm running
> Emacs 30.0.93 which I where I see the warnings, and the diffs don't
> apply against this version of org-persist.el.
> 
> For example, in org-persist--write-elisp-file in Emacs 30.0.93 (at
> line 481 or org-persist.el) -- in the thick of where these changes
> are happening -- we have this horror:
> 
>     ;; Force writing even when the file happens to be opened by
>     ;; another Emacs process.
>     (cl-letf (((symbol-function #'ask-user-about-lock)
>                ;; FIXME: Emacs 27 does not yet have `always'.
>                (lambda (&rest _) t)))
> 
> This (thank goodness) had disappeared from the Org "Main" branch
> before Ihor's two commits above.
> 
> 
> IIUC Ihor's two commits make two independent fixes.
> 
> One fix (comprising all four changes in the first commit, and one of
> the changes in the second commit) is to "Write index before writing
> cache data.  This makes sure that index and data are always in
> sync."
> 
> The other fix (comprising two of the three changes in the second
> commit), is to ensure an atomic write by writing to a temp file and
> then moving that into place.
> 
> I have insufficient knowledge of Elisp and no understanding, at all
> really, of org-persist, so I am not able to attempt to make the
> first fix here, and I'm not sure that it would make sense to even
> try to do so.
> 
> The latter fix is simple and easy to think about so I have applied
> those changes to my local version of the Emacs 30.0.93 org-persist
> (patch below).  It seems quite plausible that this change (alone)
> will fix the problem of the warnings in this bug report and the
> broken timer.
> 
> > and verify them.
> 
> Verifying that any change resolves this bug is a bit tricky as it
> involves waiting for nothing to happen!  That is, if the warning
> reappears I'll be able to say that this change (alone) does not
> (by itself) resolve the problem, but if the warning doesn't reappear
> in a day, a week, a month, I won't be able to say that it never
> will reappear.
> 
> Anyway, I will run with this change and I will wait and see what
> happens.  If the problem is not solved, I wouldn't expect it to show
> itself for several days, given its usual frequency.  I'll try to
> put my machine into suspend for over an hour (so the timers fire
> "simultaneously" on resume) as often as possible to hurry things
> along.  I'll report back if the problem is not solved.
> 
> 
> This is the change I have made here for testing:
> 
> --- Emacs-30.0.93/org-persist.el	2024-12-18 17:30:29.000000000 -0500
> +++ atomic_write/org-persist.el	2025-01-12 18:58:58.230823402 -0500
> @@ -475,7 +475,8 @@
>          (print-escape-nonascii t)
>          (print-continuous-numbering t)
>          print-number-table
> -        (start-time (float-time)))
> +        (start-time (float-time))
> +        (tmp-file (make-temp-file "org-persist-")))
>      (unless (file-exists-p (file-name-directory file))
>        (make-directory (file-name-directory file) t))
>      ;; Force writing even when the file happens to be opened by
> @@ -483,12 +484,19 @@
>      (cl-letf (((symbol-function #'ask-user-about-lock)
>                 ;; FIXME: Emacs 27 does not yet have `always'.
>                 (lambda (&rest _) t)))
> -      (with-temp-file file
> +      ;; Do not write to FILE directly.  Another Emacs instance may be
> +      ;; doing the same at the same time.  Instead, write to new
> +      ;; temporary file and then rename it (renaming is atomic
> +      ;; operation that does not create data races).
> +      ;; See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75209#35
> +      (with-temp-file tmp-file
>          (insert ";;   -*- mode: lisp-data; -*-\n")
>          (if pp
>              (let ((pp-use-max-width nil)) ; Emacs bug#58687
>                (pp data (current-buffer)))
> -          (prin1 data (current-buffer)))))
> +          (prin1 data (current-buffer))))
> +      (rename-file tmp-file file 'overwrite))
> +    
>      (org-persist--display-time
>       (- (float-time) start-time)
>       "Writing to %S" file)))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 13 Jan 2025 17:25:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 13 12:25:51 2025
Received: from localhost ([127.0.0.1]:52726 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tXOCF-0001D9-6F
	for submit <at> debbugs.gnu.org; Mon, 13 Jan 2025 12:25:51 -0500
Received: from mout01.posteo.de ([185.67.36.65]:52307)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1tXOCC-0001Cu-Sm
 for 75209 <at> debbugs.gnu.org; Mon, 13 Jan 2025 12:25:49 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id B865D240028
 for <75209 <at> debbugs.gnu.org>; Mon, 13 Jan 2025 18:25:42 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1736789142; bh=4CNtW2bmRFf80baXl3IXkMyEXyISusWfN+nhPY7WdXw=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=WeqUCjxWSEf+s9Mr3KTACeHh53khfD98bqsH/XIm3aCFAsUur/7JCeEudIZrtCuQb
 uiYeKZb3AdfzJFBb2KUn+fIeW+XZoR608BbuUE5GHEiXJ9Zr5AlhFp2ZZKo0lWh6iV
 l1qsH9WO45hyQbMyYStl/sWatJe+zYWnAJUjR9J0+ySQ39YeuB3/QxDd1tPRdTPOb7
 ZKSMjoE9m5kMw9yiWJIWdD9HpUp/4GTWGRYvxKLPqtWl2dC3yWPPrwitzrcdU3nv1W
 cTgcr/i1ZSxlj5ocCeKT8C2P19w80I5omPuWzxHW6O2DT4d+QiPglLg4ttjDPRGoE4
 IALgX5fVqIPmg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YWzg83xjkz6tyr;
 Mon, 13 Jan 2025 18:25:40 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: "N. Jackson" <njackson@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <87y0zepvyz.fsf@Phoenix>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
 <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@HIDDEN>
 <87pll1pofu.fsf@localhost> <86ldvp8qaz.fsf@HIDDEN>
 <87h66dpfeq.fsf@localhost> <878qrh1m59.fsf@localhost>
 <86zfjxxvvg.fsf@HIDDEN> <87y0zepvyz.fsf@Phoenix>
Date: Mon, 13 Jan 2025 17:27:58 +0000
Message-ID: <87r0567hep.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: Eli Zaretskii <eliz@HIDDEN>, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

"N. Jackson" <njackson@HIDDEN> writes:

>>> Hopefully, the bug is resolved now.
>>
>> Thanks, I hope the OP will be able to install the changes locally
>
> I will do my best to do that.
>
> The commits are against the Org "Main" branch whereas I'm running
> Emacs 30.0.93 which I where I see the warnings, and the diffs don't
> apply against this version of org-persist.el.
> ...

I recommend following https://orgmode.org/manual/Installation.html
In particular, the part about installing Org from git repository.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 13 Jan 2025 15:36:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 13 10:36:17 2025
Received: from localhost ([127.0.0.1]:52523 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tXMUC-0001bQ-Je
	for submit <at> debbugs.gnu.org; Mon, 13 Jan 2025 10:36:17 -0500
Received: from mout01.posteo.de ([185.67.36.65]:38725)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1tXMUA-0001bB-B1
 for 75209 <at> debbugs.gnu.org; Mon, 13 Jan 2025 10:36:15 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 5AD0D240027
 for <75209 <at> debbugs.gnu.org>; Mon, 13 Jan 2025 16:36:07 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1736782568; bh=26+HqT2AZZ9D61/f32NRN/l4lGu9HQYixJpj0TvzMgc=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=g+hmewFndeD6f1VuQ4bYPYNhnEpCE2Vc2GGX/yxag6+Xfv9iMEKHVYkOzAEhU5aqI
 84gEhlZuLR5UZf4KuNZWm1848ijspVT/FYEVz/j7mNFun9iOA7NYsv/ayor054hmQo
 4s+hTKT+LQbUUuXFaQD7M0XfWNWnrZwowTZIAgvK/Jktxr5UehSD3onaJzBovdNHTd
 3aZ3P5ojB7sbAq2N+pKKh3qUXtBoH24TapsUa8WMm5wKLZeWpz6Ml7ldTInEF2jTi3
 W3JEndTFtaRVQTck6uLAB7Amor0Lxt3SRKcn3kjwLiJ2Db2p09fDpUaDcU3GvpJkyX
 3nYqpMvtWbxmw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YWxDk1DGVz6tsf;
 Mon, 13 Jan 2025 16:36:05 +0100 (CET)
From: "N. Jackson" <njackson@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <86zfjxxvvg.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 11 Jan
 2025 16:34:11 +0200")
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
 <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@HIDDEN>
 <87pll1pofu.fsf@localhost> <86ldvp8qaz.fsf@HIDDEN>
 <87h66dpfeq.fsf@localhost> <878qrh1m59.fsf@localhost>
 <86zfjxxvvg.fsf@HIDDEN>
Date: Mon, 13 Jan 2025 15:36:04 +0000
Message-ID: <87y0zepvyz.fsf@Phoenix>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: Ihor Radchenko <yantar92@HIDDEN>, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

At 16:34 +0200 on Saturday 2025-01-11, Eli Zaretskii wrote:
>
>> From: Ihor Radchenko <yantar92@HIDDEN>
>> Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
>> Date: Sat, 11 Jan 2025 14:05:22 +0000
>> 
>> Ihor Radchenko <yantar92@HIDDEN> writes:
>> 
>> Done on Org main.
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7999433067
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2a620113c1
>> 
>> I will not risk bugfix.
>> 
>> Hopefully, the bug is resolved now.
>
> Thanks, I hope the OP will be able to install the changes locally

I will do my best to do that.

The commits are against the Org "Main" branch whereas I'm running
Emacs 30.0.93 which I where I see the warnings, and the diffs don't
apply against this version of org-persist.el.

For example, in org-persist--write-elisp-file in Emacs 30.0.93 (at
line 481 or org-persist.el) -- in the thick of where these changes
are happening -- we have this horror:

    ;; Force writing even when the file happens to be opened by
    ;; another Emacs process.
    (cl-letf (((symbol-function #'ask-user-about-lock)
               ;; FIXME: Emacs 27 does not yet have `always'.
               (lambda (&rest _) t)))

This (thank goodness) had disappeared from the Org "Main" branch
before Ihor's two commits above.


IIUC Ihor's two commits make two independent fixes.

One fix (comprising all four changes in the first commit, and one of
the changes in the second commit) is to "Write index before writing
cache data.  This makes sure that index and data are always in
sync."

The other fix (comprising two of the three changes in the second
commit), is to ensure an atomic write by writing to a temp file and
then moving that into place.

I have insufficient knowledge of Elisp and no understanding, at all
really, of org-persist, so I am not able to attempt to make the
first fix here, and I'm not sure that it would make sense to even
try to do so.

The latter fix is simple and easy to think about so I have applied
those changes to my local version of the Emacs 30.0.93 org-persist
(patch below).  It seems quite plausible that this change (alone)
will fix the problem of the warnings in this bug report and the
broken timer.

> and verify them.

Verifying that any change resolves this bug is a bit tricky as it
involves waiting for nothing to happen!  That is, if the warning
reappears I'll be able to say that this change (alone) does not
(by itself) resolve the problem, but if the warning doesn't reappear
in a day, a week, a month, I won't be able to say that it never
will reappear.

Anyway, I will run with this change and I will wait and see what
happens.  If the problem is not solved, I wouldn't expect it to show
itself for several days, given its usual frequency.  I'll try to
put my machine into suspend for over an hour (so the timers fire
"simultaneously" on resume) as often as possible to hurry things
along.  I'll report back if the problem is not solved.


This is the change I have made here for testing:


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=org-persist-atomic-write.diff
Content-Description: This is the change I have made here for testing

--- Emacs-30.0.93/org-persist.el	2024-12-18 17:30:29.000000000 -0500
+++ atomic_write/org-persist.el	2025-01-12 18:58:58.230823402 -0500
@@ -475,7 +475,8 @@
         (print-escape-nonascii t)
         (print-continuous-numbering t)
         print-number-table
-        (start-time (float-time)))
+        (start-time (float-time))
+        (tmp-file (make-temp-file "org-persist-")))
     (unless (file-exists-p (file-name-directory file))
       (make-directory (file-name-directory file) t))
     ;; Force writing even when the file happens to be opened by
@@ -483,12 +484,19 @@
     (cl-letf (((symbol-function #'ask-user-about-lock)
                ;; FIXME: Emacs 27 does not yet have `always'.
                (lambda (&rest _) t)))
-      (with-temp-file file
+      ;; Do not write to FILE directly.  Another Emacs instance may be
+      ;; doing the same at the same time.  Instead, write to new
+      ;; temporary file and then rename it (renaming is atomic
+      ;; operation that does not create data races).
+      ;; See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75209#35
+      (with-temp-file tmp-file
         (insert ";;   -*- mode: lisp-data; -*-\n")
         (if pp
             (let ((pp-use-max-width nil)) ; Emacs bug#58687
               (pp data (current-buffer)))
-          (prin1 data (current-buffer)))))
+          (prin1 data (current-buffer))))
+      (rename-file tmp-file file 'overwrite))
+    
     (org-persist--display-time
      (- (float-time) start-time)
      "Writing to %S" file)))

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 11 Jan 2025 15:19:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 11 10:19:39 2025
Received: from localhost ([127.0.0.1]:44466 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tWdH0-0002IS-Rl
	for submit <at> debbugs.gnu.org; Sat, 11 Jan 2025 10:19:39 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18342)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1tWdGy-0002I6-VE
 for 75209 <at> debbugs.gnu.org; Sat, 11 Jan 2025 10:19:37 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 33EE6441467;
 Sat, 11 Jan 2025 10:19:31 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1736608765;
 bh=9PpFYJ6Z8uQMz166g6gqihGcyG/+S3XO/IAVbDztOvQ=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=GywgoO6mQy4U+Cx5K6x/VH6YZRl6OWHFv8ZePye+c0IoZ3j7Au7Ua0LtoFcwoi7nS
 gcuHyvXNNy+yRk6VSkYV3NgNS5oQXzazvV+ILI+COwkoQ6kwPsMAmlbs2R14MJF6OV
 mr+Jdf0nJX4unGgxNUx2sQjyRZyl8Iwi2sMCgmB7xyqZF3d2WnCXRM7fnLahcfaAtM
 o/bKKnv1GNuXjc+KxZDlg3ld4gX2HI/kG2m58cByuAAHjr8xwuOB/rkZ3cYwa6o/64
 WuVqwPQmVqK/2Y8MO/NvQYJgIDYOJruZRL7PonR59jkiaVDBk7ETC97uPeRFOXZrYm
 /Dq+gwG08uIow==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E6698441441;
 Sat, 11 Jan 2025 10:19:25 -0500 (EST)
Received: from pastel (104-195-232-86.cpe.teksavvy.com [104.195.232.86])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id AD8C2120480;
 Sat, 11 Jan 2025 10:19:25 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <864j2lnf1j.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 30 Dec
 2024 21:31:36 +0200")
Message-ID: <jwvmsfx5qja.fsf-monnier+emacs@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
Date: Sat, 11 Jan 2025 10:19:25 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/x-markdown; charset=UTF-8
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.010 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: Ihor Radchenko <yantar92@HIDDEN>, 75209 <at> debbugs.gnu.org,
 "N. Jackson" <njackson@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>>   Warning (emacs): Emacs reader failed to read data in
>>   "/home/nlj/.cache/org-persist/gc-lock.eld". The error was: "End of
>>   file during parsing"
>> 
>> The `gc-lock' part suggests this might have something to do with
>> garbage collection, whereas `org-persist' suggests Org mode, but
>> I could find nothing in the Org manual about org-persist or about
>> gc-lock.
>
> Does the file exist?  If so, what is its content (assuming you can
> post it here)?

FWIW, I've seen such errors enough times that I changed the code:

    @@ -444,8 +443,9 @@ org-persist--read-elisp-file
              (if (string-match-p "Invalid read syntax" (error-message-string err))
                  (message "Emacs reader failed to read data in %S. The error was: %S"
                           buffer-or-file (error-message-string err))
    -           (warn "Emacs reader failed to read data in %S. The error was: %S"
    -                 buffer-or-file (error-message-string err)))
    +           (warn "Emacs reader failed to read data in %S. The error was: %S\nFrom startpos %S in text (at %s):\n%S"
    +                 buffer-or-file (error-message-string err)
    +                 startpos (format-time-string "%F %T") (buffer-string)))
              nil)))))
     
     ;; FIXME: `pp' is very slow when writing even moderately large datasets

[ The "time" part is because it seems to happen mostly while I'm not
  using Emacs.  ]

The `buffer-string` is always empty in that error message, for me.
Maybe it's because the file doesn't exist, I have not investigated that far.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 11 Jan 2025 14:34:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 11 09:34:33 2025
Received: from localhost ([127.0.0.1]:41859 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tWcZN-0007Wo-54
	for submit <at> debbugs.gnu.org; Sat, 11 Jan 2025 09:34:33 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:51192)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tWcZK-0007WP-Oy
 for 75209 <at> debbugs.gnu.org; Sat, 11 Jan 2025 09:34:31 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tWcZF-0004NN-AF; Sat, 11 Jan 2025 09:34:25 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=9QjRkKSO3GQShTq/UV28ibVBzQa6zy0uAa9EhCs3+C4=; b=sFvzD1iXzrcp
 vM6FJA55xkze08e1DNalvWcKg1qk6KNtFEu453KESt7TLaU03d4Nch2RnPRsYhFLYfmNEyAYNKTDx
 tl5b7pccZZQ/RwM7NwytLXHP7j0lJjgDFa4Wpq3+utr4KEJ2gu4a8IKlRL4YoBEZaBctGNcFNxDAY
 9Oq9DL1SfkOQr1EA+o2jZzvjqopSvF2zaf90kux2Fzhtjzihv+3T/7qDqIxUKrSuIuNiXl71m8ZJc
 tRZVaEdWAxTHhmbS37Tj16JlmS5QsHRfd9MmhWrcHTMgU35k3JxX50ETO5eO5+cD+PzGoXqV8wC9F
 QSguzlTuUEWc5pRDBDrJhA==;
Date: Sat, 11 Jan 2025 16:34:11 +0200
Message-Id: <86zfjxxvvg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <878qrh1m59.fsf@localhost> (message from Ihor Radchenko on Sat,
 11 Jan 2025 14:05:22 +0000)
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
 <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@HIDDEN>
 <87pll1pofu.fsf@localhost> <86ldvp8qaz.fsf@HIDDEN>
 <87h66dpfeq.fsf@localhost> <878qrh1m59.fsf@localhost>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ihor Radchenko <yantar92@HIDDEN>
> Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
> Date: Sat, 11 Jan 2025 14:05:22 +0000
> 
> Ihor Radchenko <yantar92@HIDDEN> writes:
> 
> >> Writing to a file is not atomic.  If you instead write to a temporary
> >> file, then rename it to the final file name, the renaming is atomic on
> >> Posix filesystems.
> >>
> >> This would mean you can still use with-temp-file, but with a temporary
> >> file name as its argument, and you need to add a single rename-file
> >> call afterwards.
> >
> > That's fine. I just thought that there is some existing function doing
> > exactly this. If not, I can do it manually, of course.
> 
> Done on Org main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7999433067
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2a620113c1
> 
> I will not risk bugfix.
> 
> Hopefully, the bug is resolved now.

Thanks, I hope the OP will be able to install the changes locally and
verify them.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 11 Jan 2025 14:03:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 11 09:03:14 2025
Received: from localhost ([127.0.0.1]:41812 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tWc53-0005rU-Mx
	for submit <at> debbugs.gnu.org; Sat, 11 Jan 2025 09:03:14 -0500
Received: from mout02.posteo.de ([185.67.36.66]:55869)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1tWc50-0005rF-SR
 for 75209 <at> debbugs.gnu.org; Sat, 11 Jan 2025 09:03:12 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 67100240101
 for <75209 <at> debbugs.gnu.org>; Sat, 11 Jan 2025 15:03:03 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1736604184; bh=PNpr2E9TuR2xrSxjdqNmBLGDgR0uniKfuZ9QoNGtnBU=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=C0kMiCgrAqdAurnMnPwfCD0MV6ufH2DNgI7wnoTojrrEv6HD+fIMB37AXieVs9LZq
 8cNCzEF/qMsSGk+9bpVOw89jRlYTvcvgiygdqxUf1QyB3Ey+6lqYJIdKXws2e7Ukhb
 ECIWaH9138vF6yBEbTSLSF6tS6B3ZEuCWir4IavHtUAJaR/5uEJmP6WL/CX3qP00Y8
 jmyjpLSeevOoMV6t3I/3ZuITJmhde2MLMWAhvNcMkEBq8HPaOI79eFNYL5M5+yH2aO
 hoY5xUs+6PChWFlDJOzp16dy3MLM4zD5MUsoA854Z6FUnVMDtSfHZAqk/raRBednOR
 j95R2TdsTwcsQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YVgGG5xzxz6twQ;
 Sat, 11 Jan 2025 15:03:02 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <87h66dpfeq.fsf@localhost>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
 <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@HIDDEN>
 <87pll1pofu.fsf@localhost> <86ldvp8qaz.fsf@HIDDEN>
 <87h66dpfeq.fsf@localhost>
Date: Sat, 11 Jan 2025 14:05:22 +0000
Message-ID: <878qrh1m59.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ihor Radchenko <yantar92@HIDDEN> writes:

>> Writing to a file is not atomic.  If you instead write to a temporary
>> file, then rename it to the final file name, the renaming is atomic on
>> Posix filesystems.
>>
>> This would mean you can still use with-temp-file, but with a temporary
>> file name as its argument, and you need to add a single rename-file
>> call afterwards.
>
> That's fine. I just thought that there is some existing function doing
> exactly this. If not, I can do it manually, of course.

Done on Org main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7999433067
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2a620113c1

I will not risk bugfix.

Hopefully, the bug is resolved now.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 6 Jan 2025 13:49:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 06 08:49:52 2025
Received: from localhost ([127.0.0.1]:37339 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tUnUN-0005Au-Hx
	for submit <at> debbugs.gnu.org; Mon, 06 Jan 2025 08:49:51 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:35330)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tUnUJ-0005Ac-OO
 for 75209 <at> debbugs.gnu.org; Mon, 06 Jan 2025 08:49:49 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tUnUE-0002zq-Bu; Mon, 06 Jan 2025 08:49:42 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=A2yPEpUl54a4ZisB/ZE2f3ikkBwWZ+umnZUVrnnRUkc=; b=DZl+zwwg5X9w
 +EfapyvDruVuuh0tUnYcX0G/PDuAnezuULLr4IscPviK5tnqCWa0FxW713/oXAx78CWPm42ry1uZn
 CtCsm/b/UKzGqYT1vStYrXFL4qv14JC1bTBtmpuWiB6/cuE9r5GnQruHGro0fnSWXG+qqUnKLlZR0
 o6IwOoRTuabTn7VDlNL4wV1xKiOwFQ1YembT0cd4Adx+II0PiHFIEgcXPbqXemiRDygGuRUTBF37A
 cZzm8oTnYZzcJP5q213hZEVS5uvMFNHRmqGkssP3CWDxW2FmGGU5XIUTm02slGOupdxPiz+TdUpRy
 SUW83NY2cMQ2fXyOkpg6gA==;
Date: Mon, 06 Jan 2025 15:49:37 +0200
Message-Id: <86r05g59xq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: "N. Jackson" <njackson@HIDDEN>
In-Reply-To: <871pxgbvwy.fsf@Phoenix> (njackson@HIDDEN)
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
References: <878qrxgg74.fsf@Phoenix> <87v7uxibl9.fsf@Phoenix>
 <878qrpbazd.fsf@Phoenix> <86pll16ut7.fsf@HIDDEN> <871pxgbvwy.fsf@Phoenix>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: yantar92@HIDDEN, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: "N. Jackson" <njackson@HIDDEN>
> Cc: 75209 <at> debbugs.gnu.org,  yantar92@HIDDEN
> Date: Mon, 06 Jan 2025 00:58:21 +0000
> 
> I'm guessing (wildly) that what happened is this:
> 
> 1.  I woke my system from suspend.
> 
> 2.  All timers in both my instances of Emacs ran roughly
>     simultaneously.
> 
> 3.  Org Mode's locking mechanisms are not working properly when two
>     copies of org-persist--refresh-gc-lock run at essentially the 
>     same time, and it failed in one instance of Emacs.
> 
> 4.  Org Mode (or something else) caught the failure and reported
> 
>       Warning (emacs): Emacs reader failed to read data in
>       "/home/nlj/.cache/org-persist/gc-lock.eld". The error was:
>       "End of file during parsing"
> 
>     and the running of the timer was aborted, leaving it in a broken
>     state.
> 
> I think this wild conjecture would explain why sometimes (but by no
> means always) I see this warning when I resume from suspend; why I
> rarely see the warning at other times; and why sometimes I see the
> warning in my regular Emacs session and sometimes in the instance in
> which I'm running Gnus.

I think you are right.  I think the mechanisms involved in this
scenario should be audited to find possible problems and solutions.
For example, if the timer function could signal an error, it should
catch the error and handle it instead of leading to the timer being
disabled.

> [1] I don't understand why bug#39824 was closed as Not A Bug when
> the mystery of how the timers got in an incoherent state wasn't
> fully clarified.

Because the data for investigating it was not available.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 6 Jan 2025 00:58:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 05 19:58:35 2025
Received: from localhost ([127.0.0.1]:36002 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tUbRy-0007vd-QO
	for submit <at> debbugs.gnu.org; Sun, 05 Jan 2025 19:58:35 -0500
Received: from mout02.posteo.de ([185.67.36.66]:48961)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1tUbRu-0007vK-I6
 for 75209 <at> debbugs.gnu.org; Sun, 05 Jan 2025 19:58:32 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id E5837240101
 for <75209 <at> debbugs.gnu.org>; Mon,  6 Jan 2025 01:58:23 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1736125103; bh=pLJa6+4O8pvChBralfIxLvQ/7CXtLQZa6imnFBrf15k=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=Qhb9CQDhxNxHA++8ygDDXngs3brL2J5ReQ87qMA/9ZOGMJ+6NM34fUWcFS595ps64
 c4lIEy37v+aM5sCs1YJ03mAfq6VGVOqgK+f4pSH6S7R6EqPR0CKXGQRjD+sNKb2y9R
 ybVXqxtfz0DN7tLdJ3ZpzRnAFM3bHjWK4tUqAA7bOJ0zqzVhbl6V+mwBHHi9A38MQP
 GjSFmH2Rla6m4BKuyh8stwxrz0kFOXNIDM39AgTx7wz7HsmkQj9mJk4KYBzm+J7AkW
 W8wOQ/6tgdT3tY1PBiR4EzLpqYqUWOIxm5Rp5brZ2c9eSB2mVVu1CBYwofQD7VLYd8
 +c+lw49RGz5Iw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YRG5B3JKDz6tvc;
 Mon,  6 Jan 2025 01:58:22 +0100 (CET)
From: "N. Jackson" <njackson@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <86pll16ut7.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 05 Jan
 2025 19:21:08 +0200")
References: <878qrxgg74.fsf@Phoenix> <87v7uxibl9.fsf@Phoenix>
 <878qrpbazd.fsf@Phoenix> <86pll16ut7.fsf@HIDDEN>
Date: Mon, 06 Jan 2025 00:58:21 +0000
Message-ID: <871pxgbvwy.fsf@Phoenix>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: yantar92@HIDDEN, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

At 19:21 +0200 on Sunday 2025-01-05, Eli Zaretskii wrote:

>> From: "N. Jackson" <njackson@HIDDEN>
>> 
>> Running list-timers shows:
>> 
>> Idle                Next  Repeat Function
>>        -1d 15h 43m 30.2s      1h org-persist--refresh-gc-lock
>
> This timer is disabled.  See bug#39824 for some related discussions,
> in particular
>
>   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39824#53

I have now read that bug report and I admit I don't fully understand
it[1].

IIUC, the user's timer had encountered an error, a backtrace had
been produced, and the user had said `q' to the debugger, leaving
the timer in a broken state.

Here, like in that bug report, the broken timer has `t' in the first
element:

  [t 26490 7240 117604 3600 org-persist--refresh-gc-lock nil nil 17000 nil]

However, I have seen no error.  (If I were presented with a
backtrace, I would almost certainly make a copy of the buffer and
then hit `c' rather than `q', but in fact I haven't seen a backtrace
in a long time.  Indeed, debug-on-error is nil.  I have seen no
error messages in this run of Emacs and there are no errors (or
anything else unexpected in Messages).)

I'm guessing (wildly) that what happened is this:

1.  I woke my system from suspend.

2.  All timers in both my instances of Emacs ran roughly
    simultaneously.

3.  Org Mode's locking mechanisms are not working properly when two
    copies of org-persist--refresh-gc-lock run at essentially the 
    same time, and it failed in one instance of Emacs.

4.  Org Mode (or something else) caught the failure and reported

      Warning (emacs): Emacs reader failed to read data in
      "/home/nlj/.cache/org-persist/gc-lock.eld". The error was:
      "End of file during parsing"

    and the running of the timer was aborted, leaving it in a broken
    state.

I think this wild conjecture would explain why sometimes (but by no
means always) I see this warning when I resume from suspend; why I
rarely see the warning at other times; and why sometimes I see the
warning in my regular Emacs session and sometimes in the instance in
which I'm running Gnus.


(One other observation: IIUC, it says in bug#39824 that the broken
timer moves farther into the past, but here my broken timer is
counting forward (it is now due in negative 1 day and 5 hours) so
presumably in a day or so it will no longer be negative.  Will it
then start running again I wonder?  If this behaviour is expected,
perhaps it should be mentioned in the documentation.  It seems a bit
peculiar to me.)

[1] I don't understand why bug#39824 was closed as Not A Bug when
the mystery of how the timers got in an incoherent state wasn't
fully clarified.  (But maybe it was well understood and the
mechanism was too trivial to record.) [And I don't think, just
because a timer fails once, that one necessarily wants that timer
disabled (because the problem might be transient).  Also it seems to
me that if a timer is going to be disabled then that should be done
explicitly rather than as a side-effect of an abort.]  But that is
all irrelevant here.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 5 Jan 2025 17:21:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 05 12:21:23 2025
Received: from localhost ([127.0.0.1]:35001 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tUUJW-0006eX-JO
	for submit <at> debbugs.gnu.org; Sun, 05 Jan 2025 12:21:22 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:50620)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tUUJT-0006eG-5g
 for 75209 <at> debbugs.gnu.org; Sun, 05 Jan 2025 12:21:20 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tUUJL-0007MR-0y; Sun, 05 Jan 2025 12:21:11 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=C66ZlQIEbL0BItrnJKAHYyteffiDdIbzyJTDrf698lA=; b=MLb+4bgidAPY
 VgoQifHFy49tb7k6NAIFcoJ7/Nm0r+N0wxDRB2XIzDfxxyw5p7HaUFetuYbraL9jCE4l2mzACElxF
 x2LJt9/lkDAq09V4y9pGo0ztmC35DLs/3SVJrpQz8tS8LFcH0jNZGSDNFvKVQplZHsvLtiM7o+lpC
 IObenY0FauCIPYuuwhbzoUOwdIZjwpcee33kTvTAYaO1omgWoewalC5WGEMnoSyrjdHfU0yY+I6cD
 TSevMhszTzMzC5JXX5bMbQFc7VEEiwojwuMJUP2iEwOIr7nhYs/s6pCXQn2xY66cy2urxVc9m4ZxL
 bNElf9YXygiv2r24r+Xf9w==;
Date: Sun, 05 Jan 2025 19:21:08 +0200
Message-Id: <86pll16ut7.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: "N. Jackson" <njackson@HIDDEN>
In-Reply-To: <878qrpbazd.fsf@Phoenix> (njackson@HIDDEN)
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
References: <878qrxgg74.fsf@Phoenix> <87v7uxibl9.fsf@Phoenix>
 <878qrpbazd.fsf@Phoenix>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: yantar92@HIDDEN, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: "N. Jackson" <njackson@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  Ihor Radchenko <yantar92@HIDDEN>
> Date: Sun, 05 Jan 2025 14:18:14 +0000
> 
> The following might be "normal", in which case I apologise for the
> noise, but it seems odd to me and it might have some bearing on the
> bug.
> 
> Running list-timers shows:
> 
> Idle                Next  Repeat Function
>        -1d 15h 43m 30.2s      1h org-persist--refresh-gc-lock
>                2.4s           1m battery-update-handler
>                2.4s           5m savehist-autosave
>                4.2s            - undo-auto--boundary-timer
>               50.1s           1m display-time-event-handler
>    *           0.1s            t show-paren-function
>    *           0.5s            t #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_9>
>    *           0.5s      :repeat blink-cursor-start
>    *          30.0s            - desktop-auto-save
> 
> I see nothing in the manuals about what it means for a
> relative timer to be negative.  (Or is org-persist--refresh-gc-lock
> running on a timer set with an absolute time that list-timers is
> merely displaying as a relative time?)  And it seems odd that this
> time is before this Emacs session started (emacs-uptime shows 1 day,
> 1 hour, 16 minutes, 40 seconds).

This timer is disabled.  See bug#39824 for some related discussions,
in particular

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39824#53




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 5 Jan 2025 14:18:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 05 09:18:30 2025
Received: from localhost ([127.0.0.1]:60447 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tURSY-0005aN-8R
	for submit <at> debbugs.gnu.org; Sun, 05 Jan 2025 09:18:30 -0500
Received: from mout02.posteo.de ([185.67.36.66]:35647)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1tURSU-0005a5-UK
 for 75209 <at> debbugs.gnu.org; Sun, 05 Jan 2025 09:18:28 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 8784F240101
 for <75209 <at> debbugs.gnu.org>; Sun,  5 Jan 2025 15:18:18 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1736086699; bh=0X6b2zEPffgYZLoLhA01yg9vAuVJTYYAczvMqD9Kn9M=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=rm3XGPaQrZRijl49JoWxOj+sYtdjvvNW1qHgdgOkuJkiFpd36bGIdaxtw7D+bXZ50
 +4jx7U5goGzoK8Qud19nh007chz6/UMv/qldDj9cLhrHIGUokTFqXaJ2aUCg74yw1W
 uoWc3bdghuG+PfyMgU0cTVbdKgnzwR4It8i7IlvmWfX+T5BSt951EBoLC1En2bWT0/
 gmj1FlxSTQKoSPTkqxVZIqUpz3uy1KPQ0PdgQF3ZaP8MAbj1efMYSCeZrbMZWTI/L5
 pefQtdOD/CXCk1WV1eCc9mQWXRSYHUsu1sIFsPHSW1/2vpljhFlWHWTzeUrfm4YhJo
 aeDx/+OaAzrbA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YQztc2bMGz6txF;
 Sun,  5 Jan 2025 15:18:16 +0100 (CET)
From: "N. Jackson" <njackson@HIDDEN>
To: 75209 <at> debbugs.gnu.org
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <87v7uxibl9.fsf@Phoenix> (N. Jackson's message of "Thu, 02 Jan
 2025 13:34:10 +0000")
References: <878qrxgg74.fsf@Phoenix> <87v7uxibl9.fsf@Phoenix>
Date: Sun, 05 Jan 2025 14:18:14 +0000
Message-ID: <878qrpbazd.fsf@Phoenix>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: Eli Zaretskii <eliz@HIDDEN>, Ihor Radchenko <yantar92@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

The following might be "normal", in which case I apologise for the
noise, but it seems odd to me and it might have some bearing on the
bug.

Running list-timers shows:

Idle                Next  Repeat Function
       -1d 15h 43m 30.2s      1h org-persist--refresh-gc-lock
               2.4s           1m battery-update-handler
               2.4s           5m savehist-autosave
               4.2s            - undo-auto--boundary-timer
              50.1s           1m display-time-event-handler
   *           0.1s            t show-paren-function
   *           0.5s            t #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_9>
   *           0.5s      :repeat blink-cursor-start
   *          30.0s            - desktop-auto-save

I see nothing in the manuals about what it means for a
relative timer to be negative.  (Or is org-persist--refresh-gc-lock
running on a timer set with an absolute time that list-timers is
merely displaying as a relative time?)  And it seems odd that this
time is before this Emacs session started (emacs-uptime shows 1 day,
1 hour, 16 minutes, 40 seconds).





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 5 Jan 2025 13:16:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 05 08:16:46 2025
Received: from localhost ([127.0.0.1]:60349 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tUQUo-0002Oe-HJ
	for submit <at> debbugs.gnu.org; Sun, 05 Jan 2025 08:16:46 -0500
Received: from mout02.posteo.de ([185.67.36.66]:42239)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1tUQUi-0002OH-IC
 for 75209 <at> debbugs.gnu.org; Sun, 05 Jan 2025 08:16:45 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 8CE3C240101
 for <75209 <at> debbugs.gnu.org>; Sun,  5 Jan 2025 14:16:34 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1736082994; bh=hfOTYeO4A+hn4AryVXfKhY68rjOuOMLcnFOn41Nw2t8=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=Lx7/Bn0CeRwYMo+9Bw1BiO87QNnDXpMjPhfLe5wzv76/FE9ZhCTC1Y0/arLRs1OCp
 TMhSv9rKC8JORZmgP/ncomwps1dAWrWUIByNfN7Gu0AJ/hjxiKTtHdA5oyA4DPhoX5
 7A0thllu/2MwmfbbVElL3GNPQXSHwxSxbQsZhQMkWlfC6gJ9G6PCoJ/lLNr7PUwo+P
 96YhPzdxwA3BveCuDcZSj81007NFfocnbwoLAV1AfP2vnZsCCojv/FaYws0fw2XXpc
 AWAbhakgnGUOnDh2+smVgsrP2MHmxC9YwRgmaZH+VLeuLHm8Ym2AoujBkMYOGKOyoE
 /8TFzACrVoW8Q==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YQyWP752Kz9rxK;
 Sun,  5 Jan 2025 14:16:33 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <86ldvp8qaz.fsf@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
 <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@HIDDEN>
 <87pll1pofu.fsf@localhost> <86ldvp8qaz.fsf@HIDDEN>
Date: Sun, 05 Jan 2025 13:18:53 +0000
Message-ID: <87h66dpfeq.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> You are right. The only problem is short-living caches that should be
>> cleared at the end of Emacs session that created it.
>
> Does this mean you have ideas for solving this problem by reading the
> file before it is written?  Or does this mean you already read the
> file before writing to it?

The problem is that not every piece of cached data is stored in the
index on disk. Some caches should just live for the duration of Emacs
session that creates them.

Yet, other parallel Emacs sessions should not "GC" those transient
caches.

>> Org uses `with-temp-file'. Is there an alternative built-in and more
>> robust way to write string to file?
>
> Writing to a file is not atomic.  If you instead write to a temporary
> file, then rename it to the final file name, the renaming is atomic on
> Posix filesystems.
>
> This would mean you can still use with-temp-file, but with a temporary
> file name as its argument, and you need to add a single rename-file
> call afterwards.

That's fine. I just thought that there is some existing function doing
exactly this. If not, I can do it manually, of course.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 5 Jan 2025 11:15:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 05 06:15:44 2025
Received: from localhost ([127.0.0.1]:60122 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tUObf-0004KG-Qa
	for submit <at> debbugs.gnu.org; Sun, 05 Jan 2025 06:15:44 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:44080)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tUObe-0004Jy-4O
 for 75209 <at> debbugs.gnu.org; Sun, 05 Jan 2025 06:15:43 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tUObW-0008KF-2I; Sun, 05 Jan 2025 06:15:34 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=VItwdIwNUK+tOYhSj7PhnUZYhyNesEgYQESufXuAtL0=; b=Birzm0nR+OdO
 8M+aZseb9LcKysls4KnfwwzU0pBSooM5SVv9UKk3hHGve1GkEWi9M2FA0nlQ+7RjbkraXvnOUt7kq
 zneJ3LkG4+r0+8rUSW0VPEJ/LGaFhlo7iMF5EgPPhqzLww9HVLR9S0exv5XHT7D/yNuh9VlPvmUm3
 brwYbWS8U/w8Mvc3GAQvKnS2Ofvdb+Y1ThZFMiprAMaTYGpFEa8OVgbXMcUKQCLBBqRfRZrHzlTVX
 DSsAadO5kmx2F0rJ1abQBFhxSHRzC6Qs3545X4hPaLZzbwG1EqwNhmYUYYdvvMp5WfC4BBcklJsT+
 yr/v1rHMll+5gHuAlc7KTA==;
Date: Sun, 05 Jan 2025 13:15:32 +0200
Message-Id: <86ldvp8qaz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <87pll1pofu.fsf@localhost> (message from Ihor Radchenko on Sun,
 05 Jan 2025 10:03:49 +0000)
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
 <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@HIDDEN> <87pll1pofu.fsf@localhost>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ihor Radchenko <yantar92@HIDDEN>
> Cc: njackson@HIDDEN, 75209 <at> debbugs.gnu.org
> Date: Sun, 05 Jan 2025 10:03:49 +0000
> 
> > And if the cache is common to all sessions, then perhaps reading the
> > index before writing it should avoid several sessions step on each
> > other's toes?
> 
> You are right. The only problem is short-living caches that should be
> cleared at the end of Emacs session that created it.

Does this mean you have ideas for solving this problem by reading the
file before it is written?  Or does this mean you already read the
file before writing to it?

> > One way of rewriting a file atomically is to write the stuff to a
> > temporary file, then rename it to the target name.  If Org doesn't
> > already do that, maybe you should try doing that (together with
> > reading the file before updating it)?
> 
> Org uses `with-temp-file'. Is there an alternative built-in and more
> robust way to write string to file?

Writing to a file is not atomic.  If you instead write to a temporary
file, then rename it to the final file name, the renaming is atomic on
Posix filesystems.

This would mean you can still use with-temp-file, but with a temporary
file name as its argument, and you need to add a single rename-file
call afterwards.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 5 Jan 2025 10:01:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 05 05:01:41 2025
Received: from localhost ([127.0.0.1]:59932 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tUNS1-0000RG-4F
	for submit <at> debbugs.gnu.org; Sun, 05 Jan 2025 05:01:41 -0500
Received: from mout02.posteo.de ([185.67.36.66]:44339)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1tUNRw-0000Qs-Rl
 for 75209 <at> debbugs.gnu.org; Sun, 05 Jan 2025 05:01:39 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 2F2E9240101
 for <75209 <at> debbugs.gnu.org>; Sun,  5 Jan 2025 11:01:29 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1736071290; bh=9oSLH4g88E1NMvEFBRpeGNIumCB9U9Afqb95IvtPItY=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=edHCoDoOZ59VIQ7ii0d2HC34caixqpxuSUn6/BaoqcvMhavw7kFMbgAkNrxDTssMy
 c7yJTEVSQ3kWEmiwZVzYhOUBnD9D2cSHA75s/fybIHTeMmWHAkbYKgYSLOrNOOJkwi
 lZRum9pqaxO/yif8AvfNozPa269lErcDZqPDCD9XblbvhEjDkKO4wioQUcOYCaev35
 01uCmke3z8XTD8Lfn28MZ6gRHfx9+7Swrtiqkxd5rgFKaAf7uSTv6XW3ls2khbCTO1
 P+MuuKfbgtgPPxEu2w7qgGGNpbU1xgyRMs7bRr10hPW2D7EB29VVCGr4FsBJkxMFfZ
 hQCL808I/wb3w==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YQtBK1vlPz6tyT;
 Sun,  5 Jan 2025 11:01:29 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <86y0zthx11.fsf@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
 <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@HIDDEN>
Date: Sun, 05 Jan 2025 10:03:49 +0000
Message-ID: <87pll1pofu.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

> Thanks.  I think I still don't have a clear idea of the usage of these
> caches.  Are the caches supposed to be common to all Emacs sessions?

Yes.

> E.g., when a cache changes by one session, are other sessions supposed
> to know about the change?

Usually yes, except for cache entries that are supposed to live until
the end of Emacs session.

> And if the cache is common to all sessions, then perhaps reading the
> index before writing it should avoid several sessions step on each
> other's toes?

You are right. The only problem is short-living caches that should be
cleared at the end of Emacs session that created it.

> One way of rewriting a file atomically is to write the stuff to a
> temporary file, then rename it to the target name.  If Org doesn't
> already do that, maybe you should try doing that (together with
> reading the file before updating it)?

Org uses `with-temp-file'. Is there an alternative built-in and more
robust way to write string to file?

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 2 Jan 2025 18:48:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 02 13:48:57 2025
Received: from localhost ([127.0.0.1]:46651 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tTQFd-0000hk-6R
	for submit <at> debbugs.gnu.org; Thu, 02 Jan 2025 13:48:57 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:59640)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tTQFa-0000hW-5K
 for 75209 <at> debbugs.gnu.org; Thu, 02 Jan 2025 13:48:55 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tTQFS-0002ZU-Sq; Thu, 02 Jan 2025 13:48:46 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=O1zUGbbQQ9TyAn9xdnefRNQX4fMdPDLkQeWwxJcCShs=; b=A5yby2zPozit
 vO27DaQgVmEQ1kZuf4sRGvP+403u7onqFry7CH5YiZ0APBUyP0UHP8I7QFtdMSuFL8+MoGrFDMfsb
 244JzjzYqV4f5v69QM6r0PtkLkzJCKseHYiIfTFd/I+Mg5pQQXc4sSLVO33mg0rVMbX2USzEkAj0q
 YPRQplEs6QqKWCSIim6cwu6EEmY1lRxHqJo8ow7J3EVGfaeOvcRLeGTVUg6q/teUYemlgEomvzJEe
 Apkys7WVoPmMpRBkD59Q2ua1b1r3I85sSgFTbIKgFw87NU+BVMqxTfpCYf9m9fA19OZ1HEQLKo2Yc
 Vl3/KUq3iBw8o3oqo8A6Xg==;
Date: Thu, 02 Jan 2025 20:48:42 +0200
Message-Id: <86y0zthx11.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <87y0ztqg65.fsf@localhost> (message from Ihor Radchenko on Thu,
 02 Jan 2025 17:28:02 +0000)
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN> <87y0ztqg65.fsf@localhost>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ihor Radchenko <yantar92@HIDDEN>
> Cc: njackson@HIDDEN, 75209 <at> debbugs.gnu.org
> Date: Thu, 02 Jan 2025 17:28:02 +0000
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > Can you tell more about the purpose and use of this file?  What is
> > written to it, and how is it supposed to be used after being written?
> > And what bad things happen when the Lisp readers errors out because it
> > is unable to read the data for some reason?
> 
> Let me then describe briefly what org-persist does.
> 
> In the nutshell, it is cache manager.
> The main cache data consists of:
> 1. index describing everything stored in the cache and its expiry
>    settings
> 2. cache data stored in individual files. Each file in the cache is
>    mentioned in the index file
> 
> >From time to time (before quitting Emacs), org-persist needs to do some
> "garbage collection" and remove cache files that are expired or
> unreferenced from index to avoid cache growing infinitely.
> 
> The GC process works well, and helps keeping the cache directory
> clean. However, there are problems when multiple Emacs processes are
> running simultaneously.
> 
> Consider Emacs A loading cache index into memory and doing nothing.
> Then, Emacs B also loads the cache index, but adds data to the cache.
> If Emacs A is closed while Emacs B is running (and Emacs B not yet
> updating cache index on disk), it also performs garbage
> collection. However, Emacs A has no knowledge about cache data written
> by Emacs B and may "garabge collect" this data. We do not want that.

Thanks.  I think I still don't have a clear idea of the usage of these
caches.  Are the caches supposed to be common to all Emacs sessions?
E.g., when a cache changes by one session, are other sessions supposed
to know about the change?  If the cache is for a single session, then
why are several session allowed to write to the cache simultaneously?
And if the cache is common to all sessions, then perhaps reading the
index before writing it should avoid several sessions step on each
other's toes?

> "gc-lock.eld" keeps track of the running Emacs processes - every Emacs
> process regularly write to "gc-lock.eld", putting a record in the form
> of (before-init-time . <last known time that Emacs is running>). If
> there are no known recently running Emacs processes (apart from
> current), garbage collection process is suppressed to avoid removing
> cache data from other Emacsen.

One way of rewriting a file atomically is to write the stuff to a
temporary file, then rename it to the target name.  If Org doesn't
already do that, maybe you should try doing that (together with
reading the file before updating it)?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 2 Jan 2025 17:25:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 02 12:25:54 2025
Received: from localhost ([127.0.0.1]:46440 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tTOxF-0004fF-DT
	for submit <at> debbugs.gnu.org; Thu, 02 Jan 2025 12:25:53 -0500
Received: from mout02.posteo.de ([185.67.36.66]:34779)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1tTOxD-0004ew-9J
 for 75209 <at> debbugs.gnu.org; Thu, 02 Jan 2025 12:25:51 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 6FCDA240101
 for <75209 <at> debbugs.gnu.org>; Thu,  2 Jan 2025 18:25:43 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1735838743; bh=9LydcE/Sm7dbxczR/mTGONnicJ96HHzMExiosCoisCg=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=nsqC/P2Un+Y0hsulXDNAWmDCZnlyVuMaH/AInmzFPhjLTnVoN8zCaccu5+kUoHjdm
 F8iL914FvwRQl2A86lZosa+spHw7RrvrXvVNuallmxpB4jRcS92N5CilhsLqqSrVOq
 D7tYmlnTIxNqlCY7nObvUQ5A5txjww19TVIJhi43EDL4qKuLfK9Yx7zlX9K+yxIec+
 5kxlijE+NapQcmQjAzKLkTU3578q+a8s7p6reGu8Ib6X6HvhBYwuT4VGbjD6vp1HvH
 YWJ5pMXFCXmlTXb5vIsP64T8T+3WrCfJ+JDqtyU3pjg5uP1axMt2N5nCf7d1Hw9pwW
 yY6aw4PcVT4tw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YPDBG5DnTz9rxL;
 Thu,  2 Jan 2025 18:25:42 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <86ttailoi9.fsf@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
 <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@HIDDEN>
Date: Thu, 02 Jan 2025 17:28:02 +0000
Message-ID: <87y0ztqg65.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> gc-lock.eld is a file used to flag that cache dir is being worked
>> on by multiple emacs instances. GC here refers to
>> garbage-collecting cache data.
>
> Can you tell more about the purpose and use of this file?  What is
> written to it, and how is it supposed to be used after being written?
> And what bad things happen when the Lisp readers errors out because it
> is unable to read the data for some reason?

Let me then describe briefly what org-persist does.

In the nutshell, it is cache manager.
The main cache data consists of:
1. index describing everything stored in the cache and its expiry
   settings
2. cache data stored in individual files. Each file in the cache is
   mentioned in the index file

From time to time (before quitting Emacs), org-persist needs to do some
"garbage collection" and remove cache files that are expired or
unreferenced from index to avoid cache growing infinitely.

The GC process works well, and helps keeping the cache directory
clean. However, there are problems when multiple Emacs processes are
running simultaneously.

Consider Emacs A loading cache index into memory and doing nothing.
Then, Emacs B also loads the cache index, but adds data to the cache.
If Emacs A is closed while Emacs B is running (and Emacs B not yet
updating cache index on disk), it also performs garbage
collection. However, Emacs A has no knowledge about cache data written
by Emacs B and may "garabge collect" this data. We do not want that.

"gc-lock.eld" keeps track of the running Emacs processes - every Emacs
process regularly write to "gc-lock.eld", putting a record in the form
of (before-init-time . <last known time that Emacs is running>). If
there are no known recently running Emacs processes (apart from
current), garbage collection process is suppressed to avoid removing
cache data from other Emacsen.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 2 Jan 2025 13:34:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 02 08:34:22 2025
Received: from localhost ([127.0.0.1]:43150 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tTLLC-0000HT-6L
	for submit <at> debbugs.gnu.org; Thu, 02 Jan 2025 08:34:22 -0500
Received: from mout01.posteo.de ([185.67.36.65]:54959)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1tTLLA-0000HE-PL
 for 75209 <at> debbugs.gnu.org; Thu, 02 Jan 2025 08:34:21 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 6606E240027
 for <75209 <at> debbugs.gnu.org>; Thu,  2 Jan 2025 14:34:14 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1735824854; bh=NJd+jQW+u8NmUly/wgRhWTLYsvynKk3gMKNH2CydJto=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=AqOO+4gH1jMu8tTuaRDNlimoUmiEY8cb5+SEnf4Mhfmg/i9qWvW3IDJKMDg93rkiy
 4037CFStUbPpF8s8dRXcujNtvjQw7jvPFD9RrsqOAdn5qZ88vYq+1tTzsr1Uj2/1JK
 U/gnEl/ACOkw5e10p4sTmCE9YSOiZTDULEpj1XHbSsjH4eKB9BSGBURrCoBK0KNW7I
 q2L2jmY3TBnMNGnDyM1LTaw0FoYrjRsCssJ/fq/CgMyWf6DWZb//4EThRsgPSuGplT
 m5WNttAZX5R9nj2M5Ihw1gOENIAEqc2OzAa6DPDixGTXl5w7YNPd3xIlS5WqfxOU90
 5h4lDlyWCpD1A==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YP73765npz6tn4;
 Thu,  2 Jan 2025 14:34:11 +0100 (CET)
From: "N. Jackson" <njackson@HIDDEN>
To: 75209 <at> debbugs.gnu.org
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <878qrxgg74.fsf@Phoenix> (N. Jackson's message of "Mon, 30 Dec
 2024 18:48:31 +0000")
References: <878qrxgg74.fsf@Phoenix>
Date: Thu, 02 Jan 2025 13:34:10 +0000
Message-ID: <87v7uxibl9.fsf@Phoenix>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: Eli Zaretskii <eliz@HIDDEN>, Ihor Radchenko <yantar92@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

At 18:48 +0000 on Monday 2024-12-30, N. Jackson wrote:
>
> In the Emacs 30 pretest I have been getting the following warning
> every few days:
>
>   Warning (emacs): Emacs reader failed to read data in
>   "/home/nlj/.cache/org-persist/gc-lock.eld". The error was: "End of
>   file during parsing"

When I woke my system from suspend this morning and switched to the
Emacs session running Gnus, the warning had popped up in that
session -- possibly during suspend or resume.

I immediately looked at gc-lock.eld which contained this:

  ;;   -*- mode: lisp-data; -*-
  (((26485 51608 866710 15000) 26486 34929 321731 426000))

(which I guess is again unremarkable).

I checked my buffer list to be absolutely certain that I hadn't
opened any Org Mode files and the only buffers were *Group*,
*scratch*, *Messages*, .newsrc-dribble, and *Warnings*.

The session has one frame and in that frame there was just the Gnus
Group buffer open (until the *Warnings* buffer popped up below it).

With Gnus sitting idle with just it's Group buffer open, I can't see
how it would use any Org Mode features -- or even _do_ anything at
all -- and as I said, no Org Mode (user) files were open in the
session.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 1 Jan 2025 21:09:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 16:09:38 2025
Received: from localhost ([127.0.0.1]:40651 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tT5yD-0005Tv-Vu
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 16:09:38 -0500
Received: from mail-4322.protonmail.ch ([185.70.43.22]:48385)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <pipcet@HIDDEN>)
 id 1tT5yA-0005Th-Te
 for 75209 <at> debbugs.gnu.org; Wed, 01 Jan 2025 16:09:36 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1735765768; x=1736024968;
 bh=CCOjE1/d3CIZ3EHuYxj4FObyoxRV2OwSvngXpeH7OWI=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post;
 b=qfPBojjvq6uSskNrq52eNqe38g3BBSVARUSVOEHricjtUVc3lCQ9NjbNT10cORSVX
 pLaYQXMtSW8S6AG1pEJB9vozgDD959rYNb0UH/A772IwCeSgXvFCEA1F502YtWNUbk
 ojvli1PP4Tsz+iKJsOYxFDeVsPJPtkX+jdaxhelJdpOfwaejrjZUuKVRovb31Lcg7d
 MS0LErRY2zfwGqmOhrEkH5V4aOieqVHblKDTudZXjov8c0gWejeOiNYqkPOQ6VKA0b
 mDXa825T0jzSAIpN4fd19GE6OTQooCKSQHG2veWVmIrwQ7j/vLcXnOYNrCA6ksDy1U
 hq9p1jl9ED3Tg==
Date: Wed, 01 Jan 2025 21:09:24 +0000
To: Eli Zaretskii <eliz@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
Message-ID: <87zfkakzsp.fsf@HIDDEN>
In-Reply-To: <86r05ml63w.fsf@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87zfkddk1l.fsf@Phoenix> <86zfkdlz39.fsf@HIDDEN>
 <87a5camnyu.fsf@HIDDEN> <86r05ml63w.fsf@HIDDEN>
Feedback-ID: 112775352:user:proton
X-Pm-Message-ID: 20ae6e07730b9c1bc74b7f18227047e08a6bd90f
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75209
Cc: yantar92@HIDDEN, 75209 <at> debbugs.gnu.org, njackson@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

"Eli Zaretskii" <eliz@HIDDEN> writes:

>> Date: Wed, 01 Jan 2025 17:41:57 +0000
>> From: Pip Cet <pipcet@HIDDEN>
>> Cc: "N. Jackson" <njackson@HIDDEN>, yantar92@HIDDEN, 75209@debbu=
gs.gnu.org
>>
>> I'm assuming that the resolution was that the file was read before we
>> finished writing it.  I've run into the same issue a number of times
>> (interrupting and resuming Emacs builds leads to build failures, "make
>> bootstrap" makes them go away).
>>
>> Can we consider modifying the .elc format to have a footer indicating
>> that the file is complete?
>
> The .elc file is supposed to be created only when the compilation is
> complete and successful.  If you look at byte-compile-file, you will

You're right.  Sorry for the noise.  The most likely explanation is I
missed a "Pure Lisp storage overflowed" message which "explained" it,
because I just tried and that's what happened.

There's a bug in pin_string which assumes no purespace overflow, and
corrupts bytecode after one, so it's entirely possible that an .elc file
was truncated.  Probably not worth fixing at this point.

I'll try interrupting a few more builds when no-purespace is merged.

Pip





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 1 Jan 2025 18:52:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 13:52:16 2025
Received: from localhost ([127.0.0.1]:39790 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tT3pI-0006Mx-C0
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 13:52:16 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:35222)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tT3pG-0006MW-C4
 for 75209 <at> debbugs.gnu.org; Wed, 01 Jan 2025 13:52:15 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tT3p9-0005fJ-CB; Wed, 01 Jan 2025 13:52:07 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=nKk3kmSjb2zZi1ezb8dX+hB6lwtz5A7I5sbpbMVKM58=; b=enlSOCwL6Z8S
 bLPjbPIm5578g7Cgu79QqGPxfJA9SSetgZOAy8P60xDqc/O5V7y9I2RwhkJjZj2H56v8W9R2sMoFX
 ySiXxF3PN3KzRN4+uFtNNhLZR8S5wm6gmDviICR0/Mgv7br3WBpRt7Hew63xun0YVdKC8ULneZRkC
 D9kgwpzSFCxbnQpSKgauf04uBtbgPuxnKQKTydYMW+rONmL16XxrNOE8E9hsmVYgTYXR9KQzN9UeC
 yNxB1cyotiXVIfjdxMuap6yVfhbrtKchhgMVeanorN+h0CeCfdWWTKUGtz3rXh4sntb/Fzyyyw0fk
 NKx2Jhb2oWo/tIfpBZVP2w==;
Date: Wed, 01 Jan 2025 20:52:03 +0200
Message-Id: <86r05ml63w.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <87a5camnyu.fsf@HIDDEN> (message from Pip Cet on Wed, 01
 Jan 2025 17:41:57 +0000)
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87zfkddk1l.fsf@Phoenix> <86zfkdlz39.fsf@HIDDEN>
 <87a5camnyu.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: yantar92@HIDDEN, 75209 <at> debbugs.gnu.org, njackson@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Wed, 01 Jan 2025 17:41:57 +0000
> From: Pip Cet <pipcet@HIDDEN>
> Cc: "N. Jackson" <njackson@HIDDEN>, yantar92@HIDDEN, 75209 <at> debbugs.gnu.org
> 
> I'm assuming that the resolution was that the file was read before we
> finished writing it.  I've run into the same issue a number of times
> (interrupting and resuming Emacs builds leads to build failures, "make
> bootstrap" makes them go away).
> 
> Can we consider modifying the .elc format to have a footer indicating
> that the file is complete?

The .elc file is supposed to be created only when the compilation is
complete and successful.  If you look at byte-compile-file, you will
see that we first compile the Lisp code, then write the produced
bytecode to a temporary file, and only after that we rename the
temporary file into the target .elc file.  Renaming a file is an
atomic operation on Posix filesystems, so it either completely
succeeds or completely fails.

We only write directly to the target file if that file's directory is
unwritable.

So I don't understand why you see incomplete .elc files when you
interrupt the build.  What happens in my case is that I see those
temporary files left around, but I don't think I've ever saw an
incomplete .elc file after interrupting the build.

Is it likely that the directory where you build Emacs is not writable
by your user?  That's the only way I could explain what you see.  Or
maybe there's some other factor at work here, in which case we should
find out what that factor is, before we consider how to fix it.

In any case, I think this is a separate issue, so I'd prefer to have a
separate bug report for it.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 1 Jan 2025 17:42:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 12:42:13 2025
Received: from localhost ([127.0.0.1]:39699 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tT2jV-0002mG-0r
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 12:42:13 -0500
Received: from mail-10631.protonmail.ch ([79.135.106.31]:28495)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <pipcet@HIDDEN>)
 id 1tT2jR-0002li-J7
 for 75209 <at> debbugs.gnu.org; Wed, 01 Jan 2025 12:42:11 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1735753321; x=1736012521;
 bh=9LV14EyuA+S5gkHV+lc2U94n3lG0pI7UBjxFbuvq8Cs=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post;
 b=c5b+UF+P6e7nVrIckQUgpAnVI8o4F4E+D88i13CGVycwFkQVnNGTYAHH81ASoLbXA
 Vt1v133oRsO6v2vXyvegEgu0jDxc8FHSkH9NFdD+ORyU3DrIXdM5FKUuU1WeqxlI6d
 OOnnkmxOqzXB7JbzveMMGZMzCNmNBYejx8p+Weg120n/ocECA3jhy/I6PK0t4zRB5q
 ULVOhZv1cjCE9HirJXvkCWgFljvSd95z316Z00wMV/HTY7SRAk2A3RFZKxIEg31UNA
 J78BpPUBCCbOn7wCt5DDzFaVLmyFaLZHBoOz8rjHsS4ROVgis5UDB3+uku2fBMdifo
 BoPWL7G2cunCA==
Date: Wed, 01 Jan 2025 17:41:57 +0000
To: Eli Zaretskii <eliz@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
Message-ID: <87a5camnyu.fsf@HIDDEN>
In-Reply-To: <86zfkdlz39.fsf@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87zfkddk1l.fsf@Phoenix> <86zfkdlz39.fsf@HIDDEN>
Feedback-ID: 112775352:user:proton
X-Pm-Message-ID: e0af420c2aa1576e32d2d7bd1b938438874b0d44
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75209
Cc: yantar92@HIDDEN, 75209 <at> debbugs.gnu.org,
 "N. Jackson" <njackson@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

"Eli Zaretskii" <eliz@HIDDEN> writes:

>> From: "N. Jackson" <njackson@HIDDEN>
>> Cc: Ihor Radchenko <yantar92@HIDDEN>,  75209 <at> debbugs.gnu.org
>> Date: Mon, 30 Dec 2024 19:53:42 +0000
>>
>> At 21:31 +0200 on Monday 2024-12-30, Eli Zaretskii wrote:
>>
>> >> From: "N. Jackson" <njackson@HIDDEN>
>> >> Date: Mon, 30 Dec 2024 18:48:31 +0000
>> >>
>> >>   Warning (emacs): Emacs reader failed to read data in
>> >>   "/home/nlj/.cache/org-persist/gc-lock.eld". The error was: "End
>> >>   of file during parsing"
>>
>> > Does the file exist?  If so, what is its content (assuming you can
>> > post it here)?
>>
>> It exists and currently has the following contents:
>>
>>   ;;   -*- mode: lisp-data; -*-
>>   (((26482 57035 301257 992000) 26482 60639 74163 973000) ((26482 62694 =
821331 522000) 26482 62698 583212 450000))
>
> This one seems okay.  I guess we need to wait for the warning and see
> then?

I'm assuming that the resolution was that the file was read before we
finished writing it.  I've run into the same issue a number of times
(interrupting and resuming Emacs builds leads to build failures, "make
bootstrap" makes them go away).

Can we consider modifying the .elc format to have a footer indicating
that the file is complete?  Ideally, it would also indicate the checksum
of the file as well as the fact that it is complete, but this would have
a performance impact which might be significant in some cases (very
large .elc files; of course, we could simply modify the footer to
indicate a "too large to checksum" condition has occurred, if the file
is large).

It's tempting to put this information in the header, the way we do for
pdumps (they are first written to start with "!UMPEDGNUEMACS", then the
last thing pdumper does is to rewrite the first character to be "D"),
but using a footer is more reliable: it detects truncation (or
modification) for whatever reason, and makes fewer assumptions about
data atomicity.

While we're in there, let's indicate in the ELC header whether the
special circumstances of native compilation applied to the compilation
process of this file.  This is particularly important if we use
benchmarks defined in .elc files: using the wrong compiled version would
lead to unreliable benchmark results, and be somewhat difficult to
detect otherwise.  (I'm assuming it is still the case that
native-compiling a Lisp file leaves behind user-visible .elc artifacts.
If that has been fixed, please ignore this paragraph).

But, please, no timestamp.  Let's keep things reproducible where we can,
and not leak sensitive information by accident.

It may be necessary to bump the produced ELC version code for this.

The equivalent issues are less urgent, but ultimately identical, for
pdumper files (apparently, we don't detect truncation or modification)
and object files produced during the build (it's the job of the make
implementation and the compiler to avoid truncated .o files, but if they
don't do that, we might want to write x.o.tmp first, then rename it, in
the usual fashion of Makefiles).

Note that it is, of course, possible to usefully modify .elc (and .pdmp)
files after creation, so we shouldn't make detected modifications an
unconditional error.

Pip





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 1 Jan 2025 15:55:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 10:55:09 2025
Received: from localhost ([127.0.0.1]:39570 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tT13s-0005ab-1D
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 10:55:08 -0500
Received: from mout02.posteo.de ([185.67.36.66]:34037)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1tT13o-0005Ww-M4
 for 75209 <at> debbugs.gnu.org; Wed, 01 Jan 2025 10:55:05 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 37038240101
 for <75209 <at> debbugs.gnu.org>; Wed,  1 Jan 2025 16:54:57 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1735746898; bh=j2DfvS+Dw796ntN84VmzhYvv1PizbZf7kFPI+sVgUQc=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=hT523M8i7gOWeUDhKkd8Boq8s5aM4RK6kVssqCrz08HcltCdvtqxS1lh3YRLJW/tO
 AJugWpN8btUW8Q7+D+NaKkk1/0/7VwhvJnQe1kbLwXUR/tLsBa+gx9buc2SZfq8h5a
 LZNR+ifa4pt6s5XXjRr71xD6u0oUVHFbPQrwpndMH4gNfjLf2epy2k1Y7UXV934vE1
 LcXCOkXtniv/jykAdFZ15ABIThzI7sALxPkawePzrIlRljQ/bndDnZqLMbejzHdIXw
 Rw0WhipjJa/pSaiIV7Pzy2OuFSsowblxVHCjX2QfPspsm1jS5EphZDa/z71cFV8PDO
 Pp/rfQl+h1hMQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YNZD06LBYz9rxL;
 Wed,  1 Jan 2025 16:54:55 +0100 (CET)
From: "N. Jackson" <njackson@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <878qrvhe0k.fsf@localhost> (Ihor Radchenko's message of "Tue, 31
 Dec 2024 19:02:35 +0000")
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost>
Date: Wed, 01 Jan 2025 15:54:54 +0000
Message-ID: <87wmfecywh.fsf@Phoenix>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: Eli Zaretskii <eliz@HIDDEN>, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

At 19:02 +0000 on Tuesday 2024-12-31, Ihor Radchenko wrote:
>
> Gnus may load Org. (AFAIU, it does it when viewing gnus articles)

Yes, I suppose it might.  [When I read an email with Org markup in
Gnus (source blocks, for example), the email gets nicely fontified.
Gnus might be using Org to do that rather than rolling its own
parser.]

> Another possible scenario is two Org instances writing to the same
> file at the same time.

I don't think that's the case here.

Certainly not the same user-owned Org Mode data file.  (I'm careful
not to open my Org mode files in my Gnus instance of Emacs [and
consequently I have to live with the inconvenience of not being able
to Capture directly from email or News].)

However now that I've learned that Org has internal files that it
writes to, it seems quite possible that two instances of Org might
write to one of those files at the same time.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 1 Jan 2025 12:15:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 07:15:03 2025
Received: from localhost ([127.0.0.1]:37937 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tSxcp-0002Bx-EH
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 07:15:02 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:45682)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tSxcn-0002Bh-38
 for 75209 <at> debbugs.gnu.org; Wed, 01 Jan 2025 07:14:57 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tSxcg-0001HE-Cm; Wed, 01 Jan 2025 07:14:50 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=VOuFVlRMgVDkGE8pGRH7dS0Ke08IKBak1jHOYJ9naRk=; b=jgLEXo1eTMsD
 XBcF6kRZWIyvlWYIyR959JC4mQ7QX2JLWuzPAUWtRknuzLqRt0C9nb1HILb/RA+E6usmFierKVq7G
 K2AFrF9bMhTEpGm86Ukjbu+H/OwsBAQNGk3Pz5InBQgLeub6vXocVDhZoUHHbdrgqnkN8A43eu83E
 xVqQMm7FNZ/Qf9m5znDzpjdStj734hyAZW/z3qwjKWzI4iwT3Gm9BSlOKEXaeLofxpZELUoWfZhZQ
 bAGDjSq+8AFsziHHjedmcu2KQfiS4ZaaaRmWv05j0rRWu1TKVuOEGslIu0o3AYTkqnBYvzAIRqvD4
 SOaWHYofxTTNV1d2FrLs3Q==;
Date: Wed, 01 Jan 2025 14:14:38 +0200
Message-Id: <86ttailoi9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <87ldvug9a3.fsf@localhost> (message from Ihor Radchenko on Wed,
 01 Jan 2025 09:42:28 +0000)
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN> <87ldvug9a3.fsf@localhost>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ihor Radchenko <yantar92@HIDDEN>
> Cc: njackson@HIDDEN, 75209 <at> debbugs.gnu.org
> Date: Wed, 01 Jan 2025 09:42:28 +0000
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> Another possible scenario is two Org instances writing to the same file
> >> at the same time.
> >> If it is what is happening in your case, your problem may be similar to 
> >> https://list.orgmode.org/orgmode/CAMJKaZxA_VmLdFP_u1rNiF2s0X2kVivjT31jEM_r3BYCHri1PQ@HIDDEN/
> >
> > Can't Org prevent more than one session writing to this file?  We have
> > file locks which can be used here, I think.
> 
> That's exactly the idea I am trying in the linked thread to address the
> issue.
> 
> It is not the biggest problem there though. The problem is when there is
> a race between Emacs processes writing to the same file one after
> another (without any locking). Contents of the file may then become
> unexpected compared to other Emacs session.

Is the gc-lock.eld file supposed to be a singleton across all the
Emacs sessions?  Earlier you said:

> gc-lock.eld is a file used to flag that cache dir is being worked
> on by multiple emacs instances. GC here refers to
> garbage-collecting cache data.

Can you tell more about the purpose and use of this file?  What is
written to it, and how is it supposed to be used after being written?
And what bad things happen when the Lisp readers errors out because it
is unable to read the data for some reason?

I'm asking because I'd like to think about, and then suggest, some
suitable solutions, but I don't want to suggest nonsensical ones.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 1 Jan 2025 09:41:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 04:41:07 2025
Received: from localhost ([127.0.0.1]:37744 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tSvDv-0003gY-EP
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 04:41:07 -0500
Received: from mout02.posteo.de ([185.67.36.66]:54665)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1tSvDs-0003fr-Vg
 for 75209 <at> debbugs.gnu.org; Wed, 01 Jan 2025 04:41:05 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 183DD240101
 for <75209 <at> debbugs.gnu.org>; Wed,  1 Jan 2025 10:40:58 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1735724459; bh=6wKQNI+uw0b0jxtI+VXbP26786MpMcqITSOnBAirB3Y=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=dvaEUhwmSwSM+guYNRd8wKMXwJpHnicmsxFWAjD0p8uVsAurVjU1FZZLtaxAf0Yoh
 qliwwdJPSUT9Bs2eWEn71Qnt6XhRvqK7wXWJqx9xsRu2CTlJUJ2BwxKaL09pfGgYFm
 1F8YiHL/43iBkvRLvBXURlXYG4JIfYWZaZWz9fEedoCRS08PPChfYML3xX1AfASTe5
 wkYsj2djIhABQQddpILWm9WIXNXFVjB/y9vSS3A/95992VN7P2+6gyqvOH8JO+61XX
 R2WMQnQDkB4nmzyGRK7ropkxi/vkXuLTZ1fvRSUuljGZmIsJ7l/3eZuuHZ/8bOjhO5
 e8prOCDHqZbXg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YNPwV1hmsz9rxG;
 Wed,  1 Jan 2025 10:40:58 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <86v7uzljc5.fsf@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
 <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@HIDDEN>
Date: Wed, 01 Jan 2025 09:42:28 +0000
Message-ID: <87ldvug9a3.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Another possible scenario is two Org instances writing to the same file
>> at the same time.
>> If it is what is happening in your case, your problem may be similar to 
>> https://list.orgmode.org/orgmode/CAMJKaZxA_VmLdFP_u1rNiF2s0X2kVivjT31jEM_r3BYCHri1PQ@HIDDEN/
>
> Can't Org prevent more than one session writing to this file?  We have
> file locks which can be used here, I think.

That's exactly the idea I am trying in the linked thread to address the
issue.

It is not the biggest problem there though. The problem is when there is
a race between Emacs processes writing to the same file one after
another (without any locking). Contents of the file may then become
unexpected compared to other Emacs session.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 31 Dec 2024 19:56:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 31 14:56:26 2024
Received: from localhost ([127.0.0.1]:36874 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tSiLp-0005cz-S2
	for submit <at> debbugs.gnu.org; Tue, 31 Dec 2024 14:56:26 -0500
Received: from eggs.gnu.org ([209.51.188.92]:57786)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tSiLn-0005cc-OB
 for 75209 <at> debbugs.gnu.org; Tue, 31 Dec 2024 14:56:24 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tSiJa-0002zf-4u; Tue, 31 Dec 2024 14:54:06 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=h8nxw/i796oJGrPXZiB5NXM+L6KdNJZk3W50mlX3A60=; b=XD8Ah+fj1UOO
 lztOJhtG0awD+W5+IscbVX7YV93ytE6OPqFqfSFVPliXpPOcTgdvtiRy4nTqI5fzK2HR2mAIzUBlD
 6kdbiDfshJL4/w9gXDMlhNnbawfQjsrFjKMkMdst2jCpNYJbfmtVwK7MIPArAoELFluDtNYdhRxDQ
 tRrA9Jp6Ugj1/LOvNI3DJJe0uNoW0p4DjR5C/vbZ4HMRcMCzE0emSJjopYeJIvEmpAvZYxh53YuOx
 cPATaJSzPGrALMxsZlM9TcZjcOKpzlwIo3wIP7kcMz7q+B7guAdOaVc0AhK+WQ+RmIdsxC6yt34ms
 b9cvXJuL70IM/ZrAy5k4Fw==;
Date: Tue, 31 Dec 2024 21:54:02 +0200
Message-Id: <86v7uzljc5.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <878qrvhe0k.fsf@localhost> (message from Ihor Radchenko on Tue,
 31 Dec 2024 19:02:35 +0000)
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix> <878qrvhe0k.fsf@localhost>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org, njackson@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ihor Radchenko <yantar92@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>, 75209 <at> debbugs.gnu.org
> Date: Tue, 31 Dec 2024 19:02:35 +0000
> 
> "N. Jackson" <njackson@HIDDEN> writes:
> 
> >> Or, alternatively, C-g in the middle of writing.
> >
> > I use C-g very frequently.  I type `M-x' and then realise I want to
> > do `C-h f' first instead, so I do `C-g' to exit from the M-x prompt.
> > Or I do an isearch and then change my mind (or find and read
> > whatever I was looking for) then I do `C-g' (twice, I think) to exit
> > the isearch and get back to where I started.  Usages like that.
> > From my (probably naive) point of view, if that messes up Org Mode,
> > then Org Mode is doing something wrong.
> 
> That should not be a problem then.
> Reading/writing GC file is done using timer and, AFAIK, Emacs should not
> run timers while you are running a command.

If this happens while the user types some command, then timers could
fire during that typing, since people rarely type fast enough to not
let timers run.

But all this is not relevant, because Emacs binds inhibit-quit to a
non-nil value while it runs the timer function.  So, unless the timer
in question somehow forcibly resets inhibit-quit to nil, C-g should
not be able to interrupt a timer.

> >> gc-lock.eld is a file used to flag that cache dir is being worked
> >> on by multiple emacs instances. GC here refers to
> >> garbage-collecting cache data.
> >
> > I do run multiple (two) instances of Emacs.  One is my normal
> > session where I use Org quite heavily.  The other is my Gnus session
> > in which I never open an Org file and never (as far as I know) use
> > any Org features.
> 
> Gnus may load Org. (AFAIU, it does it when viewing gnus articles)
> 
> Another possible scenario is two Org instances writing to the same file
> at the same time.
> If it is what is happening in your case, your problem may be similar to 
> https://list.orgmode.org/orgmode/CAMJKaZxA_VmLdFP_u1rNiF2s0X2kVivjT31jEM_r3BYCHri1PQ@HIDDEN/

Can't Org prevent more than one session writing to this file?  We have
file locks which can be used here, I think.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 31 Dec 2024 19:01:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 31 14:01:14 2024
Received: from localhost ([127.0.0.1]:36790 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tShUQ-0002rd-1Z
	for submit <at> debbugs.gnu.org; Tue, 31 Dec 2024 14:01:14 -0500
Received: from mout01.posteo.de ([185.67.36.65]:42989)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1tShUM-0002rK-S9
 for 75209 <at> debbugs.gnu.org; Tue, 31 Dec 2024 14:01:11 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id B3615240028
 for <75209 <at> debbugs.gnu.org>; Tue, 31 Dec 2024 20:01:04 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1735671664; bh=f9Md/bcxYZysfHFsu9T9XB6H4QkUzOhj23T09HCH79g=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=IunTQ4o2UhMhjZAMAnujxQQcA8hEwQo14fN/Y9AXolqvh6BjCxMxQqBmSpyHkNwzb
 a0c6WmKrmD90dSy6RGpWSEwNGvLLGB6Wcbc0ECAC9i40I9xOCKdWfqrgGEeYo7Os/5
 63LSrLFnFH30QprGrGjfOeq2dF3vFOpAXVmSZ9SiD7djoJVD+vW/1swo2Y4IB8VCMq
 F1H6qcctB6PzR1JtYFkZDKdiUSmPpqKm0Z/jYKW14otxr/oWTHcp7HEcpzU0KGDuvb
 syqs4rwqPgWZpoxwQko1yuc/Xk13oFCeCRjCWDBKMDph3Vm5ruBIMQEOF3O92oTvHK
 ckXVuJZo7tPGQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YN2PD2H9Fz6tvc;
 Tue, 31 Dec 2024 20:01:04 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: "N. Jackson" <njackson@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <87frm3elkr.fsf@Phoenix>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix>
Date: Tue, 31 Dec 2024 19:02:35 +0000
Message-ID: <878qrvhe0k.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: Eli Zaretskii <eliz@HIDDEN>, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

"N. Jackson" <njackson@HIDDEN> writes:

>> Or, alternatively, C-g in the middle of writing.
>
> I use C-g very frequently.  I type `M-x' and then realise I want to
> do `C-h f' first instead, so I do `C-g' to exit from the M-x prompt.
> Or I do an isearch and then change my mind (or find and read
> whatever I was looking for) then I do `C-g' (twice, I think) to exit
> the isearch and get back to where I started.  Usages like that.
> From my (probably naive) point of view, if that messes up Org Mode,
> then Org Mode is doing something wrong.

That should not be a problem then.
Reading/writing GC file is done using timer and, AFAIK, Emacs should not
run timers while you are running a command.

>> gc-lock.eld is a file used to flag that cache dir is being worked
>> on by multiple emacs instances. GC here refers to
>> garbage-collecting cache data.
>
> I do run multiple (two) instances of Emacs.  One is my normal
> session where I use Org quite heavily.  The other is my Gnus session
> in which I never open an Org file and never (as far as I know) use
> any Org features.

Gnus may load Org. (AFAIU, it does it when viewing gnus articles)

Another possible scenario is two Org instances writing to the same file
at the same time.
If it is what is happening in your case, your problem may be similar to 
https://list.orgmode.org/orgmode/CAMJKaZxA_VmLdFP_u1rNiF2s0X2kVivjT31jEM_r3BYCHri1PQ@HIDDEN/

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 31 Dec 2024 17:40:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 31 12:40:48 2024
Received: from localhost ([127.0.0.1]:36693 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tSgEZ-0007TP-JR
	for submit <at> debbugs.gnu.org; Tue, 31 Dec 2024 12:40:47 -0500
Received: from mout01.posteo.de ([185.67.36.65]:55735)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1tSgEW-0007T7-Td
 for 75209 <at> debbugs.gnu.org; Tue, 31 Dec 2024 12:40:46 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id E9DFD240027
 for <75209 <at> debbugs.gnu.org>; Tue, 31 Dec 2024 18:40:38 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1735666838; bh=r7CHo41W3VP2i1j0XdUwW4u567Ri6Em4f0OB/0dLZbg=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=kHAa9rF4TQNOqwiWx9HH9pTzaHxMASJ95dRLE57th81d/2vyIbT9HQYOr/eaXVvqb
 QPMqmU513L/3jqRj3x/cwKf/q4oCGYRSq2DRVlFYrUZgdjVZZ6Bsjq/vdB0iPuAptt
 WuWCHGffcLF5ieb47WxXHMetqRLNhViDoHoqvB/8UI3z6kzkTw0t1F752jFGc9Ozbx
 r1LQBpqFz6wERTrbnzFgQ+CZSeOMXWLTcncERMYnyEdwiJYI3t5Q6hfDimQAeS/fQ7
 8l29KvH6kJKwRulrLlEBGKjWkSq9KnjSiSmcNOnX4Oda5aqbrsJO0fHjdhGBlCMIXd
 yByOszvXj2ErQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YN0cN3nwWz9rxG;
 Tue, 31 Dec 2024 18:40:36 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
In-Reply-To: <864j2lnf1j.fsf@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
Date: Tue, 31 Dec 2024 17:42:07 +0000
Message-ID: <87ldvvhhqo.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org, "N. Jackson" <njackson@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> I don't know how to reproduce this.  The warning pops up seemingly
>> at random, often when the only visible window [before the *Warnings*
>> window appears] is NOT in Org mode.
>
> Ihor, any ideas or suggestions?  Should this be reported to the Org
> list first?

Sounds like Emacs being killed by force in the middle of writing to that
file. Or, alternatively, C-g in the middle of writing.

If that's kill -9 or similar, I would not call this unexpected.

gc-lock.eld is a file used to flag that cache dir is being worked on by
multiple emacs instances. GC here refers to garbage-collecting cache data.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 30 Dec 2024 20:01:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 30 15:01:44 2024
Received: from localhost ([127.0.0.1]:60140 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tSLxO-0004bc-VT
	for submit <at> debbugs.gnu.org; Mon, 30 Dec 2024 15:01:44 -0500
Received: from eggs.gnu.org ([209.51.188.92]:48998)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tSLxL-0004bM-W6
 for 75209 <at> debbugs.gnu.org; Mon, 30 Dec 2024 15:01:41 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tSLxG-0005fq-0G; Mon, 30 Dec 2024 15:01:34 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=aDwCUbUX9TDfXfo1kfAAW4YYuK5XZTAib/k9HQqG8cQ=; b=E/JkEQCO98NI
 MfsG3ts2RVgYgXO6+FbvMv/2mHSPn1Yh6eCnthZrXlct/S62iNQI7u9a57HNalrVVuaXLp5eXuR3S
 2C/FERy/QYfuK1k1iu/L663goYoDuTI0wAQpN9DnUgg4vcWMxF1p3c2UyfFUT/93Lk3wmw8LSA1tB
 EBNC9y1oodm2wuCNXuBWMZyBIqXH15UKCRmOvt9rPbuPdbLis4JJLjSWk5SwjtmdW5nZenuR2Abum
 LzJW8BQWEfw7AzuHwIr/ZBE/3zy7maDpCrBuXH+95MnvacwW3yZ1YB1hE5VsxIPKne0HXycV/7jIq
 +Mp2Uf2ZQGDv7WyUkUipwA==;
Date: Mon, 30 Dec 2024 22:01:30 +0200
Message-Id: <86zfkdlz39.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: "N. Jackson" <njackson@HIDDEN>
In-Reply-To: <87zfkddk1l.fsf@Phoenix> (njackson@HIDDEN)
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@HIDDEN>
 <87zfkddk1l.fsf@Phoenix>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: yantar92@HIDDEN, 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: "N. Jackson" <njackson@HIDDEN>
> Cc: Ihor Radchenko <yantar92@HIDDEN>,  75209 <at> debbugs.gnu.org
> Date: Mon, 30 Dec 2024 19:53:42 +0000
> 
> At 21:31 +0200 on Monday 2024-12-30, Eli Zaretskii wrote:
> 
> >> From: "N. Jackson" <njackson@HIDDEN>
> >> Date: Mon, 30 Dec 2024 18:48:31 +0000
> >> 
> >>   Warning (emacs): Emacs reader failed to read data in
> >>   "/home/nlj/.cache/org-persist/gc-lock.eld". The error was: "End
> >>   of file during parsing"
> 
> > Does the file exist?  If so, what is its content (assuming you can
> > post it here)?
> 
> It exists and currently has the following contents:
> 
>   ;;   -*- mode: lisp-data; -*-
>   (((26482 57035 301257 992000) 26482 60639 74163 973000) ((26482 62694 821331 522000) 26482 62698 583212 450000))

This one seems okay.  I guess we need to wait for the warning and see
then?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at 75209 <at> debbugs.gnu.org:


Received: (at 75209) by debbugs.gnu.org; 30 Dec 2024 19:31:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 30 14:31:48 2024
Received: from localhost ([127.0.0.1]:60035 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tSLUR-000312-Un
	for submit <at> debbugs.gnu.org; Mon, 30 Dec 2024 14:31:48 -0500
Received: from eggs.gnu.org ([209.51.188.92]:39966)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tSLUP-00030j-K1
 for 75209 <at> debbugs.gnu.org; Mon, 30 Dec 2024 14:31:46 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tSLUI-0002lP-BX; Mon, 30 Dec 2024 14:31:38 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=P/ffCiv2uNu068VLNrVybQXeM/GVJj/pbIowgatHymE=; b=rwwh0xEQ3Yhj
 2SczFSwSYZF/XvDBKxcg8u55+59A/8U+t6r9CyBNM5EFClu3UVCw7dWqlGAU6/iJimICbgIUgK6lh
 llLClY4V7r34/DPixkSyR7TMHJnd0MuT/0HGtdNQ1XIZ5iEXxUkV/An0J0IXRiAwvPw7dhU1Mb4YT
 cnm+tPnwklOuxnmjbyvB4Zm5B31A8gs55TTQ6bn65MJZEtyw13Kco4i1Y9VTrOh0bFUgzbSJ5cT7d
 6aoUpoBU3BafjUfdc0a6dbX15HWCm4vYxh0Fx+9+MaD9I/cjVqdU0UZxgptFCYg1TrJzhqDOBhu0I
 DH1gXS0tf1mdmhcYbOEVCw==;
Date: Mon, 30 Dec 2024 21:31:36 +0200
Message-Id: <864j2lnf1j.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: "N. Jackson" <njackson@HIDDEN>, Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <878qrxgg74.fsf@Phoenix> (njackson@HIDDEN)
Subject: Re: bug#75209: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
References: <878qrxgg74.fsf@Phoenix>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: 75209 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: "N. Jackson" <njackson@HIDDEN>
> Date: Mon, 30 Dec 2024 18:48:31 +0000
> 
> In the Emacs 30 pretest I have been getting the following warning
> every few days:
> 
>   Warning (emacs): Emacs reader failed to read data in
>   "/home/nlj/.cache/org-persist/gc-lock.eld". The error was: "End of
>   file during parsing"
> 
> The `gc-lock' part suggests this might have something to do with
> garbage collection, whereas `org-persist' suggests Org mode, but
> I could find nothing in the Org manual about org-persist or about
> gc-lock.

Does the file exist?  If so, what is its content (assuming you can
post it here)?

> I don't know how to reproduce this.  The warning pops up seemingly
> at random, often when the only visible window [before the *Warnings*
> window appears] is NOT in Org mode.

Ihor, any ideas or suggestions?  Should this be reported to the Org
list first?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 Dec 2024 18:48:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 30 13:48:47 2024
Received: from localhost ([127.0.0.1]:59965 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tSKoo-0000t5-C4
	for submit <at> debbugs.gnu.org; Mon, 30 Dec 2024 13:48:46 -0500
Received: from lists.gnu.org ([209.51.188.17]:37448)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <njackson@HIDDEN>) id 1tSKok-0000sp-GS
 for submit <at> debbugs.gnu.org; Mon, 30 Dec 2024 13:48:45 -0500
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 <njackson@HIDDEN>)
 id 1tSKoj-0000tj-TU
 for bug-gnu-emacs@HIDDEN; Mon, 30 Dec 2024 13:48:42 -0500
Received: from mout02.posteo.de ([185.67.36.66])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <njackson@HIDDEN>)
 id 1tSKoh-0006L3-6C
 for bug-gnu-emacs@HIDDEN; Mon, 30 Dec 2024 13:48:41 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id B8614240101
 for <bug-gnu-emacs@HIDDEN>; Mon, 30 Dec 2024 19:48:33 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1735584513; bh=96Ze+2l3llknIQF1t34bsNjbPSNJi4hxxcObU7iODfA=;
 h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From;
 b=MR16RH7SfKaaQzGf0I7R495YVG3wKlZdQL8XrpGIR1vVwMLMlYjj9o/epCKroRc3N
 H7xusaaJACI1NDjgfta5CijdMAcGX+/f+rUkrJV0LZcNXyDXc5tWkt70R85MOcgWJF
 jCL8nAd3cHZ6vIwNDldiZ831Ou/gCty0eOsOaa6ViDeiRGb1pOYSZ6cp/LrdaYPakn
 t5OAbIfeqto36XwJJFoG1oXT72xy8AtxRi+XNkEFd4/tuBywrTUtRi7RohVIl1bzye
 deMYZFzgsi1vx/BLjBt17MLmjmXG1IlexowG1vxCcM7o+/hXgNnB4i7EgkiK4I+mYY
 G+Zb8Lr0keugA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YMQ9D4NJyz9rxM;
 Mon, 30 Dec 2024 19:48:32 +0100 (CET)
From: "N. Jackson" <njackson@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.93; Emacs reader failed to read data in
 "/home/nlj/.cache/org-persist/gc-lock.eld"
Date: Mon, 30 Dec 2024 18:48:31 +0000
Message-ID: <878qrxgg74.fsf@Phoenix>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=185.67.36.66; envelope-from=njackson@HIDDEN;
 helo=mout02.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,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

In the Emacs 30 pretest I have been getting the following warning
every few days:

  Warning (emacs): Emacs reader failed to read data in
  "/home/nlj/.cache/org-persist/gc-lock.eld". The error was: "End of
  file during parsing"

The `gc-lock' part suggests this might have something to do with
garbage collection, whereas `org-persist' suggests Org mode, but
I could find nothing in the Org manual about org-persist or about
gc-lock.

I don't know how to reproduce this.  The warning pops up seemingly
at random, often when the only visible window [before the *Warnings*
window appears] is NOT in Org mode.


In GNU Emacs 30.0.93 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.43, cairo version 1.18.0) of 2024-12-20 built on fedora
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 40 (Xfce)

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
JPEG LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM GTK3
ZLIB

Important settings:
  value of $LANG: en_CA.utf8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Text

Minor modes in effect:
  TeX-PDF-mode: t
  flyspell-mode: t
  recentf-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  savehist-mode: t
  save-place-mode: t
  electric-pair-mode: t
  display-time-mode: t
  display-battery-mode: t
  desktop-save-mode: t
  delete-selection-mode: t
  cua-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  temp-buffer-resize-mode: t
  abbrev-mode: t

Load-path shadows:
None found.

Features:
(shadow sort bbdb-message mail-extr emacsbug message puny rfc822 mml
mml-sec epa epg rfc6068 epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils mule-util cdlatex
reftex reftex-loaddefs reftex-vars dired-aux dired dired-loaddefs
emacs-news-mode bug-reference display-fill-column-indicator
display-line-numbers tex-mode font-latex latexenc preview
latex-mode-expansions latex edmacro latex-flymake flymake warnings
tex-ispell tex-style tex texmathp auctex yank-media oc-basic bibtex
iso8601 org-habit vc-git diff-mode track-changes easy-mmode
vc-dispatcher flyspell ispell kmacro mines derived cookie1 gamegrid
transpar expand-region text-mode-expansions the-org-mode-expansions
python-el-fgallina-expansions er-basic-expansions expand-region-core
expand-region-custom hydra advice lv compile text-property-search
org-clock comp-run comp-common org-agenda org-element org-persist
xdg org-id org-element-ast inline avl-tree generator org-refile org
org-macro org-pcomplete org-list org-footnote org-faces org-entities
time-date noutline outline ob-shell shell pcomplete ob-R ob-python
python project compat ob-plantuml ob-org ob-gnuplot ob-ditaa ob-calc
calc-store calc-trail calc-ext calc calc-loaddefs rect calc-macs
ob-awk ob-dot ob-maxima ob ob-tangle org-src sh-script smie treesit
executable ob-ref ob-lob ob-table ob-exp ob-comint comint ansi-osc
ansi-color ring ob-emacs-lisp ob-core ob-eval org-cycle org-table
org-keys oc org-loaddefs thingatpt find-func ol org-fold
org-fold-core org-compat org-version org-macs bbdb-anniv diary-lib
diary-loaddefs cal-menu calendar cal-loaddefs bbdb-com crm
mailabbrev bbdb bbdb-site timezone recentf tree-widget cus-edit pp
wid-edit ido format-spec modus-vivendi-theme modus-themes
yasnippet-classic-snippets cl-extra yasnippet help-mode savehist
saveplace company pcase elec-pair time battery dbus xml desktop
frameset delsel cua-base cus-load ace-window-autoloads
auctex-autoloads tex-site avy-autoloads bbdb-autoloads
cdlatex-autoloads company-autoloads csv-mode-autoloads
debbugs-autoloads ess-autoloads expand-region-autoloads
geiser-autoloads info orderless-autoloads rx sql-indent-autoloads
yasnippet-autoloads package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source
cl-seq eieio eieio-core cl-macs icons password-cache json subr-x map
byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock
syntax font-core term/tty-colors frame minibuffer nadvice seq simple
cl-generic indonesian philippine cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded
button loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads
dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty
move-toolbar make-network-process native-compile emacs)

Memory information:
((conses 16 874702 109492) (symbols 48 33757 0) (strings 32 141824 6883)
 (string-bytes 1 4270475) (vectors 16 88842)
 (vector-slots 8 1784278 36799) (floats 8 367 91)
 (intervals 56 24167 1981) (buffers 984 43))




Acknowledgement sent to "N. Jackson" <njackson@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#75209; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 10 Feb 2025 18:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.