From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Georgi Danov Newsgroups: gmane.emacs.bugs Subject: bug#60534: 28.2; Forbidden reentrant call of Tramp Date: Tue, 3 Jan 2023 21:52:36 +0100 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15006"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael.albinus@gmx.de To: 60534@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 04 00:57:18 2023 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 1pCr9i-0003g9-1I for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Jan 2023 00:57:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCr9a-0008Ns-QM; Tue, 03 Jan 2023 18:57:10 -0500 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 1pCr9V-0008MQ-57 for bug-gnu-emacs@gnu.org; Tue, 03 Jan 2023 18:57:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pCr9S-00074n-Aa for bug-gnu-emacs@gnu.org; Tue, 03 Jan 2023 18:57:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCr9S-0006dM-6G for bug-gnu-emacs@gnu.org; Tue, 03 Jan 2023 18:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Georgi Danov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Jan 2023 23:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60534 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.167279020325447 (code B ref -1); Tue, 03 Jan 2023 23:57:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Jan 2023 23:56:43 +0000 Original-Received: from localhost ([127.0.0.1]:47091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCr98-0006cH-8f for submit@debbugs.gnu.org; Tue, 03 Jan 2023 18:56:43 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:45428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCoHI-0000t1-6Y for submit@debbugs.gnu.org; Tue, 03 Jan 2023 15:52:57 -0500 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 1pCoHH-0003pq-UF for bug-gnu-emacs@gnu.org; Tue, 03 Jan 2023 15:52:55 -0500 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pCoHF-0007y5-9v for bug-gnu-emacs@gnu.org; Tue, 03 Jan 2023 15:52:55 -0500 Original-Received: by mail-wm1-x32c.google.com with SMTP id ay2-20020a05600c1e0200b003d22e3e796dso24622100wmb.0 for ; Tue, 03 Jan 2023 12:52:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=Oc9SIISq6A//txLFijC/zGtz3WyIlv/dDt8RNYxKpHk=; b=dqQ/n05gh4TVBaF3zP3UUilrIs15cPRKKKlVC1abAXLk7aCVp6L9o+I7fTiI4yldZv WNu503DwRqOkbg2vZuEIcedygowYuzaTBUnAeD6OtnsUTC4PkbnoHfj4ljcPkG5BxjlO CyFvLl3PLjEDMyWoU6kqqlV5hG3n8srJ+M315GHbLp1yI7VFWW3LcNxwFhXDmyq0+ffF Y0edWb4Oy0WV3f+w45LBdePFSnIL7zWAZXzQiMADJcXcVEeerYBi0/Qcnwi2645bFOGs 2Lbv5ntsI2E+9m3ae0g8FRi6Ib81LCZB7fJkl+5YiDGuR+YuS280yZIsEWtr/MDX3DuE xYmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Oc9SIISq6A//txLFijC/zGtz3WyIlv/dDt8RNYxKpHk=; b=f7WTad5PHd2YsIgCwZw8Qf/dLrxn3e5AdjwLLesAnyyHQY6+W1TcaUiGvG2Eh9ZRD+ RzcH+dPgrLRDn8egHhoHy7Sdn3V8B6QEr52TQnT0DUtDQl8y+SJoU9yhFfPMHZ4nzYCq Qx1SxLT04URGj0ezU7JBjLXaMFqZgJb8NoAsHg+3ynao10sw4P83hsdi2dEWSWMhFFld G+QcbHmx1Ct9IU2YgY9QKr5P1EvzZPajbmgWScnvTVNqSnDL6yjuO7Pq9IIN9+dYrqvH jc6TFI4ZNZtpVGahpYqB9WCb0orXOJsgCqrUfeWgMfOEOjsNQkSaywMcQmECJviAFYzi fCUg== X-Gm-Message-State: AFqh2kr9evyKybhGlalYkWXfUKg3Oi0i5Tbbn8oRQBN2STUrV6xkrKkU B7BteUsqaIpOh6ROuClaixkqFJ7+Bpm/Lw== X-Google-Smtp-Source: AMrXdXuvo84pWT0B8o+essO4HOoTjmyzB8Ggfm5B703vTdHcMPIoXmZ+5R7Bt6fw6jh7jfsDvntVrA== X-Received: by 2002:a05:600c:3acd:b0:3d1:c354:77b6 with SMTP id d13-20020a05600c3acd00b003d1c35477b6mr35831390wms.29.1672779171013; Tue, 03 Jan 2023 12:52:51 -0800 (PST) Original-Received: from smtpclient.apple (77.117.202.17.wireless.dyn.drei.com. [77.117.202.17]) by smtp.gmail.com with ESMTPSA id x7-20020a05600c188700b003d9aa76dc6asm15975730wmp.0.2023.01.03.12.52.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jan 2023 12:52:50 -0800 (PST) X-Mailer: Apple Mail (2.3731.300.101.1.3) Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=georgi.danov@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 03 Jan 2023 18:56:39 -0500 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:252440 Archived-At: As discussed in github issue https://github.com/joaotavora/eglot/issues/859# eglot over tramp throws "reentrant call" error. This is sympthom of underlying design issue - aux libraries use files without being aware of the tramp conection, the connection itself has no concurrency control, pooling or other multi-user features and without that guard error different tramp = clients corrupt each other's communication with the language server. The problem is reproducible by using company mode, probably the language is not important. In my case it's typescript. Takes 15-30 seconds of editing and autocomplete to trigger it. The main congestions seems to happen in file-truename() -- after displaying candidate company mode goes on to do refresh in the = background and calls file-truename repeatedly while eglot (or someone else) is = occupying the tramp connection. Point is -- the same tramp connection is used by eglot and any other minor mode that queries file name or state, but they have no means to share or coordinate this use other than the exception above. Tramp used to throw more insignificant error in the past and tolerate the behavior (which corrupts the data exchanged between eglot and the lsp) and now throws this error. See `with-tramp-locked-connection` macro.=20 I got this problem with other minor modes too, but did not capture the stack as I lowered the error prio via (add-to-list 'debug-ignored-errors 'remote-file-error). Reading the code would've suggested corruption won't happen but still garbage was let in the stdio pipe and eglot lost = track of the buffer state. -------------------------- In GNU Emacs 28.2 (build 1, x86_64-apple-darwin22.1.0, Carbon Version = 169 AppKit 2299) of 2022-11-24 built on GDMBP.local Windowing system distributor 'Apple Inc.', version 13.1.0 System Description: macOS 13.1 Configured using: 'configure --enable-locallisppath=3D/usr/local/share/emacs/site-lisp = --infodir=3D/usr/local/Cellar/emacs-mac/emacs-28.2-mac-9.1/share/info/emac= s --prefix=3D/usr/local/Cellar/emacs-mac/emacs-28.2-mac-9.1 --with-mac --enable-mac-app=3D/usr/local/Cellar/emacs-mac/emacs-28.2-mac-9.1 --with-gnutls --with-modules' Configured features: ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE PDUMPER THREADS TOOLKIT_SCROLL_BARS XIM ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: TSX Minor modes in effect: rainbow-delimiters-mode: t electric-pair-mode: t guru-mode: t subword-mode: t eglot--managed-mode: t flymake-mode: t popper-echo-mode: t popper-mode: t global-git-commit-mode: t magit-auto-revert-mode: t joro-mode: t doom-modeline-mode: t minions-mode: t override-global-mode: t global-flycheck-mode: t flycheck-mode: t global-hl-todo-mode: t hl-todo-mode: t which-function-mode: t global-company-mode: t company-mode: t helm-mode: t helm-minibuffer-history-mode: t helm-descbinds-mode: t helm--remap-mouse-mode: t async-bytecomp-package-mode: t ivy-mode: t editorconfig-mode: t winner-mode: t global-undo-tree-mode: t undo-tree-mode: t global-anzu-mode: t anzu-mode: t projectile-mode: t volatile-highlights-mode: t global-hl-line-mode: t super-save-mode: t windmove-mode: t recentf-mode: t savehist-mode: t save-place-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-mode: t global-auto-revert-mode: t delete-selection-mode: t prelude-mode: t shell-dirtrack-mode: t which-key-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mac-mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: /Users/gdanov/.emacs.d/elpa/cmake-mode-20221130.1357/cmake-mode hides = /usr/local/share/emacs/site-lisp/cmake/cmake-mode /Users/gdanov/.emacs.d/elpa/transient-20221119.1503/transient hides = /usr/local/Cellar/emacs-mac/emacs-28.2-mac-9.1/share/emacs/28.2/lisp/trans= ient Features: (shadow sort mail-extr emacsbug sendmail typescript-mode cc-mode-expansions smartparens-c cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs eieio-opt speedbar ezimage dframe helm-command bug-reference helm-x-files elisp-slime-nav rainbow-delimiters elec-pair guru-mode subword-mode-expansions cap-words superword subword eglot array jsonrpc ert debug flymake-proc flymake ffap tramp-archive tramp-gvfs dbus helm-for-files helm-bookmark helm-adaptive helm-external helm-net codespaces use-package-ensure-system-package system-packages use-package use-package-delight use-package-diminish tramp-theme em-dirs esh-var esh-mode poly-markdown smartparens-markdown markdown-mode polymode poly-lock polymode-base polymode-weave polymode-export polymode-compat polymode-methods polymode-core polymode-classes eieio-custom eieio-base graphql-mode let-alist org-jira org-jira-sdk jiralib request soap-client url-http url-auth url-gw nsm rng-xsd xsd-regexp xml org-clock the-org-mode-expansions org-element avl-tree smartparens-org org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs git-link popper-echo popper magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog 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 magit-diff smerge-mode git-commit log-edit message rmc puny rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util rmail rmail-loaddefs mailabbrev mail-utils gmm-utils mailheader add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor server magit-mode transient magit-git magit-base magit-section crm compat-27 compat-26 prettier-js web-mode-expansions web-mode disp-table smart-shift indent-tools yafolding hydra lv indent-tools-indentation-of highlight-indentation helm-cider-history helm-cider helm-cider-spec helm-cider-repl helm-cider-cheatsheet helm-cider-util cider-cheatsheet cider cider-debug cider-browse-ns cider-mode cider-find cider-inspector cider-completion cider-profile cider-eval cider-jar arc-mode archive-mode cider-repl-history pulse cider-repl cider-resolve cider-test cider-overlays cider-stacktrace cider-doc cider-browse-spec cider-clojuredocs cider-eldoc cider-client cider-common cider-connection cider-util cider-popup sesman-browser nrepl-client nrepl-dict spinner clojure-mode-expansions smartparens-clojure sesman clojure-mode align parseedn parseclj-parser parseclj-lex parseclj-alist posframe doom-modeline doom-modeline-segments doom-modeline-env doom-modeline-core all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons shrink-path f f-shortdoc shortdoc s minions doom-themes-ext-org doom-themes-ext-treemacs doom-themes-ext-neotree doom-themes-ext-visual-bell face-remap doom-one-theme doom-themes doom-themes-base nlinum linum helm-ring helm-ls-git derived vc-git helm-ag helm-xref use-package-bind-key bind-key rainbow-mode quelpa-use-package quelpa mm-decode mm-bodies mm-encode help-fns radix-tree use-package-ensure use-package-core prelude-modules prelude-xml nxml-mode-expansions 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 html-mode-expansions smartparens-html sgml-mode facemenu dom nxml-util nxml-enc xmltok prelude-shell sh-script smie executable prelude-emacs-lisp prelude-lisp prelude-programming flycheck hl-todo compat compat-macs which-func prelude-css prelude-company 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 prelude-helm-everywhere helm-mode helm-misc helm-descbinds helm-eshell helm-elisp helm-eval edebug backtrace find-func helm-info prelude-helm helm-projectile helm-files image-dired image-mode exif helm-tags helm-buffers helm-occur helm-grep helm-regexp helm-locate helm-types helm-imenu helm-utils helm-help helm helm-global-bindings helm-easymenu helm-core async-bytecomp helm-source helm-multi-match helm-lib async helm-config prelude-ivy two-column ivy ivy-faces ivy-overlay colir color prelude-macos exec-path-from-shell prelude-global-keybindings warnings prelude-editor editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch operate-on-number calc-bin calc-ext calc calc-loaddefs calc-macs diff-hl smartrep log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode winner undo-tree diff queue eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util re-builder whitespace tabify browse-kill-ring midnight ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util dired-x anzu avy tramp-sh projectile skeleton ibuf-macs find-dired dired dired-loaddefs lisp-mnt mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr grep compile ibuf-ext ibuffer ibuffer-loaddefs bookmark text-property-search pp expand-region text-mode-expansions er-basic-expansions expand-region-core expand-region-custom flyspell ispell rect etags fileloop generator xref project volatile-highlights hl-line super-save windmove recentf tree-widget wid-edit savehist saveplace diminish smartparens-config smartparens-text smartparens advice dash autorevert filenotify delsel prelude-mode easy-mmode crux docker-tramp tramp-cache tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete comint ansi-color ring parse-time iso8601 time-date ls-lisp format-spec thingatpt imenu-anywhere imenu pcase jka-compr prelude-core epl prelude-ui which-key prelude-custom prelude-packages cl-extra help-mode finder-inf rx info edmacro kmacro 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 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 iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/mac-win mac-win 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 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 emoji-zwj 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 kqueue mac multi-tty make-network-process emacs) Memory information: ((conses 16 1024998 582937) (symbols 48 64969 19) (strings 32 287822 163197) (string-bytes 1 9937920) (vectors 16 113430) (vector-slots 8 2200185 552812) (floats 8 1234 2058) (intervals 56 14261 3055) (buffers 992 43))