From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70973: 29.1; "Unlocking file: Invalid argument" Warning saving via a softlink with stale file lock Date: Thu, 16 May 2024 11:43:45 +0300 Message-ID: <867cfujge6.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39330"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70973@debbugs.gnu.org To: Duncan Greatwood Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 16 10:44:25 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1s7Wiv-000A2N-4E for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 May 2024 10:44:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7WiY-0002Hl-BR; Thu, 16 May 2024 04:44:02 -0400 Original-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 ) id 1s7WiW-0002H1-3i for bug-gnu-emacs@gnu.org; Thu, 16 May 2024 04:44:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7WiV-0004gC-O9 for bug-gnu-emacs@gnu.org; Thu, 16 May 2024 04:43:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7WiX-0008L9-Jv for bug-gnu-emacs@gnu.org; Thu, 16 May 2024 04:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 May 2024 08:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70973 X-GNU-PR-Package: emacs Original-Received: via spool by 70973-submit@debbugs.gnu.org id=B70973.171584904032046 (code B ref 70973); Thu, 16 May 2024 08:44:01 +0000 Original-Received: (at 70973) by debbugs.gnu.org; 16 May 2024 08:44:00 +0000 Original-Received: from localhost ([127.0.0.1]:47503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7WiW-0008Ko-C9 for submit@debbugs.gnu.org; Thu, 16 May 2024 04:44:00 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7WiV-0008Ki-6k for 70973@debbugs.gnu.org; Thu, 16 May 2024 04:43:59 -0400 Original-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 ) id 1s7WiL-0004XG-Hd; Thu, 16 May 2024 04:43:50 -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=sh9lnUxy3TU9HmNhyu2Ysqt6Y6sSV3vgFDB6xBHPuOc=; b=Yje3MbKs0Lzh89m/Anfi Vrw3wWW1vVZcQujGZQhaTAKCvjqjWVinA1Df0XjAX2k/Hyw3GoTke474FtcpvCao/RwMmjzVGWIRR xjyfDkWfe38BMO6ZmZplIDwlf6/c98e6t97CJeJuhe2v9Ow0uXQD6gpzcq4KW18Zzhb7fMcR3eMWi H8XuSjo77ufUsJGzxj4owz7ifbjSa+HRRsW9CmsoDZvdMPfJ0za/hDPrKvpHf9IWR7OtYLFkjN3Oq BXxde/OxWcBHBWTWHtyM2cKZi9iYBPakstTxFhLMs9CV4yIeI8fOhSwV0WKhpaC7iivpRRJDPPCFX R3rxyT1cRm/RxQ==; In-Reply-To: (message from Duncan Greatwood on Wed, 15 May 2024 17:53:05 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285139 Archived-At: > From: Duncan Greatwood > Date: Wed, 15 May 2024 17:53:05 -0700 > > While editing the ~/.emacs file in emacs, the machine rebooted (kernel panic I believe). This left a lock file > behind. > > The ~/.emacs file is actually a softlink: > .emacs -> /Users//Dropbox/Documents/Projects/emacs/dotemacs > The fact that it's a softlink may or may not be relevant. > > In ~/Dropbox/Documents/Projects/emacs/, there was a file: .#dotemacs > > After the reboot, I started emacs, and continued with further edits to .emacs. Upon saving .emacs, had the > following warning: > ⛔ Warning (unlock-file): Unlocking file: Invalid argument, ~/Dropbox/Documents/Projects/emacs/dotemacs, > ignored > > As per the warning, the save was nonetheless successful. > > Invoking file-locked-p directly, I saw the same error, and the following debug info: > Debugger entered--Lisp error: (file-error "Testing file lock" "Invalid argument" > "~/Dropbox/Documents/Projects/emacs/dotemacs") > file-locked-p("~/Dropbox/Documents/Projects/emacs/dotemacs") > eval((file-locked-p "~/Dropbox/Documents/Projects/emacs/dotemacs") t) > eval-expression((file-locked-p "~/Dropbox/Documents/Projects/emacs/dotemacs") nil nil 127) > funcall-interactively(eval-expression (file-locked-p "~/Dropbox/Documents/Projects/emacs/dotemacs") nil nil > 127) > call-interactively(eval-expression nil nil) > command-execute(eval-expression) > > After removing the lock file manually, the warning on save goes away: > rm ~/Dropbox/Documents/Projects/emacs/.#dotemacs > > Access flags on dotemacs file are as follows: > -rw-r--r--@ 1 dgreatwood staff 133806 May 15 16:01 dotemacs > lrwxr-xr-x 1 dgreatwood staff 59 Dec 6 2015 .emacs -> ... Thanks. However, this doesn't provide enough information to investigate the issue and its causes. If you can reproduce the problem, please tell what does ls -l ~/Dropbox/Documents/Projects/emacs/.#dotemacs produce when you see the warnings, because that is the immediate trigger for the "invalid argument".