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

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

bug#35506: 27.0.50; Emacs hangs while interrupting tramp processes


From: John Shahid
Subject: bug#35506: 27.0.50; Emacs hangs while interrupting tramp processes
Date: Tue, 30 Apr 2019 13:06:39 -0400

There are two issues I ran into recently while trying to interrupt a
remote process spawned by tramp.  The process in question is terraform
which ahss the following process tree:

  process1 (spawned by tramp)
  ⌞ process2 (child process)
    ⌞ process3 (multiple sub processes)
    ⌞ process4

process1 does not handle signals which causes the interrupts to be
ignored.  Moreover because of the following line in
`tramp-interrupt-process', Emacs ends up busy waiting until the process
exits:

  (with-timeout (1 (ignore))
    (while (tramp-accept-process-output proc))
    ;; Report success.
    proc)

It looks like the first issue can be solved by killing the entire
process group, but I am not sure how safe it is to always do that.  I
will attach a patch that I use locally which seem harmless so far.

The second issue can be solved by not waiting for the process to exit.
This seems to be in line with the contract of `interrupt-process'.  I
will attach a patch to remove the wait.


Note, the following commit is not on master.  This is a local commit
with a bunch of changes that I'm trying to get pushed to master.

In GNU Emacs 27.0.50 (build 22, x86_64-pc-linux-gnu, GTK+ Version 3.24.8)
 of 2019-04-29 built on amun
Repository revision: cf2d0e2e58a683756878c9c7e4dd2066efe6e807
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Arch Linux

Recent messages:
Mark saved where search started
[a-z..]:Set [SPC]:clear
Quit [2 times]
Winner undo (1 / 199)
[mu4e] Switched context to personal
(New file)
Mark set
Starting new Ispell process /usr/bin/ispell with default dictionary...
Invalid face attribute :inherit mu4e-header-key-face [17 times]
Message modified; kill anyway? (y or n) y

Configured using:
 'configure --prefix=/home/jvshahid/bin/emacs-27
 
PKG_CONFIG_PATH=/home/jvshahid/.gvm/pkgsets/go1.11.1/global/overlay/lib/pkgconfig:'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LIBSYSTEMD JSON PDUMPER
LCMS2 GMP

Important settings:
  value of $LC_COLLATE: en_US.UTF-8
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: mu4e-headers

Minor modes in effect:
  global-magit-file-mode: t
  global-git-commit-mode: t
  hl-line-mode: t
  recentf-mode: t
  show-paren-mode: t
  display-battery-mode: t
  global-company-mode: t
  company-mode: t
  flx-ido-mode: t
  helm-mode: t
  async-bytecomp-package-mode: t
  winner-mode: t
  global-auto-revert-mode: t
  savehist-mode: t
  display-time-mode: t
  direnv-mode: t
  shell-dirtrack-mode: t
  projectile-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  file-name-shadow-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:
/home/jvshahid/.emacs.d/straight/build/soap-client/soap-client hides 
/home/jvshahid/bin/emacs-27/share/emacs/27.0.50/lisp/net/soap-client
/home/jvshahid/.emacs.d/straight/build/soap-client/soap-inspect hides 
/home/jvshahid/bin/emacs-27/share/emacs/27.0.50/lisp/net/soap-inspect
/home/jvshahid/.emacs.d/straight/build/cl-lib/cl-lib hides 
/home/jvshahid/bin/emacs-27/share/emacs/27.0.50/lisp/emacs-lisp/cl-lib
/home/jvshahid/.emacs.d/straight/build/let-alist/let-alist hides 
/home/jvshahid/bin/emacs-27/share/emacs/27.0.50/lisp/emacs-lisp/let-alist
/home/jvshahid/.emacs.d/straight/build/seq/seq hides 
/home/jvshahid/bin/emacs-27/share/emacs/27.0.50/lisp/emacs-lisp/seq
/home/jvshahid/.emacs.d/straight/build/cl-generic/cl-generic hides 
/home/jvshahid/bin/emacs-27/share/emacs/27.0.50/lisp/emacs-lisp/cl-generic

