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; 15 Mar 2025 17:44:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 13:44:37 2025
Received: from localhost ([127.0.0.1]:43433 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttVYq-0001J0-ND
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 13:44:37 -0400
Received: from mout01.posteo.de ([185.67.36.65]:58061)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1ttVYn-0001If-8i
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 13:44:34 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id A515A240027
 for <75209 <at> debbugs.gnu.org>; Sat, 15 Mar 2025 18:44:26 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1742060666; bh=1PQ14ZCjVWhGVo4IQ92HE/F5ulCfCDMpNAzf7Atz5c0=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=QrMgXXXnadDLBg/m2eU7s/aAdk1I7NaYjZGXtIltBQ1/s+PTlGTOLPxM3Q4vGDxHb
 wjIwqMh079RzpoUHTwxTT3NpVI6iVNvLcNTuFXLFSl0wxkd3w0JPSXiaKtnkL80MBN
 YhoO9BnJwZ8YxZdIwtYAxIYjpBC7oQvqAIQ52QvV4VH3OmnLdhSe2CHyRVs+8gjIxe
 sB6eqk+uJzuzmxLWnhh2kyekeYblVKVDx5AC4C9HLQXp8lOQHYerslNkLm/5/kfixf
 IoFOl40cKAPSm2uOkDh4Texyg/1rcMuz5dSAYAfD6JpMF43ZCEGqV9V5r4mHcVcLVj
 PCTXiFzwG7Luw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4ZFTBd57YKz6tyw;
 Sat, 15 Mar 2025 18:44:25 +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: <87r02y42jz.fsf@Phoenix>
References: <878qrxgg74.fsf@Phoenix> <87h66dpfeq.fsf@localhost>
 <878qrh1m59.fsf@localhost> <86zfjxxvvg.fsf@HIDDEN>
 <87y0zepvyz.fsf@Phoenix> <86a5bfw9yu.fsf@HIDDEN> <87r04qquc2.fsf@Phoenix>
 <87zfj1d1pv.fsf@localhost> <871pw6fzti.fsf@Phoenix>
 <87ldudvfvd.fsf@localhost> <87ed00fwts.fsf@Phoenix>
 <87wmdjtj34.fsf@Phoenix> <87h64k34b7.fsf@localhost>
 <874izuij0k.fsf@localhost> <86frjewjgn.fsf@HIDDEN>
 <87y0x6h2rp.fsf@localhost> <86bju2wi1a.fsf@HIDDEN>
 <87frjejr27.fsf@Phoenix> <865xkawau4.fsf@HIDDEN>
 <877c4qgtyf.fsf@localhost> <87r02y42jz.fsf@Phoenix>
Date: Sat, 15 Mar 2025 17:43:49 +0000
Message-ID: <87msdmfaui.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:

> By the way, the previous diff (for the atomic write juggle for
> Windows systems) results in errors like these:
>
> Error running timer `org-persist--refresh-gc-lock': (file-already-exists "File already exists" "/tmp/org-persist-1p8805")
> ...
> I think you need the 'overwrite flag in the call to rename-file.
> I.e.:
>
>       (let ((tmp-file-2 (make-temp-file "org-persist-")))
>         ;; Just renaming may still not be atomic on Windows, so we do
>         ;; a bit more complex juggle.
>         (rename-file file tmp-file-2 'overwrite)
>         (rename-file tmp-file file 'overwrite)
>         (delete-file tmp-file-2)))

Ouch. Not 'overwrite flag, but `make-temp-name' instead of `make-temp-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; 15 Mar 2025 17:38:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 13:38:38 2025
Received: from localhost ([127.0.0.1]:43421 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttVT4-0000tD-Cp
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 13:38:38 -0400
Received: from mout02.posteo.de ([185.67.36.66]:60209)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1ttVT2-0000sf-0D
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 13:38:36 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 8BE64240101
 for <75209 <at> debbugs.gnu.org>; Sat, 15 Mar 2025 18:38:28 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1742060308; bh=uSKDV9ONo0PHXsH0HS8Uie/MPBjJ2burpUDAHF8RP0w=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=Il8ycYW9rHp27/u0vpwdpduHsFMIUd8PoHhNw6SxxxtEBuzrLzOjniMqcW/neJARg
 NL/S5mk/EX/LT3uuZAQKRvoqXO6T3NbMw2PKkjtOaJrQWhhMInpkCzYSylSu6z8NaF
 WHjaGVVUZDX71SHfqU23WrpaQpuHeJawVBlqXHixvkNY77BCSgW8qlDgYOxwQ9tM/Y
 6CQFu0FcoA3g7R0H9DkvWkLtXV70sEYVu9nl15aoSV1LelJgA0c2ujnPwQdZBtXhJ3
 6fykVgoI+tYvwSMA6CJBlYmfgR/6qXpcICxsA1QW0L2oLs98BgiEWpn6czC8BczvZW
 x1QK8Cs2p1dKQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4ZFT3j6M1Mz6twJ;
 Sat, 15 Mar 2025 18:38:25 +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: <877c4qgtyf.fsf@localhost> (Ihor Radchenko's message of "Sat, 15
 Mar 2025 16:05:44 +0000")
References: <878qrxgg74.fsf@Phoenix> <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>
 <87ldudvfvd.fsf@localhost> <87ed00fwts.fsf@Phoenix>
 <87wmdjtj34.fsf@Phoenix> <87h64k34b7.fsf@localhost>
 <874izuij0k.fsf@localhost> <86frjewjgn.fsf@HIDDEN>
 <87y0x6h2rp.fsf@localhost> <86bju2wi1a.fsf@HIDDEN>
 <87frjejr27.fsf@Phoenix> <865xkawau4.fsf@HIDDEN>
 <877c4qgtyf.fsf@localhost>
Date: Sat, 15 Mar 2025 17:38:24 +0000
Message-ID: <87r02y42jz.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 16:05 +0000 on Saturday 2025-03-15, Ihor Radchenko wrote:
>
> The attached diff does it. Need to test.
>
> diff --git a/lisp/org-persist.el b/lisp/org-persist.el
> index a639699d93..c0a0dd53d6 100644
> --- a/lisp/org-persist.el
> +++ b/lisp/org-persist.el
> @@ -474,7 +474,7 @@ (defun org-persist--write-elisp-file
>    ;;
>    ;; To read more about this, see the comments in Emacs's fileio.c, in
>    ;; particular the large comment block in init_fileio.
> -  (let ((write-region-inhibit-fsync t)
> +  (let ((write-region-inhibit-fsync nil)
>          ;; We set UTF-8 here and in `org-persist--read-elisp-file'
>          ;; to avoid the overhead from `find-auto-coding'.
>          (coding-system-for-write 'emacs-internal)

I will test this diff and report back.

By the way, the previous diff (for the atomic write juggle for
Windows systems) results in errors like these:

Error running timer `org-persist--refresh-gc-lock': (file-already-exists "File already exists" "/tmp/org-persist-1p8805")
Error running timer `org-persist--refresh-gc-lock': (file-already-exists "File already exists" "/tmp/org-persist-CkTLDc")
Error running timer `org-persist--refresh-gc-lock': (file-already-exists "File already exists" "/tmp/org-persist-K9qMAt")
Error running timer `org-persist--refresh-gc-lock': (file-already-exists "File already exists" "/tmp/org-persist-ho8aMe")
Error running timer `org-persist--refresh-gc-lock': (file-already-exists "File already exists" "/tmp/org-persist-2Kz2sK")

I think you need the 'overwrite flag in the call to rename-file.
I.e.:

      (let ((tmp-file-2 (make-temp-file "org-persist-")))
        ;; Just renaming may still not be atomic on Windows, so we do
        ;; a bit more complex juggle.
        (rename-file file tmp-file-2 'overwrite)
        (rename-file tmp-file file 'overwrite)
        (delete-file tmp-file-2)))






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; 15 Mar 2025 16:06:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 12:06:33 2025
Received: from localhost ([127.0.0.1]:43257 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttU1w-0004oM-Qe
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 12:06:33 -0400
Received: from mout01.posteo.de ([185.67.36.65]:36811)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1ttU1r-0004nL-Aq
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 12:06:28 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 21B1E240027
 for <75209 <at> debbugs.gnu.org>; Sat, 15 Mar 2025 17:06:20 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1742054781; bh=275UUyegtTf0XUEFbxG5FzDVfUFWRSDfgffkH+u2KQc=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=E3cdc+egBeNh4OXZ1v0dYJHQ5fEWAfrS682wNwrF7LT72ugD+/x62QG4x+UkSP/Sy
 3rn1FjlwJr5lPEJ67rrOtQAkFL4/zIVLqbW6WkpQAaS21uUl2VijLQaAs5ScFGy+iY
 rFwXc/BEA49Olzu5cJWeYtMKFxCWKYQ7H58WYySanZHquuHc4rvPjwBsbTm70Z2vQb
 mH86KPcQzKpWKX7vweBzBOMf1VcRd9ah1gJqKWZbiBZ+6t8HQrRqd+5hI4RxUShGUn
 zVHKGjU09HHVmwTdHj1677mUDkAKvwEtbWNHjlXQX/1fkKgahic4MYjs+qxjlRVvE3
 5QPDQNDK5xQ8A==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4ZFR1S3Hdjz6tvk;
 Sat, 15 Mar 2025 17:06:20 +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: <865xkawau4.fsf@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <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>
 <87ldudvfvd.fsf@localhost> <87ed00fwts.fsf@Phoenix>
 <87wmdjtj34.fsf@Phoenix> <87h64k34b7.fsf@localhost>
 <874izuij0k.fsf@localhost> <86frjewjgn.fsf@HIDDEN>
 <87y0x6h2rp.fsf@localhost> <86bju2wi1a.fsf@HIDDEN>
 <87frjejr27.fsf@Phoenix> <865xkawau4.fsf@HIDDEN>
Date: Sat, 15 Mar 2025 16:05:44 +0000
Message-ID: <877c4qgtyf.fsf@localhost>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
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 (---)

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

Eli Zaretskii <eliz@HIDDEN> writes:

> Hmm... but now I see that the previous code already renamed the file
> with the new data after the new data was completely written, is that
> right?  If so, I don't think this last change will help, and we need
> to understand how come rename-file doesn't already solve this problem.

Yes, it is right.
You suggested using write to temporary file -> rename method earlier and
I implemented it.

> Is the file being read and written a regular file or a symlink?

Regular file.

> One thing to try is to let-bind write-region-inhibit-fsync to a nil
> value around the code which writes the data to the org-persist file.
> Maybe we have some tricky race condition between the filesystem
> flushing its buffer after one instance of Emacs wrote the file, and
> the other instance of Emacs that opens the file for reading.

The attached diff does it. Need to test.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=enable-fsync.diff

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index a639699d93..c0a0dd53d6 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -474,7 +474,7 @@ (defun org-persist--write-elisp-file
   ;;
   ;; To read more about this, see the comments in Emacs's fileio.c, in
   ;; particular the large comment block in init_fileio.
-  (let ((write-region-inhibit-fsync t)
+  (let ((write-region-inhibit-fsync nil)
         ;; We set UTF-8 here and in `org-persist--read-elisp-file'
         ;; to avoid the overhead from `find-auto-coding'.
         (coding-system-for-write 'emacs-internal)

--=-=-=
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; 15 Mar 2025 15:52:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 11:52:27 2025
Received: from localhost ([127.0.0.1]:43200 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttToF-0000L2-Sa
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 11:52:27 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:49148)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ttToB-0000Jr-JX
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 11:52:21 -0400
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 1ttTo2-0005jd-4C; Sat, 15 Mar 2025 11:52:11 -0400
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=uZ9eIeWDt47Ohy6Q/04HLRBIc7hF/ALN8yZQ0r6CW/s=; b=Vrkz4vU9HlS0
 Mfh1ij9w22A3k8m1Vbag/uOx3KoQaeVFfeN7qiA4eaeiKmKYSzP1IxgHz/cVrTqwjuZSNkeZ5YEt5
 OyAhWAWLO/VOsmxsfJBwzGx3GS90xYx4LHPbEU+qVtAP7vhCd30VWPIcrHrq61kMkFpO9wE4W22eS
 5q8Bphj7c07ugwLpWiytmVrFA4PmuxISIAo4F+05e8CXU9vdfvOSPpnjRvsiqCDJJN9JWB9YIWyqo
 fKMin5Y1RABfsTAZmGLJFRTtnn+l9LPJD4RO18mFJWLPzUG3v9QU+400HXaxYHULOi/Z7PRQyuK/6
 aD8+OsCWSJrHF1We37DhNg==;
Date: Sat, 15 Mar 2025 17:52:03 +0200
Message-Id: <865xkawau4.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: "N. Jackson" <njackson@HIDDEN>
In-Reply-To: <87frjejr27.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> <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> <87ldudvfvd.fsf@localhost>
 <87ed00fwts.fsf@Phoenix> <87wmdjtj34.fsf@Phoenix>
 <87h64k34b7.fsf@localhost> <874izuij0k.fsf@localhost>
 <86frjewjgn.fsf@HIDDEN> <87y0x6h2rp.fsf@localhost>
 <86bju2wi1a.fsf@HIDDEN> <87frjejr27.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: Sat, 15 Mar 2025 14:40:00 +0000
> 
> At 15:16 +0200 on Saturday 2025-03-15, Eli Zaretskii wrote:
> 
> >> See the attached diff.
> >> It should be applied on top of previous patches (or on top of the latest
> >> Org main).
> >
> > Thanks, I hope the OP could test this and tell if it makes the problem
> > go away for good.
> 
> I have applied the new patch and will report back.
> 
> I don't think it will help as I only have GNU/Linux systems at the
> moment and I think on such systems the earlier patch already made
> the write atomic.

Yes, I see that now, see below.

> I think what is needed is for the read to be atomic.

It is already atomic, because, as we've already established, the file
is smaller than 16KB, the size of the chunks read by
insert-file-contents in one go.

And if the replacement of the file is atomic, then how the file is
read cannot possibly matter.

Note: I'm not talking about writing to a file that is being read at
the same time, I'm talking about writing to a temporary file, and then
renaming that temporary file into the original name when all of the
new data has been written completely.  On Posix filesystems, as long
as the original file is open in some application, renaming another
file into that original one will NOT delete the original file or
replace it; instead, it will unlink the original file's data from its
directory entry, thus allowing the application that had it open to
keep reading from the original (now outdated) data.  Any application
that will attempt to open the original file's name will get the new
data.  IOW, the original data is still there, but it cannot be
accessed by any application that didn't have it open before the
rename.

> I might be
> completely wrong, but what it seems is happening is that one
> instance of Emacs starts a read and reads the first part of the
> existing file, then the other instance of Emacs writes the file
> (atomically), and then the first instance continues its read,
> getting the end of the new file.  So it gets the beginning of one
> version of the file and the end of another.

That cannot happen in the rename method described above.  So if the
problem still happens, there's some other factor at work here.

> Oughtn't there to be some sort locking mechanism so that the
> instance doing the read can lock the file and then the instance that
> is about to write the file can see that it shouldn't write it then
> and wait until the lock is cleared -- or something along those
> lines?

See above: Posix filesystems make that unnecessary.

Hmm... but now I see that the previous code already renamed the file
with the new data after the new data was completely written, is that
right?  If so, I don't think this last change will help, and we need
to understand how come rename-file doesn't already solve this problem.

Is the file being read and written a regular file or a symlink?

One thing to try is to let-bind write-region-inhibit-fsync to a nil
value around the code which writes the data to the org-persist file.
Maybe we have some tricky race condition between the filesystem
flushing its buffer after one instance of Emacs wrote the file, and
the other instance of Emacs that opens the file for reading.




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; 15 Mar 2025 14:40:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 10:40:15 2025
Received: from localhost ([127.0.0.1]:43063 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttSgQ-0002Lj-8Z
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 10:40:15 -0400
Received: from mout02.posteo.de ([185.67.36.66]:52923)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1ttSgM-0002If-Gq
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 10:40:12 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 54E89240101
 for <75209 <at> debbugs.gnu.org>; Sat, 15 Mar 2025 15:40:04 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1742049604; bh=/g0PRl+nU1S/BeX7XKvWWeig8nuP+TU6v8P6EoqDcFs=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=mbIxzZj7cy5BEZCJ7+TU6xvrRUf6xBZ6J6J4ajQftbo04F3bw8YqcrmMUZeT8Hecv
 AJ9KUvqX5kWfbYgKScXJ3R67Uhn76Nmq2CqjhuiENbIwGJyhwHjHJAvuI0shkhIlGM
 RrR1APrvMmQzRwbM8SrnDDlu0u3RH1kjAMGB5KudcMZEWmHGCQIbBn5lIXtR/3hE4J
 7mpozU68osFuGMx/tdin5xRdUMhs/s7XKZjZ5ezJ9oXfj730/pNI1CwbQ/H2Rug2Gg
 JkjwSUqkGPXgzoaj7Qvpj4PX9GFSUdMF+Mum/B7ATxvGZC/bJuieXKv1lxwV/pILI4
 DhWs44n1ATD1g==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4ZFP5v29qyz9rxG;
 Sat, 15 Mar 2025 15:40:02 +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: <86bju2wi1a.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 15 Mar
 2025 15:16:33 +0200")
References: <878qrxgg74.fsf@Phoenix> <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> <87ldudvfvd.fsf@localhost>
 <87ed00fwts.fsf@Phoenix> <87wmdjtj34.fsf@Phoenix>
 <87h64k34b7.fsf@localhost> <874izuij0k.fsf@localhost>
 <86frjewjgn.fsf@HIDDEN> <87y0x6h2rp.fsf@localhost>
 <86bju2wi1a.fsf@HIDDEN>
Date: Sat, 15 Mar 2025 14:40:00 +0000
Message-ID: <87frjejr27.fsf@Phoenix>
MIME-Version: 1.0
Content-Type: text/plain
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 (---)

At 15:16 +0200 on Saturday 2025-03-15, Eli Zaretskii wrote:

>> From: Ihor Radchenko <yantar92@HIDDEN>
>> Cc: njackson@HIDDEN, 75209 <at> debbugs.gnu.org
>> Date: Sat, 15 Mar 2025 12:55:22 +0000
>> 
>> Eli Zaretskii <eliz@HIDDEN> writes:
>> 
>> > Could the code which writes the file do it in atomic fashion,
>> > i.e. write a temporary file, then rename the original file, then move
>> > the new to the original's name, then delete the original file?
>> >
>> > (On Posix filesystems moving a file to the original name is an atomic
>> > operation, but not on MS-Windows, which is why I suggest a slightly
>> > more complicated procedure.)
>> 
>> See the attached diff.
>> It should be applied on top of previous patches (or on top of the latest
>> Org main).
>
> Thanks, I hope the OP could test this and tell if it makes the problem
> go away for good.

I have applied the new patch and will report back.

I don't think it will help as I only have GNU/Linux systems at the
moment and I think on such systems the earlier patch already made
the write atomic.

I think what is needed is for the read to be atomic.  I might be
completely wrong, but what it seems is happening is that one
instance of Emacs starts a read and reads the first part of the
existing file, then the other instance of Emacs writes the file
(atomically), and then the first instance continues its read,
getting the end of the new file.  So it gets the beginning of one
version of the file and the end of another.

Oughtn't there to be some sort locking mechanism so that the
instance doing the read can lock the file and then the instance that
is about to write the file can see that it shouldn't write it then
and wait until the lock is cleared -- or something along those
lines?





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; 15 Mar 2025 13:16:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 09:16:48 2025
Received: from localhost ([127.0.0.1]:39832 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttRNf-0001qM-Tr
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 09:16:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50660)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ttRNZ-0001px-Fw
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 09:16:42 -0400
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 1ttRNU-0004Y8-2f; Sat, 15 Mar 2025 09:16:36 -0400
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=PZIYTErwVTigdA2cbcQRWFSfA43VwsbQZsZ+Ir9JrlY=; b=hqh/EGjFdFCG
 Yr8LYi4/E0517XCr7vz98Y+48t8d3R/nIY3QmbsCZto5CiMRm308lhn4x+r2U37F40kcQJNFPmI/k
 dOOAz9ffgqOPb7gxGUclOtCwi5alATVb9zCZH1iDCs/ASiFqQI/2SN7s4TQCbw5X3Vgdf3VeiHK5d
 bk5kIdg1DuQABkII2NR4Mgywx4Uzd5K7uF5QiJymhOvy/TMBr1mZNGH6BUa3g+wMiSoLU479n0OKS
 tRWfosfLYy9GGWvb7biDmInymtMX6ZVjXblw3FS7GhzRJA9zeJvEi+01O/8iK5PbzL52pdJMcwNZ1
 Oc+PGJyFd3+jpi/tD8iQJw==;
Date: Sat, 15 Mar 2025 15:16:33 +0200
Message-Id: <86bju2wi1a.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <87y0x6h2rp.fsf@localhost> (message from Ihor Radchenko on Sat,
 15 Mar 2025 12:55: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> <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>
 <87ldudvfvd.fsf@localhost> <87ed00fwts.fsf@Phoenix>
 <87wmdjtj34.fsf@Phoenix> <87h64k34b7.fsf@localhost>
 <874izuij0k.fsf@localhost> <86frjewjgn.fsf@HIDDEN> <87y0x6h2rp.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: Sat, 15 Mar 2025 12:55:22 +0000
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > Could the code which writes the file do it in atomic fashion,
> > i.e. write a temporary file, then rename the original file, then move
> > the new to the original's name, then delete the original file?
> >
> > (On Posix filesystems moving a file to the original name is an atomic
> > operation, but not on MS-Windows, which is why I suggest a slightly
> > more complicated procedure.)
> 
> See the attached diff.
> It should be applied on top of previous patches (or on top of the latest
> Org main).

Thanks, I hope the OP could test this and tell if it makes the problem
go away for good.




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; 15 Mar 2025 12:56:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 08:56:09 2025
Received: from localhost ([127.0.0.1]:39724 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttR3g-0000N6-TZ
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 08:56:09 -0400
Received: from mout01.posteo.de ([185.67.36.65]:53707)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1ttR3d-0000Mg-Aw
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 08:56:07 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id E852F240027
 for <75209 <at> debbugs.gnu.org>; Sat, 15 Mar 2025 13:55:58 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1742043358; bh=8KhNliinlwJTXaoXQGbqm6MCcpGlpH70rQONFVDhlB4=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=X78svdfLSKkJxP2jgs0TSejYPzPphxtsek5/o4TPfwMsPwKI5k1lvZAVOVk+C9R8i
 xLAxo1mMwm7n2Zi7ZtsgXaACMfii2wbUehzouMX+Xooz7w7UR2HUrVkgQMJNEef+RG
 v1QNHCPu+hjKHR31DrebXKapObguP9zGsa9OlRTb5f20RRkp3uwRw+NXRpIGb2qcd+
 gEmoPDVUvK+4FbJOVuTfjSPB/zzGIx0zN06ClqdnU14Zr2eILOp/7GajF2ZKYAK1rW
 sXqTlIMbJ0T3NZsIS5n70yc5mdqhmpIcgtw84Zk7eo9Lnv0ObCWgok3dVexUMQRKyX
 9/WC7GJ56nyIw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4ZFLnp3YDYz6tw5;
 Sat, 15 Mar 2025 13:55: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: <86frjewjgn.fsf@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <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>
 <87ldudvfvd.fsf@localhost> <87ed00fwts.fsf@Phoenix>
 <87wmdjtj34.fsf@Phoenix> <87h64k34b7.fsf@localhost>
 <874izuij0k.fsf@localhost> <86frjewjgn.fsf@HIDDEN>
Date: Sat, 15 Mar 2025 12:55:22 +0000
Message-ID: <87y0x6h2rp.fsf@localhost>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
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 (---)

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

Eli Zaretskii <eliz@HIDDEN> writes:

> Could the code which writes the file do it in atomic fashion,
> i.e. write a temporary file, then rename the original file, then move
> the new to the original's name, then delete the original file?
>
> (On Posix filesystems moving a file to the original name is an atomic
> operation, but not on MS-Windows, which is why I suggest a slightly
> more complicated procedure.)

See the attached diff.
It should be applied on top of previous patches (or on top of the latest
Org main).


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

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index a639699d93..202c5e645b 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -506,7 +506,12 @@ (defun org-persist--write-elisp-file
             (let ((pp-use-max-width nil)) ; Emacs bug#58687
               (pp data (current-buffer)))
           (prin1 data (current-buffer))))
-      (rename-file tmp-file file 'overwrite)
+      (let ((tmp-file-2 (make-temp-file "org-persist-")))
+        ;; Just renaming may still not be atomic on Windows, so we do
+        ;; a bit more complex juggle.
+        (rename-file file tmp-file-2)
+        (rename-file tmp-file file)
+        (delete-file tmp-file-2))
       (org-persist--display-time
        (- (float-time) start-time)
        "Writing to %S" file))))

--=-=-=
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; 15 Mar 2025 12:45:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 08:45:58 2025
Received: from localhost ([127.0.0.1]:39689 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttQtp-0008K8-Ti
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 08:45:58 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:58150)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ttQtm-0008Jn-B4
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 08:45:55 -0400
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 1ttQtg-0001Nx-Cc; Sat, 15 Mar 2025 08:45:48 -0400
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=1Uoap4q71yk7hk0MOlim3i0RRjep6rMB+eDmg5epxOA=; b=BPprfnuejhKh
 1VewhNjNK6Kf/0DT1WcxupTyaP2v0eNyeAEpYCpBhW5gY534824B7WcCKon31188shRH7TF0DFAGn
 6C54mT6/96z0cmThoInFetlh9tVvHmu9O1HqYijuu9L9SAx5gem+pXWKxus48Nq8Qr+pgBV1uoEaH
 fBPyIUpSo9NqCaPK8aAAAFyUdLod5yZPankQBhbYIiVhdLDtLZJgLh6OxzAukXYVwCAzKOe8rHeP1
 4kCGgK2HycN3serLEBTl0bWtDccs2lwkVq4ow+qzc6tJj98g7n5omETGIwazh84BJzTnqQ3Zk0voZ
 0FsCcXfxcPh9hJN+GgnQCQ==;
Date: Sat, 15 Mar 2025 14:45:44 +0200
Message-Id: <86frjewjgn.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <874izuij0k.fsf@localhost> (message from Ihor Radchenko on Sat,
 15 Mar 2025 12:19:07 +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> <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>
 <87ldudvfvd.fsf@localhost> <87ed00fwts.fsf@Phoenix>
 <87wmdjtj34.fsf@Phoenix> <87h64k34b7.fsf@localhost> <874izuij0k.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: Sat, 15 Mar 2025 12:19:07 +0000
> 
> Ihor Radchenko <yantar92@HIDDEN> writes:
> 
> > Never returned likely means that it threw an error.
> > Most likely because
> >
> > (setf (alist-get before-init-time alist nil nil #'equal)
> >             (current-time))
> > will fail when ALIST is nil. I should fix this.
> 
> I was wrong. if ALIST is nil, the above code should work just fine.
> So, it looks like all the problems boil down to incomplete read.

Could the code which writes the file do it in atomic fashion,
i.e. write a temporary file, then rename the original file, then move
the new to the original's name, then delete the original file?

(On Posix filesystems moving a file to the original name is an atomic
operation, but not on MS-Windows, which is why I suggest a slightly
more complicated procedure.)




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; 15 Mar 2025 12:40:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 08:40:10 2025
Received: from localhost ([127.0.0.1]:39665 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttQoE-0007xf-1r
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 08:40:10 -0400
Received: from mout01.posteo.de ([185.67.36.65]:33673)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1ttQoB-0007ww-9S
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 08:40:08 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id DA5FC240027
 for <75209 <at> debbugs.gnu.org>; Sat, 15 Mar 2025 13:39:59 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1742042399; bh=lT2GWgdhC58CeXTmhc34hENA6ebAtKiuFdrROC6DDGg=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=iSuDqy/vwOrIkLrtu3pyCG5sW5mw0vDUvC5LGPOHLlbhzf7V9CgGg76BPU37qLVeV
 7ICuvAsI+xp2nhQ/apd26hkFaYCTHx9x6BMjy2qU3xLFWmY3ZvzGpbjuqHvcmA7Jyh
 HaRZTEzuxCcCf126qIxtpYIf62GHeZon8gQLmPdq5w/aUgHYR+7gfsWTKfvEnkjFdz
 wJVE+xuX0iYYnHfkW1DJQRDlael7dw8QSWfXMXtrbPVHdgGD5S0MtKIT1V+81i4bXr
 GA+dvwmuo6yCkENfJUyayT4arfjMFCvwU7QVFZ3NnSQlFoDLIn/FkbYfcMOL9kgoZY
 jEQQ4ERrTnIxw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4ZFLRM31Tmz9rxS;
 Sat, 15 Mar 2025 13:39:59 +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: <86jz8qwk15.fsf@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <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> <87ldudvfvd.fsf@localhost>
 <87ed00fwts.fsf@Phoenix> <87wmdjtj34.fsf@Phoenix>
 <87h64k34b7.fsf@localhost> <86a59my2hg.fsf@HIDDEN>
 <877c4qilq3.fsf@localhost> <86jz8qwk15.fsf@HIDDEN>
Date: Sat, 15 Mar 2025 12:39:23 +0000
Message-ID: <871puyii2s.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:

>> Any chance to make `insert-file-contents' (or a new function) atomic?
>
> As a temporary measure to investigate this bug, maybe.  Otherwise, no.

Then, I am kind of out of ideas.
The problems appear to be writing+reading the same file simultaneously
by different Emacs processes. The fact that Emacs reads the file
partially without ever notifying Elisp caller that something is off
sounds like a fundamental problem that cannot be addressed on Elisp level.

-- 
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; 15 Mar 2025 12:33:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 08:33:45 2025
Received: from localhost ([127.0.0.1]:39637 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttQi0-0007fk-NZ
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 08:33:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39162)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ttQhw-0007fQ-Uj
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 08:33:41 -0400
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 1ttQhr-0008Mi-EY; Sat, 15 Mar 2025 08:33:35 -0400
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=zs2uSDeMS8/AklDCVM0sg1vRkEMSE7NYgXtp6AixfPI=; b=em0gAga2bvUP
 njl9xyoyV00Kb9drpApH/QJtiuk7W1B0hQ4pVmNuyrl3KLu2A0Z7LbVnpp1IpeXDVm8S3esHkmwjO
 Ra77JVuaQ9KwLH797ZX1SuuEJXi+A3UOpVS11/G+e9+79rY1AEAy4uKNEax3TxfVwBzu8TO4qMnH/
 b6ZM4rRMUHpn/N2pca/nPts0iQ83gfoy9caPak/yfisYRzTLU5OJCue4ZBoIzv+CiE4LqI4hnHyj8
 SqeJxLu6qoRU2YjLIcx+pMqifk6kFaTkTH8ti/WORfDoJ2bywarMQ1LDcBL0VTxZ/aecW2P2teFb2
 GNzJG4eNRd8UxTl8/8CACw==;
Date: Sat, 15 Mar 2025 14:33:26 +0200
Message-Id: <86jz8qwk15.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <877c4qilq3.fsf@localhost> (message from Ihor Radchenko on Sat,
 15 Mar 2025 11:20:36 +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> <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> <87ldudvfvd.fsf@localhost>
 <87ed00fwts.fsf@Phoenix> <87wmdjtj34.fsf@Phoenix>
 <87h64k34b7.fsf@localhost> <86a59my2hg.fsf@HIDDEN> <877c4qilq3.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: Sat, 15 Mar 2025 11:20:36 +0000
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > Ping! How can we make some progress with this issue?
> 
> Any chance to make `insert-file-contents' (or a new function) atomic?

As a temporary measure to investigate this bug, maybe.  Otherwise, no.




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; 15 Mar 2025 12:19:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 08:19:59 2025
Received: from localhost ([127.0.0.1]:39583 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttQUe-0003tR-5D
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 08:19:59 -0400
Received: from mout01.posteo.de ([185.67.36.65]:59563)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1ttQUZ-0003t1-Bb
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 08:19:53 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 63B94240027
 for <75209 <at> debbugs.gnu.org>; Sat, 15 Mar 2025 13:19:44 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1742041185; bh=9LYh+vZ7j+zRuE+8s1mwFSvoJybscS/cpdtrp5UBJAk=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=LfCVhyDt9/WzvApvZELF+hah9EBQ9tdVuph28WIF8gtjQv9FRP8DRXKCp1Y7vZtaj
 zh3/RLTRTbLxqynOOUxaqXkoG5QDMybDB40KyBf4EM7/Px4FkfBioSW3uXfoud/upm
 cvQY726qjZLVq72j7/XPqQJpO3bty4QF11AblYvyqQRdHxkammQnTKUABzMxHJjlRz
 HR3Um4Wvh2l5z7SMSrNlh2ebpZex0Cyw1ldqrgQIweKsLETxzkXCMjkCmImH3xZbzN
 6nAwvUaAhIvUUqYdV2vQri5vQ44Cbaeyukhunhs6dBfojjxCw+3ALCKZc/sczJ32X/
 DL+a7AJXow4cQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4ZFKzz4XxRz6tw1;
 Sat, 15 Mar 2025 13:19:43 +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: <87h64k34b7.fsf@localhost>
References: <878qrxgg74.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>
 <87ldudvfvd.fsf@localhost> <87ed00fwts.fsf@Phoenix>
 <87wmdjtj34.fsf@Phoenix> <87h64k34b7.fsf@localhost>
Date: Sat, 15 Mar 2025 12:19:07 +0000
Message-ID: <874izuij0k.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 (---)

Ihor Radchenko <yantar92@HIDDEN> writes:

> Never returned likely means that it threw an error.
> Most likely because
>
> (setf (alist-get before-init-time alist nil nil #'equal)
>             (current-time))
> will fail when ALIST is nil. I should fix this.

I was wrong. if ALIST is nil, the above code should work just fine.
So, it looks like all the problems boil down to incomplete read.

-- 
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; 15 Mar 2025 11:21:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 07:21:31 2025
Received: from localhost ([127.0.0.1]:39178 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttPa5-0002NP-AK
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 07:21:31 -0400
Received: from mout02.posteo.de ([185.67.36.66]:49587)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1ttPZw-0002LQ-Se
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 07:21:22 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 80200240104
 for <75209 <at> debbugs.gnu.org>; Sat, 15 Mar 2025 12:21:14 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1742037674; bh=1wiB7jNQlhxwtKQzZ3w7C3M0TotgFx2r0zCj5gdN0Uw=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=ONBsLROgVNnqqKwr1/lVkbaC8xJ0+tLt20OksIx3HrD2Nm2VEylce4Bgx6EYFD5dF
 V1oq16caZf9JbCIqUEPdKZEnDeUgPuJxrkNboKbzqJL7ZjJlXr5hxU3jrNopGWetDD
 nXxiORrTPpPyxYdILhBppD1LKXIQyJRiDe3G41uKEnkM6O4SboC4/tboz2StzCq588
 bkG3vjSZJVYdSrGy60bzmL3nS2gBlUZVDkFnd4gnljomJCe7IisdPAXNggUxhbTR1J
 wG516bp4tMVk+hPd8Y/aARLjSkMHNF/H5CqG6Rds+yFEsHzzneKEp1uyqvWt0yW3PQ
 FPaX8ypvdjcxA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4ZFJhT0nPbz6v0b;
 Sat, 15 Mar 2025 12:21:12 +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: <86a59my2hg.fsf@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <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> <87ldudvfvd.fsf@localhost>
 <87ed00fwts.fsf@Phoenix> <87wmdjtj34.fsf@Phoenix>
 <87h64k34b7.fsf@localhost> <86a59my2hg.fsf@HIDDEN>
Date: Sat, 15 Mar 2025 11:20:36 +0000
Message-ID: <877c4qilq3.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:

> Ping! How can we make some progress with this issue?

Any chance to make `insert-file-contents' (or a new function) atomic?

-- 
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; 15 Mar 2025 11:09:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 07:09:43 2025
Received: from localhost ([127.0.0.1]:39106 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttPOg-0001Ka-88
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 07:09:43 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40422)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ttPOc-0001K9-NC
 for 75209 <at> debbugs.gnu.org; Sat, 15 Mar 2025 07:09:39 -0400
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 1ttPOX-0006tQ-CP; Sat, 15 Mar 2025 07:09:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=NrCbPJyqrEyLCN0XJVkMsmDJzrF9XNIZSP8P41eiWdY=; b=MPMEPC1PYlQOn0ugYBsj
 OTHpSg43/RF9m4OhAM4ZamTqnA707JyHm3FAlj28aGUg51vUqnJhP03F/H/uXOFq8Gkz9ui5fokLd
 jWDe+tIzPiASIUTpX+YF/s+ZXvDZrHC+nVf7nbHm5N7kUUlmvpL2fBHrtW8h80ZTIlk2j9FZV+zTK
 EvpSU2zPfDowZRGS8Wv0OGItyq1O8C1YAuVGFIBkTayGrkovpmcoiDPxROjgAEGKfxTfwumyzsgyd
 pQLL50avBPDBDnSqh5spPgTUmaFfqTnPWgxCnK/bo1d+vcTB43pP4bUFOX1MNG69pEzNZ7fFeAUt3
 dz7ub8GprtFBqA==;
Date: Sat, 15 Mar 2025 13:09:31 +0200
Message-Id: <86a59my2hg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <87h64k34b7.fsf@localhost> (message from Ihor Radchenko on Sun,
 23 Feb 2025 18:26:52 +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> <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> <87ldudvfvd.fsf@localhost>
 <87ed00fwts.fsf@Phoenix> <87wmdjtj34.fsf@Phoenix> <87h64k34b7.fsf@localhost>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
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 (---)

Ping! How can we make some progress with this issue?

> From: Ihor Radchenko <yantar92@HIDDEN>
> Cc: 75209 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
> Date: Sun, 23 Feb 2025 18:26:52 +0000
> 
> "N. Jackson" <njackson@HIDDEN> writes:
> 
> > The bug occurred again this morning (when the system was waking up
> > from suspend).  The diagnostic information from the new warning was
> > this:
> 
> First of all, thanks a lot of the detailed investigation!
> 
> >   â›” Warning (emacs): In org-persist--read-elisp-file: The problematic file contents is:
> >   -----
> >   ;;   -*- mode: lisp-data; -*-
> >   (((26548 34513 530425 770000) 26551 61114 665219 11000) ((26548 34583 367592 501000) 26552 26502 142724 470000)
> >   ------
> >
> > Unfortunately however, I cannot say with certainty that this was the
> > "End of file during parsing" error again (but as I have seen no
> > other error with this bug, I feel fairly sure that it was).
> 
> That was it. I can see it from unclosed parenthesis.
> 
> > I find with Elisp that I have difficulty seeing easily which
> > statements are inside which block (and I find the asymmetry of the
> > then part and the else part(s) of if statements especially tricky),
> > but as far as I could tell the code looked right provided that the
> > `warn' function is expected to return.
> 
> "Else" part may contain any number of sexps, while "then" part only one.
> That's why asymmetry.
> 
> > Today was the first time the bug occurred with this version of the
> > diagnostic and as I reported above, again I only got the output from
> > the first warning -- which is now the new diagnostic information but
> > I didn't get the information from the second warning about what the
> > error was.
> 
> I am also clueless why only a single warning is shown though.
> 
> > When the bug happened this morning, my logs show that my normal
> > instance of Emacs entered the org-persist--refresh-gc-lock timer
> > handler at 06:46:07.188999 and never returned, whereas my Gnus
> > instance of Emacs entered org-persist--refresh-gc-lock eight times
> > (the number hours of suspend) starting at 06:46:07.295370 and
> > finishing at 06:46:14.192108.
> 
> Ouch! It is actually expected (and customizable via
> `timer-max-repeats'), but was not intended by me in the code logic.
> It does not explain your bug though.
> 
> > FWIW, the details from my log (showing the last two invocations of
> > the timer before I put the system into suspend last night, the
> > invocations at the time when the system resumed from suspend, and
> > (in the case of the timer that didn't break), the first regular
> > invocation of the timer since I woke the system up.)
> 
> Very helpful!
> 
> > Normal Emacs instance (bug happened here):
> > ...
> > 2025-02-21 06:46:07.188999 Norm entering org-persist--refresh-gc-lock:
> >   Timer: org-persist--refresh-gc-lock (nil)
> >   Due: In -23716.573737732 s (26552 2778 615308 958000)
> >   Triggered: t		Integral Multiple: nil
> >   Repeat Delay: 3600	Idle Delay: nil
> 
> Never returned likely means that it threw an error.
> Most likely because
> 
> (setf (alist-get before-init-time alist nil nil #'equal)
>             (current-time))
> will fail when ALIST is nil. I should fix this.
> However, it does not solve the mistery of incomplete data in the
> lockfile.
> 
> > Gnus Emacs instance:
> >
> > 2025-02-20 22:11:55.043835 Gnus entering org-persist--refresh-gc-lock:
> >   Timer: org-persist--refresh-gc-lock (nil)
> >   Due: In 3599.984760117 s (26551 64779 28641 22000)
> >   Triggered: t		Integral Multiple: nil
> >   Repeat Delay: 3600	Idle Delay: nil
> >
> >   2025-02-20 22:11:55.058196 Gnus leaving org-persist--refresh-gc-lock normally:
> >   Timer: org-persist--refresh-gc-lock (nil)
> >   Due: In 3599.970393228 s (26551 64779 28641 22000)
> >   Triggered: t		Integral Multiple: nil
> >   Repeat Delay: 3600	Idle Delay: nil
> 
> This looks like the most recent write to the lock file.
> 
> The one at 6am happens after the failing read at 06:46:07.188999.
> 
> On the other hand, it is just a fraction of second apart.
> Is `insert-file-contents' atomic operation?
> 
> > 2025-02-21 06:46:07.295370 Gnus entering org-persist--refresh-gc-lock:
> >   Timer: org-persist--refresh-gc-lock (nil)
> >   Due: In -23652.266766201 s (26552 2843 28641 22000)
> >   Triggered: t		Integral Multiple: nil
> >   Repeat Delay: 3600	Idle Delay: nil
> >
> >   2025-02-21 06:46:14.143748 Gnus leaving org-persist--refresh-gc-lock normally:
> >   Timer: org-persist--refresh-gc-lock (nil)
> >   Due: In -23659.115148904 s (26552 2843 28641 22000)
> >   Triggered: t		Integral Multiple: nil
> >   Repeat Delay: 3600	Idle Delay: nil
> 
> 
> -- 
> 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; 7 Mar 2025 19:12:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 07 14:12:23 2025
Received: from localhost ([127.0.0.1]:50354 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tqd7P-0002of-1l
	for submit <at> debbugs.gnu.org; Fri, 07 Mar 2025 14:12:23 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:60262)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tqd7M-0002oS-DG
 for 75209 <at> debbugs.gnu.org; Fri, 07 Mar 2025 14:12:21 -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 1tqd7G-00061T-Rd; Fri, 07 Mar 2025 14:12:14 -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=ksh3aGnR76ZfXJnKC8OQJORRgui5eG/WrFPG4oMjSY4=; b=RHzQ/1QLxh3s
 Xr9VwzUGZrsNhKjgQkjwhbgOzonoZoAKI/l5IsV0QhOlRlAyucPmy0D4oYfF+Cj6dckaOxmnTu0fg
 Udq2Gx1HncSq7W9m/ij9wQJLjBx+L1rERos27SFxIs0lhrdCL0s6FnsiLt/aA7IVt0//jIyM3wb5x
 sAojTfSxPhWnHETq66s8k7KxDwocsstjm8oatKjy+K2IITJXJudURXDVERmKYW+V5ZCqavFonVc04
 zf8/iNwKXNas8OuZBZRRIsOkhhXLCzM4Vq6ZqVTantblqv6fU4rVCgbb97jNogxzxXPLBPEq+IF13
 sfCHm89QheAP2tVdgeD37w==;
Date: Fri, 07 Mar 2025 21:12:10 +0200
Message-Id: <86y0xgk645.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <874j043hv3.fsf@localhost> (message from Ihor Radchenko on Fri,
 07 Mar 2025 16:50:24 +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> <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>
 <87ldudvfvd.fsf@localhost> <87ed00fwts.fsf@Phoenix>
 <87wmdjtj34.fsf@Phoenix> <87h64k34b7.fsf@localhost> <874j043hv3.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: Fri, 07 Mar 2025 16:50:24 +0000
> 
> Ihor Radchenko <yantar92@HIDDEN> writes:
> 
> >>   2025-02-20 22:11:55.058196 Gnus leaving org-persist--refresh-gc-lock normally:
> >>   Timer: org-persist--refresh-gc-lock (nil)
> >>   Due: In 3599.970393228 s (26551 64779 28641 22000)
> >>   Triggered: t		Integral Multiple: nil
> >>   Repeat Delay: 3600	Idle Delay: nil
> >
> > This looks like the most recent write to the lock file.
> >
> > The one at 6am happens after the failing read at 06:46:07.188999.
> >
> > On the other hand, it is just a fraction of second apart.
> > Is `insert-file-contents' atomic operation?
> 
> Eli, do you have any idea if `insert-file-contents' may be affected by
> the inserted file being written simultaneously?

Emacs reads the file in chunks, so I think the answer depends on the
filesystem.




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; 7 Mar 2025 16:51:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 07 11:51:10 2025
Received: from localhost ([127.0.0.1]:49796 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tqauk-0006xj-5a
	for submit <at> debbugs.gnu.org; Fri, 07 Mar 2025 11:51:10 -0500
Received: from mout01.posteo.de ([185.67.36.65]:47553)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1tqauh-0006xD-DM
 for 75209 <at> debbugs.gnu.org; Fri, 07 Mar 2025 11:51:07 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id BE269240027
 for <75209 <at> debbugs.gnu.org>; Fri,  7 Mar 2025 17:50:58 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1741366258; bh=Q6sHD6VU6VryHSrxSmoksEcNMYdMWBJA5Iy17ONqNoc=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=ipeFCc9cdG/je9sGdhss5IbDFNj36olggWj/S1ZQdwZtV6Ym78Z88MBclumuCfbBp
 Vgpy2GcyCOiTQScN1acljlI1OrDPHKJ68/DQE5ARl93T3IxtVRh7nVddcf6iTy9lNI
 2LprZKJ4qYhkM8ejULFnf5kcNrbKnn3OKZgeVIbXENz+7bcuXppk4J3skrSeOWXWOc
 j3RSUi+9NwP0xsswKpvaoLkaPGwEmIp6bKar5F32L9tJbmpz92veCWPqPkrPwepE3t
 hWhi5Yk/efDLlrKHCqQSoxoiF4upwSx/By8bjwCH9m3aDjagy5JzZ3wV0TMGq64W7g
 bzwBSUXXp6Wfw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Z8XNd28NJz9rxF;
 Fri,  7 Mar 2025 17:50:57 +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: <87h64k34b7.fsf@localhost>
References: <878qrxgg74.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>
 <87ldudvfvd.fsf@localhost> <87ed00fwts.fsf@Phoenix>
 <87wmdjtj34.fsf@Phoenix> <87h64k34b7.fsf@localhost>
Date: Fri, 07 Mar 2025 16:50:24 +0000
Message-ID: <874j043hv3.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 (---)

Ihor Radchenko <yantar92@HIDDEN> writes:

>>   2025-02-20 22:11:55.058196 Gnus leaving org-persist--refresh-gc-lock normally:
>>   Timer: org-persist--refresh-gc-lock (nil)
>>   Due: In 3599.970393228 s (26551 64779 28641 22000)
>>   Triggered: t		Integral Multiple: nil
>>   Repeat Delay: 3600	Idle Delay: nil
>
> This looks like the most recent write to the lock file.
>
> The one at 6am happens after the failing read at 06:46:07.188999.
>
> On the other hand, it is just a fraction of second apart.
> Is `insert-file-contents' atomic operation?

Eli, do you have any idea if `insert-file-contents' may be affected by
the inserted file being written simultaneously?

-- 
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; 23 Feb 2025 18:27:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 23 13:27:34 2025
Received: from localhost ([127.0.0.1]:35965 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tmGhO-0007Vf-7Z
	for submit <at> debbugs.gnu.org; Sun, 23 Feb 2025 13:27:34 -0500
Received: from mout01.posteo.de ([185.67.36.65]:36657)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1tmGhL-0007VM-5a
 for 75209 <at> debbugs.gnu.org; Sun, 23 Feb 2025 13:27:28 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id EB15C240027
 for <75209 <at> debbugs.gnu.org>; Sun, 23 Feb 2025 19:27:20 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1740335240; bh=m3+pemtYoHAsFTw5eFwNZpAVTXVcJkpT/RTMrdW2GlI=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 Content-Transfer-Encoding:From;
 b=BjRD+DcN5TPpGYo3QZbMsyndWjFIazx+4y7X4y6FkvqC8kFfh8iQtaZCJyaImHJ+k
 NisJuuDaDZj2i0/v+OH+U2Qu2sZqi+3//AZzNBQXoomu6blTv7IZNi4fdqC4LLa0HY
 JLkyQs3yZj3cQN4W3DUsg9t3S4/Nz8YM+js++0xAy9WS3p6DJD2pcr0xp+5uNBwTIF
 fpuzne6C2/WZelpMkh535VegTanHhEtLeDlQDzGX1DVcxYQ+gLycdMsEWpTZQFkCK4
 0QrtBjXfIsN8pWqpzmhYna4YTAZzRCz3p24DoErqGpeDy12GZguY6ANoKM4avtDLsM
 94PEZJqvutCsw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Z1C5N0fcTz6tvq;
 Sun, 23 Feb 2025 19:27:20 +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: <87wmdjtj34.fsf@Phoenix>
References: <878qrxgg74.fsf@Phoenix> <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> <87ldudvfvd.fsf@localhost>
 <87ed00fwts.fsf@Phoenix> <87wmdjtj34.fsf@Phoenix>
Date: Sun, 23 Feb 2025 18:26:52 +0000
Message-ID: <87h64k34b7.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
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 (----)

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

> The bug occurred again this morning (when the system was waking up
> from suspend).  The diagnostic information from the new warning was
> this:

First of all, thanks a lot of the detailed investigation!

>   =E2=9B=94 Warning (emacs): In org-persist--read-elisp-file: The problem=
atic file contents is:
>   -----
>   ;;   -*- mode: lisp-data; -*-
>   (((26548 34513 530425 770000) 26551 61114 665219 11000) ((26548 34583 3=
67592 501000) 26552 26502 142724 470000)
>   ------
>
> Unfortunately however, I cannot say with certainty that this was the
> "End of file during parsing" error again (but as I have seen no
> other error with this bug, I feel fairly sure that it was).

That was it. I can see it from unclosed parenthesis.

> I find with Elisp that I have difficulty seeing easily which
> statements are inside which block (and I find the asymmetry of the
> then part and the else part(s) of if statements especially tricky),
> but as far as I could tell the code looked right provided that the
> `warn' function is expected to return.

"Else" part may contain any number of sexps, while "then" part only one.
That's why asymmetry.

> Today was the first time the bug occurred with this version of the
> diagnostic and as I reported above, again I only got the output from
> the first warning -- which is now the new diagnostic information but
> I didn't get the information from the second warning about what the
> error was.

I am also clueless why only a single warning is shown though.

> When the bug happened this morning, my logs show that my normal
> instance of Emacs entered the org-persist--refresh-gc-lock timer
> handler at 06:46:07.188999 and never returned, whereas my Gnus
> instance of Emacs entered org-persist--refresh-gc-lock eight times
> (the number hours of suspend) starting at 06:46:07.295370 and
> finishing at 06:46:14.192108.

Ouch! It is actually expected (and customizable via
`timer-max-repeats'), but was not intended by me in the code logic.
It does not explain your bug though.

> FWIW, the details from my log (showing the last two invocations of
> the timer before I put the system into suspend last night, the
> invocations at the time when the system resumed from suspend, and
> (in the case of the timer that didn't break), the first regular
> invocation of the timer since I woke the system up.)

Very helpful!

> Normal Emacs instance (bug happened here):
> ...
> 2025-02-21 06:46:07.188999 Norm entering org-persist--refresh-gc-lock:
>   Timer: org-persist--refresh-gc-lock (nil)
>   Due: In -23716.573737732 s (26552 2778 615308 958000)
>   Triggered: t		Integral Multiple: nil
>   Repeat Delay: 3600	Idle Delay: nil

Never returned likely means that it threw an error.
Most likely because

(setf (alist-get before-init-time alist nil nil #'equal)
            (current-time))
will fail when ALIST is nil. I should fix this.
However, it does not solve the mistery of incomplete data in the
lockfile.

> Gnus Emacs instance:
>
> 2025-02-20 22:11:55.043835 Gnus entering org-persist--refresh-gc-lock:
>   Timer: org-persist--refresh-gc-lock (nil)
>   Due: In 3599.984760117 s (26551 64779 28641 22000)
>   Triggered: t		Integral Multiple: nil
>   Repeat Delay: 3600	Idle Delay: nil
>
>   2025-02-20 22:11:55.058196 Gnus leaving org-persist--refresh-gc-lock no=
rmally:
>   Timer: org-persist--refresh-gc-lock (nil)
>   Due: In 3599.970393228 s (26551 64779 28641 22000)
>   Triggered: t		Integral Multiple: nil
>   Repeat Delay: 3600	Idle Delay: nil

This looks like the most recent write to the lock file.

The one at 6am happens after the failing read at 06:46:07.188999.

On the other hand, it is just a fraction of second apart.
Is `insert-file-contents' atomic operation?

> 2025-02-21 06:46:07.295370 Gnus entering org-persist--refresh-gc-lock:
>   Timer: org-persist--refresh-gc-lock (nil)
>   Due: In -23652.266766201 s (26552 2843 28641 22000)
>   Triggered: t		Integral Multiple: nil
>   Repeat Delay: 3600	Idle Delay: nil
>
>   2025-02-21 06:46:14.143748 Gnus leaving org-persist--refresh-gc-lock no=
rmally:
>   Timer: org-persist--refresh-gc-lock (nil)
>   Due: In -23659.115148904 s (26552 2843 28641 22000)
>   Triggered: t		Integral Multiple: nil
>   Repeat Delay: 3600	Idle Delay: nil


--=20
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; 21 Feb 2025 15:26:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 21 10:26:38 2025
Received: from localhost ([127.0.0.1]:32855 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tlUvE-0007yE-OT
	for submit <at> debbugs.gnu.org; Fri, 21 Feb 2025 10:26:38 -0500
Received: from mout02.posteo.de ([185.67.36.66]:59167)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1tlUvB-0007x1-MX
 for 75209 <at> debbugs.gnu.org; Fri, 21 Feb 2025 10:26:35 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 16DF4240101
 for <75209 <at> debbugs.gnu.org>; Fri, 21 Feb 2025 16:26:25 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1740151586; bh=mnMOOk/rNwuCvG1vDgKLUTqyeW7FZtZOQ1OdbqEYqj4=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 Content-Transfer-Encoding:From;
 b=BInULMwVF3OO2vnn/+6ZZHUjkZWHLkGBGyMbhx+qI9MKPLqyUix+HdWyO1JMPMGoK
 IrLmb1WPwepReAjFK7+HZqHmMQTWie939SqhWfKLwMoOPiPZ70gCUfwvkDL3ZCkq6n
 eEnimqkfuuDW633GDgWFkCXqoZhxHUyFtcnfikHoezShe60dG+D+qf9nOk6Jccl3rO
 YwPc4JizdUesxZSas0OT2+SQrv2eJtOMjtSvRL8/nF1BDqIuEq3EmC5RtbOPzBBhXj
 k9y7hUWUOBNzwLXtxakXY3IM469jaeOn0ex/p6uBSAs5oaiqjwmzd3Jp5xZ9Ca/XZb
 z0hhnF07rYSlA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Yzv9X6VLZz6twL;
 Fri, 21 Feb 2025 16:26:24 +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: <87ed00fwts.fsf@Phoenix> (N. Jackson's message of "Fri, 14 Feb
 2025 09:02:55 -0500")
References: <878qrxgg74.fsf@Phoenix> <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> <87ldudvfvd.fsf@localhost>
 <87ed00fwts.fsf@Phoenix>
Date: Fri, 21 Feb 2025 15:26:23 +0000
Message-ID: <87wmdjtj34.fsf@Phoenix>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75209
Cc: Ihor Radchenko <yantar92@HIDDEN>, Eli Zaretskii <eliz@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 09:02 -0500 on Friday 2025-02-14, N. Jackson wrote:
>
> At 18:01 +0000 on Monday 2025-02-10, Ihor Radchenko wrote:
>>
>> 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 buffe=
r-or-file)
>>               (message "Emacs reader failed to read data in %S. The erro=
r 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)))))
>>=20=20
>>  ;; FIXME: `pp' is very slow when writing even moderately large datasets
>
> I have applied your diff and will report back with details when I
> next get the warning.

The bug occurred again this morning (when the system was waking up
from suspend).  The diagnostic information from the new warning was
this:

  =E2=9B=94 Warning (emacs): In org-persist--read-elisp-file: The problemat=
ic file contents is:
  -----
  ;;   -*- mode: lisp-data; -*-
  (((26548 34513 530425 770000) 26551 61114 665219 11000) ((26548 34583 367=
592 501000) 26552 26502 142724 470000)
  ------

Unfortunately however, I cannot say with certainty that this was the
"End of file during parsing" error again (but as I have seen no
other error with this bug, I feel fairly sure that it was).


I apologise that I don't have this information.  My elisp is poor
and I am having difficulties with the above patch -- only the first
warning in the else clause gets displayed.

Initially I applied the diff using diff-mode.  It seemed to apply
cleanly.  Then I byte-compiled and loaded, and native-compiled and
loaded the file.  Fairly soon the bug occurred again but the only
warning shown in the *Warnings* buffer was the usual

  =E2=9B=94 Warning (emacs): Emacs reader failed to read data in "/home/nlj=
/.cache/org-persist/gc-lock.eld". The error was: "End of file during parsin=
g"

.  There was no sign of the output from the new diagnostic.

I convinced myself that the change had applied to the right file and
that Emacs was using the modified code.

I find with Elisp that I have difficulty seeing easily which
statements are inside which block (and I find the asymmetry of the
then part and the else part(s) of if statements especially tricky),
but as far as I could tell the code looked right provided that the
`warn' function is expected to return.

Anyway, to see if poking it would help, I switched the order of the
two warning statements.  I now have this in the error handler in
org-persist--read-elisp-file:

  (error
   ;; Remove problematic file.
   (unless (bufferp buffer-or-file) (delete-file buffer-or-file))
   ;; Do not report the known error to user.
   (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 "In org-persist--read-elisp-file: The problematic file contents =
is:\n-----\n%s\n------\n"
           (buffer-string))
     (warn "In org-persist--read-elisp-file: Emacs reader failed to read da=
ta in %S. The error was: %S"
           buffer-or-file (error-message-string err)))
   nil)))))

Today was the first time the bug occurred with this version of the
diagnostic and as I reported above, again I only got the output from
the first warning -- which is now the new diagnostic information but
I didn't get the information from the second warning about what the
error was.

I'm not sure what is wrong with this else clause.


With regards to the timing of the triggering of the bug, I have
recently added an :around advice to org-persist--refresh-gc-lock
timer handler to log the exact time and the state of the timer
immediately before the function is entered and immediately after it
exits.  (If it exits.  It doesn't when the bug happens).

When the bug happened this morning, my logs show that my normal
instance of Emacs entered the org-persist--refresh-gc-lock timer
handler at 06:46:07.188999 and never returned, whereas my Gnus
instance of Emacs entered org-persist--refresh-gc-lock eight times
(the number hours of suspend) starting at 06:46:07.295370 and
finishing at 06:46:14.192108.


FWIW, the details from my log (showing the last two invocations of
the timer before I put the system into suspend last night, the
invocations at the time when the system resumed from suspend, and
(in the case of the timer that didn't break), the first regular
invocation of the timer since I woke the system up.)

(I apologise if this is just noise -- I realise that the breaking of
the timer is orthogonal to the problem with the Org persist cache.)

Note: The due time in seconds is nonsense when it is negative
because of the bug in float-time.

Normal Emacs instance (bug happened here):

2025-02-20 21:10:50.625671 Norm entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In 3599.989584552 s (26551 61114 615308 958000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-20 21:10:50.630169 Norm leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In 3599.985085596 s (26551 61114 615308 958000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

2025-02-20 22:10:50.622359 Norm entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In 3599.992908008 s (26551 64714 615308 958000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-20 22:10:50.666588 Norm leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In 3599.948640987 s (26551 64714 615308 958000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

2025-02-21 06:46:07.188999 Norm entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -23716.573737732 s (26552 2778 615308 958000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil


Gnus Emacs instance:

2025-02-20 21:11:55.035594 Gnus entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In 3599.992966593 s (26551 61179 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-20 21:11:55.063103 Gnus leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In 3599.965491277 s (26551 61179 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

2025-02-20 22:11:55.043835 Gnus entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In 3599.984760117 s (26551 64779 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-20 22:11:55.058196 Gnus leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In 3599.970393228 s (26551 64779 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

2025-02-21 06:46:07.295370 Gnus entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -23652.266766201 s (26552 2843 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-21 06:46:14.143748 Gnus leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -23659.115148904 s (26552 2843 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

2025-02-21 06:46:14.148166 Gnus entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -20059.119561876 s (26552 6443 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-21 06:46:14.179593 Gnus leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -20059.151004079 s (26552 6443 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

2025-02-21 06:46:14.180383 Gnus entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -16459.151768947 s (26552 10043 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-21 06:46:14.181836 Gnus leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -16459.153224063 s (26552 10043 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

2025-02-21 06:46:14.182532 Gnus entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -12859.153917435 s (26552 13643 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-21 06:46:14.183997 Gnus leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -12859.155382942 s (26552 13643 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

2025-02-21 06:46:14.184627 Gnus entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -9259.156007449 s (26552 17243 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-21 06:46:14.186050 Gnus leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -9259.157438955 s (26552 17243 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

2025-02-21 06:46:14.186715 Gnus entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -5659.158116718 s (26552 20843 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-21 06:46:14.188074 Gnus leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -5659.159457743 s (26552 20843 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

2025-02-21 06:46:14.188685 Gnus entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -2059.160065622 s (26552 24443 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-21 06:46:14.190071 Gnus leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In -2059.161456207 s (26552 24443 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

2025-02-21 06:46:14.190744 Gnus entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In 1540.837851387 s (26552 28043 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-21 06:46:14.192108 Gnus leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In 1540.836489647 s (26552 28043 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

2025-02-21 07:11:55.051565 Gnus entering org-persist--refresh-gc-lock:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In 3599.97701699 s (26552 31643 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil

  2025-02-21 07:11:55.072352 Gnus leaving org-persist--refresh-gc-lock norm=
ally:
  Timer: org-persist--refresh-gc-lock (nil)
  Due: In 3599.956240079 s (26552 31643 28641 22000)
  Triggered: t		Integral Multiple: nil
  Repeat Delay: 3600	Idle Delay: nil





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; 14 Feb 2025 22:33:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 14 17:33:38 2025
Received: from localhost ([127.0.0.1]:52184 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tj4Fd-0007Ks-Ok
	for submit <at> debbugs.gnu.org; Fri, 14 Feb 2025 17:33:38 -0500
Received: from mout01.posteo.de ([185.67.36.65]:55637)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1tj4Fa-0007Ka-EF
 for 75209 <at> debbugs.gnu.org; Fri, 14 Feb 2025 17:33:35 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 65C75240027
 for <75209 <at> debbugs.gnu.org>; Fri, 14 Feb 2025 23:33:27 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1739572407; bh=kakogGfOynH03/gyBV09xXAYSdD6puyzpE/IrtJ1Ro4=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=hqXdv8S298BwgrZ9itpS7tY/MK/3JqoZNppfpNeDuM9pGxMUP1ztZF23qtl8FRRlr
 Y+VLxmbn35JVmyMHA1/tts9wF7QAtTvVZUpaObyUY85hB1ouny47n0oMeMtpuu3jSe
 bcr8liyWar+DIW2mSNsLD5HifDZp9g8W7it+MGNBxOXSf4/Gbv59Hfj9BcfDTnPo37
 /xkgw+XfqB5ogaIDhaayHTB4EdMsDqEi0m0GY2bIUKS7iRJSZzibrTdmLTO8j47khB
 mJcKt6NXXIHNm2TTxURFn9E7sPPg5yvVPbmOH1WIldoOJQg8sVvmSJ8/MiwGEpWLjl
 hXYwIAmyx9gtw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YvmzV1WzCz6txT;
 Fri, 14 Feb 2025 23:33:25 +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: <87wmdsfpuc.fsf@localhost> (Ihor Radchenko's message of "Fri, 14
 Feb 2025 16:33:47 +0000")
References: <878qrxgg74.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> <87ldudvfvd.fsf@localhost>
 <87ed00fwts.fsf@Phoenix> <86jz9sftlb.fsf@HIDDEN>
 <87wmdsfpuc.fsf@localhost>
Date: Fri, 14 Feb 2025 22:33:24 +0000
Message-ID: <87mseodumj.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 16:33 +0000 on Friday 2025-02-14, Ihor Radchenko wrote:
>
> Eli Zaretskii <eliz@HIDDEN> writes:
>
>> Emacs reads files in chunks of 16KB.  Is the file in question likely
>> to be larger than that?
>
> The file size is around 60 bytes x number of Emacs instances started within
> the last 24 hours (one record for each process until `org-persist-gc-lock-expiry').
>
> For it to exceed 16kb, one needs to run Emacs >250 times per day.

That's not it then.  (I only have two instances of Emacs open at any
time and I mostly keep them running until I get a kernel update and
restart my system -- which happens about once a week. In the last
few years, I doubt I've opened Emacs more than a dozen times in any
24 hour period -- I haven't done that since I stopped working mostly
from the command line and started working mostly from within Emacs.
(But I can imagine someone working from the command line potentially
opening Emacs more than 256 times a day.))




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; 14 Feb 2025 16:34:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 14 11:34:23 2025
Received: from localhost ([127.0.0.1]:51380 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tiydy-0000da-Qm
	for submit <at> debbugs.gnu.org; Fri, 14 Feb 2025 11:34:23 -0500
Received: from mout02.posteo.de ([185.67.36.66]:36077)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1tiydv-0000dK-FH
 for 75209 <at> debbugs.gnu.org; Fri, 14 Feb 2025 11:34:20 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id EC20C240101
 for <75209 <at> debbugs.gnu.org>; Fri, 14 Feb 2025 17:34:12 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1739550852; bh=bOdm8IgrSLtRHM0kSIAnOukA/cqmngk8Op9KmrxAMAs=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=nb5UfzNPz/Vlylqmq24dgVpvWb0ZtRRT/JyI2me8XZsmZnP4s2EyoC1YbEYh2d/wF
 QKePVIigYvIgO3OPSb15JSfLVLdU2W7qGr7EoBHSJJjZ4jLylhOhCtzz8biFpr0y76
 ASV7KiuVaz+DOudtp6avkB5ZKjbkkQ66zt3fIZiGAWkgHynNzkQvhRTveEn6cmWOJU
 BmJF2/joqvuf2E0Ca/l1LImruZGw0OUBU8ewE2mvDz3X7wwIm2tDS7HbceoCDPUvOP
 ZxwUaOwVqH1nmLNsgqP+yxOGngqVGdFuqwJN9xUGCQXm5kNnO5r+eSpwKnv11MbGQ0
 5U5jdO7U8fRYA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Yvd100L4Jz6tn4;
 Fri, 14 Feb 2025 17:34:11 +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: <86jz9sftlb.fsf@HIDDEN>
References: <878qrxgg74.fsf@Phoenix> <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> <87ldudvfvd.fsf@localhost>
 <87ed00fwts.fsf@Phoenix> <86jz9sftlb.fsf@HIDDEN>
Date: Fri, 14 Feb 2025 16:33:47 +0000
Message-ID: <87wmdsfpuc.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:

> Emacs reads files in chunks of 16KB.  Is the file in question likely
> to be larger than that?

The file size is around 60 bytes x number of Emacs instances started within
the last 24 hours (one record for each process until `org-persist-gc-lock-expiry').

For it to exceed 16kb, one needs to run Emacs >250 times per day.

-- 
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; 14 Feb 2025 15:13:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 14 10:13:02 2025
Received: from localhost ([127.0.0.1]:51170 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tixNG-0005AL-IT
	for submit <at> debbugs.gnu.org; Fri, 14 Feb 2025 10:13:02 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:53656)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tixNC-00059l-GA
 for 75209 <at> debbugs.gnu.org; Fri, 14 Feb 2025 10:13:01 -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 1tixN5-0005iy-P2; Fri, 14 Feb 2025 10:12:51 -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=B8osNT/GVr4pJnpDWFs0UCjS+2IkMJ5vbvui/eH+wYo=; b=FzU8LBDG9ljv
 3X93QNjP3Dn9QftKEa9Q998gCKmShXP8LtM1o3gJCfeiVOaIG3uRqpl5BgORy8yEpvgnAtGBbVIjx
 PPnZLP/A6ENcqo55mDcgnYscAsEidcBU9qVPKjOWflHJiUq0rYKT3/MaFndDIu6gh1dPlShFGQyJm
 vlXxx63kYZNQJbJZvOExVlSaujDDvLIIAFHOjweuChMPahLl5TJwouED3if3RUu3CMLMbbo7lK4s+
 ZElzrza11xBBY2SNiccHSVzFSO/h2jZV4ptj68IRjqfbhbbXKZ0TGjVvF0Fw1MWDgKpAS6S96EGpv
 AC8raDgelIVY3HH2uB5gQA==;
Date: Fri, 14 Feb 2025 17:12:48 +0200
Message-Id: <86jz9sftlb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: "N. Jackson" <njackson@HIDDEN>
In-Reply-To: <87ed00fwts.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>
 <86a5bfw9yu.fsf@HIDDEN> <87r04qquc2.fsf@Phoenix>
 <87zfj1d1pv.fsf@localhost> <871pw6fzti.fsf@Phoenix>
 <87ldudvfvd.fsf@localhost> <87ed00fwts.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>,  75209 <at> debbugs.gnu.org
> Date: Fri, 14 Feb 2025 14:02:55 +0000
> 
> Maybe(?) if insert-file-contents reads the file in chunks and if one
> instance of Emacs runs org-persist--write-elisp-file at the same
> time as the other instance if running org-persist--read-elisp-file,
> perhaps the file could be replaced in the middle of the read.  Then
> maybe chunks could be read in from both the old and the new files?

Emacs reads files in chunks of 16KB.  Is the file in question likely
to be larger than that?




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; 14 Feb 2025 14:03:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 14 09:03:10 2025
Received: from localhost ([127.0.0.1]:47691 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tiwHd-00038b-Lg
	for submit <at> debbugs.gnu.org; Fri, 14 Feb 2025 09:03:09 -0500
Received: from mout01.posteo.de ([185.67.36.65]:54339)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <njackson@HIDDEN>)
 id 1tiwHa-000383-Lk
 for 75209 <at> debbugs.gnu.org; Fri, 14 Feb 2025 09:03:07 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 07DFA240028
 for <75209 <at> debbugs.gnu.org>; Fri, 14 Feb 2025 15:02:59 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1739541780; bh=u0F67e80T2+Vx8Mn4ntGJ+T8+yjrefV3kXfTd02gz48=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=ETnLfjO/S3mKuBcbDI6TDXoVM75lfuGjZ/9NaPybZBTkGOo48dNK1uWGO/wSpRdJo
 67Ybe/j7DHv83EbNjdCOSKoAsvgZ6ctwzxMYgQd3MQgCQ6/RQ2OtBFFJVmUZ64JscM
 HAV5+aMmipKn+yzzZoS4T4+GHhAfqT8CAvd/Twnj//DNq8EkCmk64DlEbLwNB/mGLS
 60Do/fS/8CdsjMYxLK/aOKVm3DjShSK6FxHlhW+8JzBi/UoNwORnu2TJe9uX39Q8S6
 ENVGl6vmYK/fO5x/85SET0qLUFCosYEZJTSLhQBKoZijceqQX/Vn0NFQRTBl/TwJf1
 4fE1L5DxkR91A==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YvYfT5qbLz6tvk;
 Fri, 14 Feb 2025 15:02:56 +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: <87ldudvfvd.fsf@localhost> (Ihor Radchenko's message of "Mon, 10
 Feb 2025 18:01:10 +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> <871pw6fzti.fsf@Phoenix>
 <87ldudvfvd.fsf@localhost>
Date: Fri, 14 Feb 2025 14:02:55 +0000
Message-ID: <87ed00fwts.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 18:01 +0000 on Monday 2025-02-10, Ihor Radchenko wrote:
>
> Very strange.
> How can it be if we do atomic writes?

I don't know enough of the details to be able to even begin to
answer that question.

Maybe(?) if insert-file-contents reads the file in chunks and if one
instance of Emacs runs org-persist--write-elisp-file at the same
time as the other instance if running org-persist--read-elisp-file,
perhaps the file could be replaced in the middle of the read.  Then
maybe chunks could be read in from both the old and the new files?

> 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.
>
> 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

I have applied your diff and will report back with details when I
next get the warning.




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; 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: Sat, 15 Mar 2025 18:00:03 UTC

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