GNU bug report logs - #45671
28.0.50; Permission denied when removing eln-cache and stuck in endless loop

Previous Next

Package: emacs;

Reported by: Anders Stenman <anders.stenman <at> niradynamics.se>

Date: Tue, 5 Jan 2021 09:30:02 UTC

Severity: normal

Found in version 28.0.50

Done: Andrea Corallo <akrl <at> sdf.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45671 in the body.
You can then email your comments to 45671 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#45671; Package emacs. (Tue, 05 Jan 2021 09:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Anders Stenman <anders.stenman <at> niradynamics.se>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 05 Jan 2021 09:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Anders Stenman <anders.stenman <at> niradynamics.se>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 28.0.50; Permission denied when removing eln-cache and stuck in
 endless loop
Date: Tue, 5 Jan 2021 08:25:10 +0000
[Message part 1 (text/plain, inline)]
I am trying out the native-comp branch on a Windows 10 box. It works quite well after tweaking the PATH prior to startup, but intermittently emacs gets stuck in an endless loop when it tries to remove files in the eln-cache.

  kill-emacs(-1)
  debug(error (file-error "Removing old name" "Permission denied" "c:/Users/anste/AppData/Roaming/.emacs.d/eln-cache/..."))
  kill-emacs(-1)
  debug(error (file-error "Removing old name" "Permission denied" "c:/Users/anste/AppData/Roaming/.emacs.d/eln-cache/..."))
  kill-emacs(-1)
  debug(error (file-error "Removing old name" "Permission denied" "c:/Users/anste/AppData/Roaming/.emacs.d/eln-cache/..."))
  kill-emacs(-1)
...
  debug(error (file-error "Removing old name" "Permission denied" "c:/Users/anste/AppData/Roaming/.emacs.d/eln-cache/..."))
  kill-emacs(-1)
  debug(error (file-error "Removing old name" "Permission denied" "c:/Users/anste/AppData/Roaming/.emacs.d/eln-cache/..."))
  kill-emacs(-1)
  debug(error (file-error "Removing old name" "Permission denied" "c:/Users/anste/AppData/Roaming/.emacs.d/eln-cache/..."))

In GNU Emacs 28.0.50 (build 10, x86_64-w64-mingw32)
of 2020-12-29 built on NIRA-PC11BYX2
Repository revision: 3f00d666e9674ba18f1ded490a27ac2868a32a88
Repository branch: feature/native-comp
Windowing system distributor 'Microsoft Corp.', version 10.0.20279
System Description: Microsoft Windows 10 Enterprise (v10.0.2004.20279.1)


Configured using:
'configure --without-imagemagick --with-json --without-pop
--without-compress-install --without-dbus --with-modules
--with-nativecomp'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2
HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES NATIVE_COMP THREADS JSON
PDUMPER LCMS2

Important settings:
  value of $LANG: SVE
  locale-coding-system: cp1252

Major mode: Fundamental

Minor modes in effect:
  show-paren-mode: t
  recentf-mode: t
  global-diff-hl-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils company-oddmuse
company-keywords company-etags etags fileloop generator xref project
ring company-gtags company-dabbrev-code company-dabbrev company-files
company-clang company-capf company-cmake company-semantic
company-template company-bbdb company pcase paren cus-start cus-load
flycheck ansi-color find-func dash use-package-ensure all-the-icons
all-the-icons-faces data-material data-weathericons data-octicons
data-fileicons data-faicons data-alltheicons memoize imenu edmacro
kmacro recentf tree-widget wid-edit diff-hl vc-dir ewoc vc vc-dispatcher
diff-mode easy-mmode powerline advice powerline-separators color
powerline-themes mic-paren use-package-core tree-sitter-langs
tree-sitter-langs-build tar-mode arc-mode archive-mode pp tree-sitter-hl
tree-sitter tree-sitter-load tree-sitter-cli tsc tsc-dyn tsc-dyn-get
dired-aux dired dired-loaddefs tsc-obsolete ede/auto eieio-base tex-site
info package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source eieio eieio-core eieio-loaddefs password-cache
json map url-vars comp comp-cstr warnings subr-x rx cl-seq cl-macs
cl-extra help-mode easymenu seq byte-opt gv cl-loaddefs cl-lib bytecomp
byte-compile cconv iso-transl tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win
w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic 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 charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty
make-network-process nativecomp emacs)

Memory information:
((conses 16 179919 224527)
(symbols 48 16535 14)
(strings 32 61416 69094)
(string-bytes 1 1829253)
(vectors 16 28805)
(vector-slots 8 391062 277224)
(floats 8 468 823)
(intervals 56 359 523)
(buffers 984 15))

        Anders Stenman
Systems Engineer
Development Services    [cid:nd_logo_d020cb30-0d08-4da8-8390-474f0e5447c8.png]
        NIRA Dynamics AB
Wallenbergs gata 4
58330 Link?ping
Sweden  Mobile: +46 733 580 102
anders.stenman <at> niradynamics.se
www.niradynamics.se
        Together for smarter safety

