From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: John Shahid Newsgroups: gmane.emacs.bugs Subject: bug#35506: 27.0.50; Emacs hangs while interrupting tramp processes Date: Tue, 30 Apr 2019 13:06:39 -0400 Message-ID: <87y33rzalc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="76508"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Michael Albinus To: 35506@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 30 19:26:55 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLWWs-000Jm3-VL for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Apr 2019 19:26:55 +0200 Original-Received: from localhost ([127.0.0.1]:50690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLWWr-0004rO-US for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Apr 2019 13:26:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLWEi-0006t2-5Z for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 13:08:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLWEf-0001TT-II for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 13:08:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56992) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hLWEd-0001SQ-Ir for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 13:08:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hLWEd-0006Xw-9g for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 13:08:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: John Shahid Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Apr 2019 17:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35506 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.155664402325068 (code B ref -1); Tue, 30 Apr 2019 17:08:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Apr 2019 17:07:03 +0000 Original-Received: from localhost ([127.0.0.1]:42303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLWDe-0006W5-Ab for submit@debbugs.gnu.org; Tue, 30 Apr 2019 13:07:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLWDa-0006Ve-9q for submit@debbugs.gnu.org; Tue, 30 Apr 2019 13:07:00 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:37322) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLWDT-0000p9-Qk for submit@debbugs.gnu.org; Tue, 30 Apr 2019 13:06:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLWDR-0005uZ-Ki for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 13:06:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLWDP-0000nG-2U for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 13:06:49 -0400 Original-Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]:43100) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hLWDM-0000m8-R6 for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 13:06:45 -0400 Original-Received: by mail-qk1-x741.google.com with SMTP id p19so8607855qkm.10 for ; Tue, 30 Apr 2019 10:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IcRkc/Wlf/nbKKSHTcFXyhwf609VYP8zg/NapyaH1qc=; b=hd5cEsjTMVqEYqA1XkCWQU5H8yezPav1DsRmgwAY8MQyr+Jj9wlNPLR//dLB5hrUIC JAv7jdFgZi469XutyKLqVyvoaxWPjgVUK9WtBoX2VxIHUzzfYz796UMctvv4byN6AK4q 4WQpSTb/n7e21g8pwiQogYu+yJf9Aj219QUxhS/zof5HWMbQqmWN7dpM+cZgvvIDJPNS p6hRCbt5D11bM1hGcQ49em0Y1bf5aqp/UbpmSTgzdTuZ2DqdYV0JA1yaedXOs3JN44zZ 80TdGVPNsEWnSqwodBjOvqIFUrGRgXwEYWIKWQZmWW6p84HDUYM55Ny90rw2774sx7wU wwGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IcRkc/Wlf/nbKKSHTcFXyhwf609VYP8zg/NapyaH1qc=; b=jKnm1UJwKfqbWj7/lvoyTgJ09YEnfu9RsRxP9cyz2K7euAhKCD3eTWcngI1JtfUHOp GgXiCqqVqaIe7WnwyAPrzCS7r4gQUa+89hrfQGYiV0LnZiB9aFEsxVdzEqpSANOYjkjK rXb3E3Sq1E5n3lDShZxJj5h8zEvPyz3+gWsHzbyXVMXZQ7eO5EStFPCTKM4iAwya+OkF 80SgBLZLceahujXzTtZJGP9xMqFN1YFM7rfDuDqEHWmfmPoMAWgfAwrE5QucHcOoLkxX ucb/JHSEL4oB1F3KQnB/n2nO8tq50urw3dr+/CaO6ppCYkDW2y3rMorEKud/BeXfvM4z XDoA== X-Gm-Message-State: APjAAAVOuA1FouRuJkzCXOjoF3xQMBaI3d6xepdc62eVFcwlyXiuDWrL KtMZhtU2zvd/b17wd9+Qwh0= X-Google-Smtp-Source: APXvYqzEf7WaaU1ZrQnbEGCBcaXGIefeTmcKnEDZ/MWTyOp9oYRRzduCp7t+SyXuhD+o2kfTEBa53A== X-Received: by 2002:ae9:ef07:: with SMTP id d7mr44791161qkg.295.1556644003703; Tue, 30 Apr 2019 10:06:43 -0700 (PDT) Original-Received: from amun (cpe-104-162-85-46.nyc.res.rr.com. [104.162.85.46]) by smtp.gmail.com with ESMTPSA id r35sm588700qtc.37.2019.04.30.10.06.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Apr 2019 10:06:42 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158517 Archived-At: 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) =E2=8C=9E process2 (child process) =E2=8C=9E process3 (multiple sub processes) =E2=8C=9E 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=3D/home/jvshahid/bin/emacs-27 PKG_CONFIG_PATH=3D/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/b= in/emacs-27/share/emacs/27.0.50/lisp/emacs-lisp/cl-lib /home/jvshahid/.emacs.d/straight/build/let-alist/let-alist hides /home/jvsh= ahid/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/ema= cs-27/share/emacs/27.0.50/lisp/emacs-lisp/seq /home/jvshahid/.emacs.d/straight/build/cl-generic/cl-generic hides /home/jv= shahid/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))