From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter Date: Wed, 21 Jan 2015 17:15:14 +0100 Message-ID: <87d268jejx.fsf@gmx.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1421856974 639 80.91.229.3 (21 Jan 2015 16:16:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Jan 2015 16:16:14 +0000 (UTC) Cc: 19636@debbugs.gnu.org To: Philippe Vaucher Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 21 17:16:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YDxwy-00067K-7m for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Jan 2015 17:16:12 +0100 Original-Received: from localhost ([::1]:49042 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDxwx-0002cO-1D for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Jan 2015 11:16:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDxwr-0002bZ-4o for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2015 11:16:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDxwo-0003Dw-D2 for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2015 11:16:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDxwo-0003Dq-9r for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2015 11:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YDxwn-0004iK-Up for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2015 11:16:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Jan 2015 16:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19636 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19636-submit@debbugs.gnu.org id=B19636.142185692318056 (code B ref 19636); Wed, 21 Jan 2015 16:16:01 +0000 Original-Received: (at 19636) by debbugs.gnu.org; 21 Jan 2015 16:15:23 +0000 Original-Received: from localhost ([127.0.0.1]:52024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YDxwB-0004hA-E8 for submit@debbugs.gnu.org; Wed, 21 Jan 2015 11:15:23 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:64999) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YDxw9-0004gu-32 for 19636@debbugs.gnu.org; Wed, 21 Jan 2015 11:15:21 -0500 Original-Received: from detlef.gmx.de ([87.146.42.121]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MVvi4-1YG7gY45Mm-00X4Jf; Wed, 21 Jan 2015 17:15:15 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:TKo/E8mO4gJPpo2ASwxfbo7VcdxylGarI9AVlu9GQl00qiTbVlJ xUPMJJ+hOGtxJIeWqqRO1Q7eauWKhRXcoTqsphfg2n94zcpWE5H7te3++rTcqSPLfsKYwSG zZuUzM7XIr+VhN/FVdTe8vadnh8PyEHpBLWWmsbVrI0yjt2Lki1BQziWm5Pea9BMiUYHP0y MWrIj16odm2NZ+rUtzCCg== X-UI-Out-Filterresults: notjunk:1; X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:98546 Archived-At: Philippe Vaucher writes: > Hello, Hi Philippe, > TRAMP hangs the connection for any new processes in both emacs 24.4 > and emacs from the master branch when a global minor mode uses a > :lighter which evals `(file-truename default-directory)`. > > To reproduce: > > M-x find-file buggy-tramp-mode.el > M-x eval-buffer > M-x global-buggy-tramp-mode > M-x find-file /scpx:user@host:/tmp/foo.txt > M-x async-shell-command ls > > The last command (new process) doens't complete and the TRAMP buffer > shows "Are you awake?". My understanding of the problem is that > `file-truename` tries to use a not-yet-ready TRAMP connection. I tried it seriously with several combinations of Tramp parameter settings; I couldn't reproduce. However, it is dangerous to run an asynchronous process in parallel to retrieve information via Tramp. While you run an asynchronous process, Tramp opens a second connection and remembers this channel. In parallel, file-truename needs also to retrieve information fron the remote machine, on the other connection channel. Likely, Tramp might confuse which connection channel to use. Maybe you can set tramp-verbose to 6, and rerun your test. The resulting Tramp trace buffer shall tell us what's up. > To work around that was tried is to use `tramp-connectable-p` or even > `file-remote-p` with the appropriate flags, but they both > (incorrectly?) return true. (setq buggy-tramp-mode-lighter '(:eval (format " Projectile[%s]" (if (file-remote-p default-directory) default-directory (file-truename default-directory))))) > Thanks, > Philippe Best regards, Michael.