[Message part 2 (text/html, inline)]
[nd_logo_d020cb30-0d08-4da8-8390-474f0e5447c8.png (image/png, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45671; Package emacs. (Tue, 05 Jan 2021 09:51:01 GMT) Full text and rfc822 format available.

Message #8 received at 45671 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Anders Stenman <anders.stenman <at> niradynamics.se>
Cc: 45671 <at> debbugs.gnu.org
Subject: Re: bug#45671: 28.0.50; Permission denied when removing eln-cache
 and stuck in endless loop
Date: Tue, 05 Jan 2021 09:50:07 +0000
Anders Stenman <anders.stenman <at> niradynamics.se> writes:

> I am trying out the native-comp branch on a Windows 10 box. It works quite well after tweaking the PATH prior to startup,
> but intermittently emacs gets stuck in an endless loop when it tries to remove files in the eln-cache.

Hi Anders,

Okay so IIUC this is happening only when exiting Emacs (and we try to
do some clean-up on the eln-cache folder), am I correct?

Thanks

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45671; Package emacs. (Tue, 05 Jan 2021 11:19:01 GMT) Full text and rfc822 format available.

Message #11 received at 45671 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Anders Stenman <anders.stenman <at> niradynamics.se>
Cc: 45671 <at> debbugs.gnu.org
Subject: Re: bug#45671: 28.0.50; Permission denied when removing eln-cache
 and stuck in endless loop
Date: Tue, 05 Jan 2021 11:18:12 +0000
[re-adding the bug in Cc]

Anders Stenman <anders.stenman <at> niradynamics.se> writes:

> No, it seems to happen sometimes (not every time) after I have updated
> packages from ELPA. Emacs just spits out these messages in the "Async
> native compile log" buffer. In that case I have to terminate emacs the
> hard way by killing the process.

Okay the I think the trouble is in `comp-delete-or-replace-file' when
gets called from `comp--compile-ctxt-to-file' (probably through
`comp-clean-up-stale-eln').

There's some specific Windows handling for shared that can't be removed
because still loaded.

  Andrea

PS can't you kill the sub processes?  Or the main Emacs is hanging?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45671; Package emacs. (Fri, 08 Jan 2021 11:28:02 GMT) Full text and rfc822 format available.

Message #14 received at 45671 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Anders Stenman <anders.stenman <at> niradynamics.se>
Cc: 45671 <at> debbugs.gnu.org
Subject: Re: bug#45671: 28.0.50; Permission denied when removing eln-cache
 and stuck in endless loop
Date: Fri, 08 Jan 2021 11:27:00 +0000
[re-adding the bug in Cc]

Anders Stenman <anders.stenman <at> niradynamics.se> writes:

> Hello Andrea,
>
> More info: The problem seems to occur after updating packages. If I
> then try to quit emacs, I get the normal question regarding that
> subprocesses are running and I have confirm exiting. After entering
> "yes" I get a dialog telling me that emacs has crashed.
>
> Kind regards,
> /Anders

Hi Anders,

as mentioned I think the issue is on `comp-delete-or-replace-file'.
This is probably trying to delete a file that Windows does not allow to
be deleted (being a shared library still a loaded).

As you can see `comp-delete-or-replace-file' has some specific Windows
handling that someone on a Windows system should debug ;)

Thanks

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45671; Package emacs. (Mon, 01 Feb 2021 21:15:02 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>
Cc: Anders Stenman <anders.stenman <at> niradynamics.se>, 45671 <at> debbugs.gnu.org
Subject: Re: bug#45671: 28.0.50; Permission denied when removing eln-cache
 and stuck in endless loop
Date: Mon, 01 Feb 2021 21:14:40 +0000
Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:

> [re-adding the bug in Cc]
>
> Anders Stenman <anders.stenman <at> niradynamics.se> writes:
>
>> Hello Andrea,
>>
>> More info: The problem seems to occur after updating packages. If I
>> then try to quit emacs, I get the normal question regarding that
>> subprocesses are running and I have confirm exiting. After entering
>> "yes" I get a dialog telling me that emacs has crashed.
>>
>> Kind regards,
>> /Anders
>
> Hi Anders,
>
> as mentioned I think the issue is on `comp-delete-or-replace-file'.
> This is probably trying to delete a file that Windows does not allow to
> be deleted (being a shared library still a loaded).
>
> As you can see `comp-delete-or-replace-file' has some specific Windows
> handling that someone on a Windows system should debug ;)
>
> Thanks
>
>   Andrea

Ping :)

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45671; Package emacs. (Mon, 01 Feb 2021 21:15:02 GMT) Full text and rfc822 format available.

Reply sent to Andrea Corallo <akrl <at> sdf.org>:
You have taken responsibility. (Tue, 02 Feb 2021 14:47:02 GMT) Full text and rfc822 format available.

Notification sent to Anders Stenman <anders.stenman <at> niradynamics.se>:
bug acknowledged by developer. (Tue, 02 Feb 2021 14:47:02 GMT) Full text and rfc822 format available.

Message #25 received at 45671-done <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Anders Stenman <anders.stenman <at> niradynamics.se>
Cc: 45671-done <at> debbugs.gnu.org
Subject: Re: bug#45671: 28.0.50; Permission denied when removing eln-cache
 and stuck in endless loop
Date: Tue, 02 Feb 2021 14:46:41 +0000
Anders Stenman <anders.stenman <at> niradynamics.se> writes:

> Hello,
>
> I built a new version a couple of days ago and it seems that the problem is gone now. Thank you for your hard work!
>
> Kind regards,
> /Anders

Nice, closing then.  We can always reopen in case.

Thanks

  Andrea




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 03 Mar 2021 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 54 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.