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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 07 Mar 2025 21:12:10 +0200

> From: Ihor Radchenko <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>, [email-masked]
> Date: Fri, 07 Mar 2025 16:50:24 +0000
> 
> Ihor Radchenko <[email-masked]> 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.