From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Armstrong Newsgroups: gmane.emacs.devel Subject: Re: locked history file Date: Tue, 16 Feb 2021 10:10:45 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18693"; mail-complaints-to="usenet@ciao.gmane.io" To: Gunnar Horrigmo , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 16 19:11:45 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lC4p7-0004lu-Bv for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Feb 2021 19:11:45 +0100 Original-Received: from localhost ([::1]:34702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lC4p6-0004W6-E4 for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Feb 2021 13:11:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lC4oK-0003j1-OI for emacs-devel@gnu.org; Tue, 16 Feb 2021 13:10:56 -0500 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:51079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lC4oI-0005XG-FY for emacs-devel@gnu.org; Tue, 16 Feb 2021 13:10:56 -0500 Original-Received: from matts-mbp-2016.lan (24-113-169-116.wavecable.com [24.113.169.116]) (Authenticated sender: matt@rfc20.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id A964D100003; Tue, 16 Feb 2021 18:10:48 +0000 (UTC) In-Reply-To: Received-SPF: pass client-ip=217.70.178.231; envelope-from=matt@rfc20.org; helo=relay11.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:264907 Archived-At: Gunnar Horrigmo 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 =E2=80=98savehist-autosave=E2=80=99: (file-locked "/h= ome/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.