Features:
(shadow sort mail-extr emacsbug flyspell ispell supercite regi
face-remap eieio-opt wgrep tramp-archive tramp-gvfs zeroconf dbus novice
cl-print debug help-fns company-robe flycheck robe url-http url-auth
url-gw inf-ruby hideshow cap-words superword subword ruby-mode
ace-window avy pcmpl-unix bug-reference timezone tabify org-capture
org-archive helm-org shr-color shr svg helm-misc helm-ring org-duration
diary-lib diary-loaddefs cal-iso org-indent org-rmail org-mhe org-irc
org-info org-gnus nnir org-docview org-bibtex bibtex org-bbdb org-w3m
org-agenda conf-mode tramp-cmds magit-extras magit-bookmark
magit-submodule magit-obsolete magit-blame magit-stash magit-bisect
magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log which-func magit-diff
smerge-mode magit-core magit-autorevert magit-margin magit-transient
magit-process magit-mode transient git-commit magit-git magit-section
magit-utils crm log-edit pcvs-util add-log with-editor dired-aux vc-git
diff-mode helm-eshell skeleton dabbrev org-mu4e org-element avl-tree org
org-macro org-footnote org-pcomplete org-list org-faces org-entities
org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table
ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs mu4e desktop frameset mu4e-speedbar speedbar sb-image
ezimage dframe mu4e-main mu4e-view cal-menu calendar cal-loaddefs
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc
nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader mu4e-headers
mu4e-compose mu4e-context mu4e-draft mu4e-actions rfc2368 smtpmail
sendmail mu4e-mark mu4e-message flow-fill mu4e-proc mu4e-utils doc-view
image-mode mu4e-lists mu4e-vars message rfc822 mml mml-sec epa derived
epg gnus-util rmail rmail-loaddefs text-property-search mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev gmm-utils mailheader hl-line mu4e-meta
two-column iso-transl rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid
rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn
nxml-ns nxml-mode nxml-outln nxml-rap sgml-mode dom nxml-util nxml-enc
xmltok sh-script smie executable recentf helm-for-files helm-bookmark
helm-adaptive bookmark pp helm-external helm-net browse-url xml misearch
multi-isearch helm-command helm-elisp helm-eval edebug backtrace
helm-info time-date jka-compr eshell-z windmove ffap em-unix em-term
term disp-table ehelp em-script em-prompt em-ls em-hist em-pred em-dirs
esh-var em-cmpl em-basic em-banner em-alias esh-mode eshell esh-cmd
esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups
parinfer-ext paredit parinfer ediff-merg ediff-wind ediff-diff
ediff-mult ediff-help ediff-init ediff-util ediff mode-local find-func
parinferlib dired-x dired dired-loaddefs paren battery cus-start
cus-load floobits-autoloads highlight-autoloads finder-inf
company-terraform-autoloads terraform-mode-autoloads hcl-mode-autoloads
arduino-mode-autoloads ede/auto lsp-java request mail-utils url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf mailcap lsp lsp-mode markdown-mode edit-indirect color
noutline outline tree-widget wid-edit url-util spinner network-stream
puny nsm rmc inline imenu ht f s em-glob esh-util dash-functional
flymake-proc flymake warnings cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs lsp-java-autoloads
request-autoloads rust-mode-autoloads haskell-mode-autoloads
flycheck-clojure-autoloads cider-autoloads sesman-autoloads
queue-autoloads clojure-mode-autoloads parinfer-autoloads
paredit-autoloads ginkgo-mode-autoloads go-rename-autoloads
company-go-autoloads go-eldoc-autoloads go-guru-autoloads
go-mode-autoloads robe-autoloads inf-ruby-autoloads rvm-autoloads
company-lsp-autoloads lsp-ui-autoloads lsp-mode-autoloads
spinner-autoloads ht-autoloads f-autoloads dash-functional-autoloads
company-oddmuse company-keywords company-etags etags fileloop generator
xref project company-gtags company-dabbrev-code company-dabbrev
company-files company-capf company-cmake company-xcode company-clang
company-semantic company-eclim company-template company-bbdb company
company-autoloads emms-autoloads pianobar-autoloads eshell-z-autoloads
cl flx-ido flx flx-ido-autoloads flx-autoloads helm-mode helm-config
helm-easymenu async-bytecomp helm-projectile helm-files helm-tags
helm-buffers helm-occur helm-grep helm-regexp helm-utils helm-locate
helm-help helm-types helm helm-source eieio-compat helm-multi-match
helm-lib async helm-projectile-autoloads helm-autoloads
helm-core-autoloads popup-autoloads git-link-autoloads magit-autoloads
transient-autoloads git-commit-autoloads winner golden-ratio
golden-ratio-autoloads emacs-rotate-autoloads exwm-randr xcb-randr
exwm-config ido exwm exwm-input xcb-keysyms xcb-xkb exwm-manage
exwm-floating xcb-cursor xcb-render exwm-layout exwm-workspace exwm-core
xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types xcb-debug exwm-autoloads
xelb-autoloads cl-generic-autoloads tango-dark-theme server edmacro
kmacro autorevert filenotify savehist time direnv dash tramp-cache
tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x
tramp-compat ucs-normalize shell pcomplete parse-time format-spec advice
projectile grep ibuf-ext ibuffer ibuffer-loaddefs direnv-autoloads
with-editor-autoloads async-autoloads edit-indirect-autoloads
concourse-mode-autoloads hierarchy-autoloads wgrep-autoloads
flycheck-autoloads seq-autoloads let-alist-autoloads dash-autoloads
ace-window-autoloads avy-autoloads dockerfile-mode-autoloads s-autoloads
yasnippet-snippets-autoloads yasnippet-autoloads protobuf-mode-autoloads
markdown-mode-autoloads yaml-mode-autoloads etags-select-autoloads
projectile-autoloads pkg-info-autoloads epl-autoloads debbugs-autoloads
soap-client-autoloads cl-lib-autoloads straight-autoloads rx compile
comint ansi-color ring cl-extra straight info autoload radix-tree
easy-mmode pcase checkdoc lisp-mnt thingatpt help-mode elec-pair
mule-util package easymenu epg-config url-handlers url-parse auth-source
cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json
subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame 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 minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 1216656 1103680)
 (symbols 48 59970 35)
 (strings 32 281872 133497)
 (string-bytes 1 10869916)
 (vectors 16 140937)
 (vector-slots 8 2037180 840586)
 (floats 8 1188 2973)
 (intervals 56 67788 22723)
 (buffers 992 210))





reply via email to

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