emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70973: closed (29.1; "Unlocking file: Invalid argument" Warning savi


From: GNU bug Tracking System
Subject: bug#70973: closed (29.1; "Unlocking file: Invalid argument" Warning saving via a softlink with stale file lock)
Date: Sat, 01 Jun 2024 14:05:02 +0000

Your message dated Sat, 01 Jun 2024 17:04:29 +0300
with message-id <86wmn8oj2q.fsf@gnu.org>
and subject line Re: bug#70973: 29.1; "Unlocking file: Invalid argument" 
Warning saving via a softlink with stale file lock
has caused the debbugs.gnu.org bug report #70973,
regarding 29.1; "Unlocking file: Invalid argument" Warning saving via a 
softlink with stale file lock
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
70973: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70973
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 29.1; "Unlocking file: Invalid argument" Warning saving via a softlink with stale file lock 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/<username>/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.
----
In GNU Emacs 29.1 (build 1, aarch64-apple-darwin21.6.0, NS
 appkit-2113.60 Version 12.6.6 (Build 21G646)) of 2023-08-16 built on
 armbob.lan
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.5

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules 'CFLAGS=-DFD_SETSIZE=10000
 -DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=no'

Configured features:
ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER
PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Messages

Minor modes in effect:
  server-mode: t
  override-global-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/Users/username/.emacs.d/lisp/dash hides /Users/username/.emacs.d/elpa/dash-20221013.836/dash
/Users/username/.emacs.d/elpa/use-package-20221029.1857/use-package-jump hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-jump
/Users/username/.emacs.d/elpa/use-package-20221029.1857/use-package-ensure hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-ensure
/Users/username/.emacs.d/elpa/use-package-20221029.1857/use-package-core hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-core
/Users/username/.emacs.d/elpa/use-package-20221029.1857/use-package-delight hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-delight
/Users/username/.emacs.d/elpa/use-package-20221029.1857/use-package-diminish hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-diminish
/Users/username/.emacs.d/elpa/use-package-20221029.1857/use-package hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package
/Users/username/.emacs.d/elpa/use-package-20221029.1857/use-package-bind-key hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-bind-key
/Users/username/.emacs.d/elpa/bind-key-20221028.1858/bind-key hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/bind-key
/Users/username/.emacs.d/elpa/use-package-20221029.1857/use-package-lint hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-lint
/Users/username/.emacs.d/lisp/linum hides /Applications/Emacs.app/Contents/Resources/lisp/obsolete/linum

Features:
(shadow mail-extr emacsbug misearch multi-isearch help-fns radix-tree
cl-print debug backtrace warnings company-oddmuse company-keywords
company-etags company-gtags company-dabbrev-code company-dabbrev
company-files company-clang company-capf company-cmake company-semantic
company-template company-bbdb company mm-archive message sendmail
yank-media dired dired-loaddefs rfc822 mml mml-sec epa derived epg
rfc6068 gnus-util mailabbrev gmm-utils mailheader mm-decode mm-bodies
mm-encode mail-utils sort autorevert filenotify tango-theme server
cmake-mode rst persistent-todo todotxt rustic-spellcheck rustic-expand
rustic-lsp rustic-playpen rustic-rustfix rustic-racer etags fileloop
xref rustic-babel rustic-rustfmt project org-element org-persist org-id
org-refile avl-tree generator org ob ob-tangle ob-ref ob-lob ob-table
ob-exp org-macro org-src ob-comint org-pcomplete pcomplete org-list
org-footnote org-faces org-entities time-date ob-emacs-lisp ob-core
ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc
org-loaddefs find-func cal-menu calendar cal-loaddefs org-version
org-compat org-macs format-spec rustic-comint rustic-clippy rustic-doc
xdg f f-shortdoc shortdoc rustic-popup rustic-cargo rustic-compile
spinner s xterm-color markdown-mode color noutline outline icons
rustic-interaction rustic dash pcase use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode use-package-core rust-utils thingatpt rust-mode rx
rust-rustfmt rust-playpen rust-compile compile text-property-search
comint ansi-osc ansi-color ring rust-cargo gnutls network-stream
url-cache url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr url-gw nsm puny epg-config finder-inf
special-scratch kmacro advice string-inflection cl-extra help-mode
desktop frameset unbound cl delsel auto-complete-autoloads
cmake-font-lock-autoloads cmake-mode-autoloads company-autoloads
fuzzy-autoloads popup-complete-autoloads popup-autoloads info 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 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/ns-win ns-win
ucs-normalize mule-util term/common-win 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 kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 407012 134522)
 (symbols 48 26631 1)
 (strings 32 138327 48200)
 (string-bytes 1 3541370)
 (vectors 16 50914)
 (vector-slots 8 1424473 208168)
 (floats 8 298 443)
 (intervals 56 1081 0)
 (buffers 984 16))



NOTICE: This email and its attachments may contain privileged and confidential information, only for the viewing and use of the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, acting upon, or use of the information contained in this email and its attachments is strictly prohibited and that this email and its attachments must be immediately returned to the sender and deleted from your system. If you received this email erroneously, please notify the sender immediately.  Xage Security, Inc. and its affiliates will never request personal information (e.g., passwords, Social Security numbers) via email.  Report suspicious emails to security-alerts@xage.com

--- End Message ---
--- Begin Message --- Subject: Re: bug#70973: 29.1; "Unlocking file: Invalid argument" Warning saving via a softlink with stale file lock Date: Sat, 01 Jun 2024 17:04:29 +0300
> From: Duncan Greatwood <dgreatwood@gmail.com>
> Date: Thu, 16 May 2024 14:36:37 -0700
> Cc: 70973@debbugs.gnu.org
> 
> I would agree that the issue was likely due to a system crash at an 
> inopportune moment.
> 
> Of course, if emacs did detect a bad lock file, it could prompt the user for 
> confirmation before removing /
> replacing it. No need to be silent.
> 
> The status quo, requiring a user to find and remove the lock file manually, 
> seems burdensome to my eye,
> albeit the issue is presumably rare. But certainly it is a matter of taste.

No further comments, so I'm now closing this bug.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]