unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* locked history file
@ 2021-02-16 10:43 Gunnar Horrigmo
  2021-02-16 15:52 ` Eli Zaretskii
  2021-02-16 18:10 ` Matt Armstrong
  0 siblings, 2 replies; 5+ messages in thread
From: Gunnar Horrigmo @ 2021-02-16 10:43 UTC (permalink / raw)
  To: emacs-devel


Has something changed recently regardomg how emacs handles the history
file? I'm seeing this quite often now, when running multiple emacsen:

Error running timer ‘savehist-autosave’: (file-locked "/home/gunnar/.config/emacs/emacs.d/history" "gunnar@titanium (pid 1039)")

.. and while it's perfectly understandable, I've been running
multiple emacsen for many, many years, and this feels new.

This is on 27.1.91, btw.

I apologise if this is too noobish for emacs-devel. I appreciate a
pointer if I should've asked elsewhere.

-- 
Gunnar



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: locked history file
  2021-02-16 10:43 locked history file Gunnar Horrigmo
@ 2021-02-16 15:52 ` Eli Zaretskii
  2021-02-16 23:57   ` Gunnar Horrigmo
  2021-02-16 18:10 ` Matt Armstrong
  1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2021-02-16 15:52 UTC (permalink / raw)
  To: Gunnar Horrigmo; +Cc: emacs-devel

> From: Gunnar Horrigmo <gnunar@stoffe-pro.net>
> Date: Tue, 16 Feb 2021 11:43:31 +0100
> 
> Has something changed recently regardomg how emacs handles the history
> file? I'm seeing this quite often now, when running multiple emacsen:
> 
> Error running timer ‘savehist-autosave’: (file-locked "/home/gunnar/.config/emacs/emacs.d/history" "gunnar@titanium (pid 1039)")
> 
> .. and while it's perfectly understandable, I've been running
> multiple emacsen for many, many years, and this feels new.
> 
> This is on 27.1.91, btw.

What does "recently" mean in this case?  What was the previous version
of Emacs you were using, when these errors didn't happen?  Emacs
27.1.91 is a pretest of Emacs 27.2, and we generally don't make
behavior changes in pretest versions.  So "recently" is surprising,
unless you previously used Emacs 26 or older.

> I apologise if this is too noobish for emacs-devel. I appreciate a
> pointer if I should've asked elsewhere.

In general, such issues should be submitted to our issue tracker by
invoking "M-x report-emacs-bug RET".

Thanks.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: locked history file
  2021-02-16 10:43 locked history file Gunnar Horrigmo
  2021-02-16 15:52 ` Eli Zaretskii
@ 2021-02-16 18:10 ` Matt Armstrong
  2021-02-17  0:01   ` Gunnar Horrigmo
  1 sibling, 1 reply; 5+ messages in thread
From: Matt Armstrong @ 2021-02-16 18:10 UTC (permalink / raw)
  To: Gunnar Horrigmo, emacs-devel

Gunnar Horrigmo <gnunar@stoffe-pro.net> writes:

> Has something changed recently regardomg how emacs handles the history
> file? I'm seeing this quite often now, when running multiple emacsen:
>
> Error running timer ‘savehist-autosave’: (file-locked "/home/gunnar/.config/emacs/emacs.d/history" "gunnar@titanium (pid 1039)")
>
> .. and while it's perfectly understandable, I've been running multiple
> emacsen for many, many years, and this feels new.
>
> This is on 27.1.91, btw.
>
> I apologise if this is too noobish for emacs-devel. I appreciate a
> pointer if I should've asked elsewhere.

Hi Gunnar,

I have been digging into the Emacs file locking code recently.  I don't
think much has changed with core mechanics locking mechancis or savehist
itself in recent Emacs versions.

How big is your history file?  Perhaps it is enormous, causing the IO to
take an unusualy long time.

How is your hard disk?  If it is seeing intermitten write slowness at
other times?  Could you be doing IO intensive tasks when these problems
occur?

When you run your multiple Emacs instances, do you launch them all at
the same time?  For example, at login?  If so, then the history save
timers would all happen at similar times, which would increase the
chance of a write lock conflict.

Those are all "shot in dark" guesses.

Feel free to file an Emacs bug on this.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: locked history file
  2021-02-16 15:52 ` Eli Zaretskii
@ 2021-02-16 23:57   ` Gunnar Horrigmo
  0 siblings, 0 replies; 5+ messages in thread
From: Gunnar Horrigmo @ 2021-02-16 23:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Gunnar Horrigmo, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> What does "recently" mean in this case?  What was the previous version
> of Emacs you were using, when these errors didn't happen?  Emacs
> 27.1.91 is a pretest of Emacs 27.2, and we generally don't make
> behavior changes in pretest versions.  So "recently" is surprising,
> unless you previously used Emacs 26 or older.

Hard to say. I haven't really been tracking this. I probably compiled
the head of the emacs-27 branch, I don't know... 3-4 months ago? 


>> I apologise if this is too noobish for emacs-devel. I appreciate a
>> pointer if I should've asked elsewhere.
>
> In general, such issues should be submitted to our issue tracker by
> invoking "M-x report-emacs-bug RET".

Hm okay, I guess I didn't consider this a bug. I'll try and gather some
useful info before I submit.

-- 
Gunnar



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: locked history file
  2021-02-16 18:10 ` Matt Armstrong
@ 2021-02-17  0:01   ` Gunnar Horrigmo
  0 siblings, 0 replies; 5+ messages in thread
From: Gunnar Horrigmo @ 2021-02-17  0:01 UTC (permalink / raw)
  To: Matt Armstrong; +Cc: emacs-devel

Matt Armstrong <matt@rfc20.org> writes:

> How big is your history file?  Perhaps it is enormous, causing the IO to
> take an unusualy long time.

No, its tiny. 26K. It's not that long since I did a spring cleaning in
all of my init code, so I probably deleted it at the time.


> How is your hard disk?  If it is seeing intermitten write slowness at
> other times?  Could you be doing IO intensive tasks when these problems
> occur?

That's a good question. I shall find out.


> When you run your multiple Emacs instances, do you launch them all at
> the same time?  For example, at login?

Oh yeah, absolutely. But I've been doing that for years.


> If so, then the history save
> timers would all happen at similar times, which would increase the
> chance of a write lock conflict.

Yes, another good target for investigation.


> Feel free to file an Emacs bug on this.

Will do. 

-- 
Gunnar



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-17  0:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16 10:43 locked history file Gunnar Horrigmo
2021-02-16 15:52 ` Eli Zaretskii
2021-02-16 23:57   ` Gunnar Horrigmo
2021-02-16 18:10 ` Matt Armstrong
2021-02-17  0:01   ` Gunnar Horrigmo

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).