unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
@ 2015-01-20 17:49 Philippe Vaucher
  2015-01-21 16:15 ` Michael Albinus
  0 siblings, 1 reply; 13+ messages in thread
From: Philippe Vaucher @ 2015-01-20 17:49 UTC (permalink / raw)
  To: 19636

[-- Attachment #1: Type: text/plain, Size: 886 bytes --]

Hello,

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. 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.

The "real world" issue that it affects is
https://github.com/bbatsov/projectile/issues/523

Please ask if I'm unclear or you need more clarifications.

Thanks,
Philippe

[-- Attachment #2: buggy-tramp-mode.el --]
[-- Type: text/x-emacs-lisp, Size: 649 bytes --]

(require 'tramp)

(defcustom buggy-tramp-mode-lighter
  '(:eval (format " BUGGY[%s]" (if (or (not (file-remote-p default-directory)) (tramp-connectable-p default-directory))
                                   (file-truename default-directory)
                                 ":(")))
  "Buggy example."
  :group 'buggy-tramp-mode
  :type 'sexp
  :risky t)

;;(setq buggy-tramp-mode-lighter '(:eval (format " Projectile[%s]" default-directory)))

(define-minor-mode buggy-tramp-mode
  "test"
  :lighter buggy-tramp-mode-lighter
  :group 'buggy-tramp-mode)

(define-globalized-minor-mode global-buggy-tramp-mode
  buggy-tramp-mode
  buggy-tramp-mode)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
  2015-01-20 17:49 bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter Philippe Vaucher
@ 2015-01-21 16:15 ` Michael Albinus
  2015-01-21 17:40   ` Philippe Vaucher
  2017-03-25 20:43   ` Philippe Vaucher
  0 siblings, 2 replies; 13+ messages in thread
From: Michael Albinus @ 2015-01-21 16:15 UTC (permalink / raw)
  To: Philippe Vaucher; +Cc: 19636

Philippe Vaucher <philippe.vaucher@gmail.com> 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.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
  2015-01-21 16:15 ` Michael Albinus
@ 2015-01-21 17:40   ` Philippe Vaucher
  2015-01-22 11:07     ` Philippe Vaucher
  2015-01-25 19:40     ` Michael Albinus
  2017-03-25 20:43   ` Philippe Vaucher
  1 sibling, 2 replies; 13+ messages in thread
From: Philippe Vaucher @ 2015-01-21 17:40 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 19636

[-- Attachment #1: Type: text/plain, Size: 2806 bytes --]

>> 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.

Thank you for your answer.

Yes, it would be nice to be able to avoid that. The real world problem
where this happens is for `projectile-mode`, a global minor mode that
tries to detect wether you are in a project for every buffers. The
final solution will probably involve avoiding detection in buffers
where there's a process, even tho it'd make sense for the mode to work
in these buffers as well. Basically the mode displays in which project
you're in and sets up keybindings for naviguating files in this
project, hence the use of :lighter in the mode, which checks for
project root files (e.g .git/Gemfile/etc) in `default-directory` (and
parents) for the current buffer in order to determinate the project
name.


> Maybe you can set tramp-verbose to 6, and rerun your test. The resulting
> Tramp trace buffer shall tell us what's up.

I attached the TRAMP debug buffer (debug-tramp.txt) of the updated
version of my testcase. You can see that at 18:06:15.613967 it says
"are you awake" after 10 seconds of waiting. It then tries to reopen
the connection and I have to `C-g` furiously in order to recover from
it. I run my testcase in the terminal like so:

emacs -Q -l buggy-tramp-mode.el

I ran my tests on the master branch at f769566, then I updated the git
repo to 41efcf4, recompiled and ran the tests again and it failed in
the same way. The commits related to TRAMP in that range (git log
--oneline f769566..41efcf4 -- lisp/net) don't seem to be relevant, but
if you want I can give you the updated TRAMP debug buffer log.


>> 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)))))

That's an interesting workaround, can I assume that
`default-directory` over a TRAMP connection is always absolute? what
about symlinks?

Philippe

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: debug-tramp.txt --]
[-- Type: text/plain; charset=UTF-8; name="debug-tramp.txt", Size: 37739 bytes --]

;; GNU Emacs: 25.0.50.1 Tramp: 2.2.11-pre -*- mode: outline; -*-
18:05:59.401318 tramp-get-test-command (5) # Finding a suitable `test' command
18:05:59.403072 tramp-maybe-open-connection (3) # Opening connection for silex@unitedsoft.ch using scpx...
18:05:59.403776 tramp-maybe-open-connection (6) # /bin/sh -i
18:05:59.404396 tramp-wait-for-regexp (6) # 
#$ 
18:05:59.578009 tramp-maybe-open-connection (3) # Sending command `exec ssh -l silex  -o ControlPath=/tmp/tramp.74563x9.%r@%h:%p -o ControlMaster=auto -o ControlPersist=no -e none -t -t unitedsoft.ch /bin/sh'
18:05:59.578213 tramp-send-command (6) # exec ssh -l silex  -o ControlPath=/tmp/tramp.74563x9.%r@%h:%p -o ControlMaster=auto -o ControlPersist=no -e none -t -t unitedsoft.ch /bin/sh
18:05:59.578808 tramp-process-actions (3) # Waiting for prompts from remote shell...
18:06:00.209273 tramp-process-one-action (5) # Looking for regexp "\(.*ogin\( .*\)?: *\)\'" from remote shell
18:06:00.209483 tramp-process-one-action (5) # Looking for regexp "\(^.*\(\(?:adgangskode\|contrase\(?:\(?:ny\|ñ\)a\)\|geslo\|h\(?:\(?:asł\|esl\)o\)\|iphasiwedi\|jelszó\|l\(?:ozinka\|ösenord\)\|m\(?:ot de passe\|ật khẩu\)\|pa\(?:rola\|s\(?:ahitza\|s\(?: phrase\|code\|ord\|phrase\|wor[dt]\)\|vorto\)\)\|s\(?:alasana\|enha\|laptažodis\)\|wachtwoord\|лозинка\|пароль\|ססמה\|كلمة السر\|गुप्तशब्द\|शब्दकूट\|গুপ্তশব্দ\|পাসওয়ার্ড\|ਪਾਸਵਰਡ\|પાસવર્ડ\|ପ୍ରବେଶ ସଙ୍କେତ\|கடவுச்சொல்\|సంకేతపదము\|ಗುಪ್ತಪದ\|അടയാളവാക്ക്\|රහස්පදය\|ពាក្យសម្ងាត់\|パスワード\|密[码碼]\|암호\)\).*:\0? *\)\'" from remote shell
18:06:00.209668 tramp-process-one-action (5) # Call `tramp-action-password'
18:06:00.209960 tramp-action-password (3) # Sending password
18:06:02.066942 tramp-process-one-action (5) # Looking for regexp "\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o supported authentication methods left to try!\)\|Permission denied\|\(?:Sorry, try again\|Timeout, server not responding\)\.\).*\|^.*\(Received signal [0-9]+\).*\)\'" from remote shell
18:06:02.067164 tramp-process-one-action (5) # Looking for regexp "\(^[^#$%>
]*[#$%>] *\)\'" from remote shell
18:06:02.067317 tramp-process-one-action (5) # Looking for regexp "\(\(?:^\|\r\)[^]#$%>
]*#?[]#$%>] *\(^[\[[0-9;]*[a-zA-Z] *\)*\)\'" from remote shell
18:06:02.067469 tramp-process-one-action (5) # Looking for regexp "\(\(Are you sure you want to continue connecting (yes/no)\?\)\s-*\)\'" from remote shell
18:06:02.067615 tramp-process-one-action (5) # Looking for regexp "\(\(\(?:Store key in cache\? (y/\|Update cached key\? (y/n, Return cancels connectio\)n)\)\s-*\)\'" from remote shell
18:06:02.067769 tramp-process-one-action (5) # Looking for regexp "\(\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*\)\'" from remote shell
18:06:02.067918 tramp-process-one-action (5) # Looking for regexp "\(\)\'" from remote shell
18:06:02.068084 tramp-process-one-action (5) # Call `tramp-action-process-alive'
18:06:02.068483 tramp-process-one-action (5) # Looking for regexp "\(.*ogin\( .*\)?: *\)\'" from remote shell
18:06:02.068677 tramp-process-one-action (5) # Looking for regexp "\(^.*\(\(?:adgangskode\|contrase\(?:\(?:ny\|ñ\)a\)\|geslo\|h\(?:\(?:asł\|esl\)o\)\|iphasiwedi\|jelszó\|l\(?:ozinka\|ösenord\)\|m\(?:ot de passe\|ật khẩu\)\|pa\(?:rola\|s\(?:ahitza\|s\(?: phrase\|code\|ord\|phrase\|wor[dt]\)\|vorto\)\)\|s\(?:alasana\|enha\|laptažodis\)\|wachtwoord\|лозинка\|пароль\|ססמה\|كلمة السر\|गुप्तशब्द\|शब्दकूट\|গুপ্তশব্দ\|পাসওয়ার্ড\|ਪਾਸਵਰਡ\|પાસવર્ડ\|ପ୍ରବେଶ ସଙ୍କେତ\|கடவுச்சொல்\|సంకేతపదము\|ಗುಪ್ತಪದ\|അടയാളവാക്ക്\|රහස්පදය\|ពាក្យសម្ងាត់\|パスワード\|密[码碼]\|암호\)\).*:\0? *\)\'" from remote shell
18:06:02.068898 tramp-process-one-action (5) # Looking for regexp "\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o supported authentication methods left to try!\)\|Permission denied\|\(?:Sorry, try again\|Timeout, server not responding\)\.\).*\|^.*\(Received signal [0-9]+\).*\)\'" from remote shell
18:06:02.069057 tramp-process-one-action (5) # Looking for regexp "\(^[^#$%>
]*[#$%>] *\)\'" from remote shell
18:06:02.069199 tramp-process-one-action (5) # Looking for regexp "\(\(?:^\|\r\)[^]#$%>
]*#?[]#$%>] *\(^[\[[0-9;]*[a-zA-Z] *\)*\)\'" from remote shell
18:06:02.069340 tramp-process-one-action (5) # Looking for regexp "\(\(Are you sure you want to continue connecting (yes/no)\?\)\s-*\)\'" from remote shell
18:06:02.069494 tramp-process-one-action (5) # Looking for regexp "\(\(\(?:Store key in cache\? (y/\|Update cached key\? (y/n, Return cancels connectio\)n)\)\s-*\)\'" from remote shell
18:06:02.069642 tramp-process-one-action (5) # Looking for regexp "\(\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*\)\'" from remote shell
18:06:02.069782 tramp-process-one-action (5) # Looking for regexp "\(\)\'" from remote shell
18:06:02.069923 tramp-process-one-action (5) # Call `tramp-action-process-alive'
18:06:02.528981 tramp-process-one-action (5) # Looking for regexp "\(.*ogin\( .*\)?: *\)\'" from remote shell
18:06:02.529195 tramp-process-one-action (5) # Looking for regexp "\(^.*\(\(?:adgangskode\|contrase\(?:\(?:ny\|ñ\)a\)\|geslo\|h\(?:\(?:asł\|esl\)o\)\|iphasiwedi\|jelszó\|l\(?:ozinka\|ösenord\)\|m\(?:ot de passe\|ật khẩu\)\|pa\(?:rola\|s\(?:ahitza\|s\(?: phrase\|code\|ord\|phrase\|wor[dt]\)\|vorto\)\)\|s\(?:alasana\|enha\|laptažodis\)\|wachtwoord\|лозинка\|пароль\|ססמה\|كلمة السر\|गुप्तशब्द\|शब्दकूट\|গুপ্তশব্দ\|পাসওয়ার্ড\|ਪਾਸਵਰਡ\|પાસવર્ડ\|ପ୍ରବେଶ ସଙ୍କେତ\|கடவுச்சொல்\|సంకేతపదము\|ಗುಪ್ತಪದ\|അടയാളവാക്ക്\|රහස්පදය\|ពាក្យសម្ងាត់\|パスワード\|密[码碼]\|암호\)\).*:\0? *\)\'" from remote shell
18:06:02.529397 tramp-process-one-action (5) # Looking for regexp "\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o supported authentication methods left to try!\)\|Permission denied\|\(?:Sorry, try again\|Timeout, server not responding\)\.\).*\|^.*\(Received signal [0-9]+\).*\)\'" from remote shell
18:06:02.529562 tramp-process-one-action (5) # Looking for regexp "\(^[^#$%>
]*[#$%>] *\)\'" from remote shell
18:06:02.529704 tramp-process-one-action (5) # Call `tramp-action-succeed'
18:06:02.529867 tramp-process-actions (6) # 
silex@unitedsoft.ch's password: 
sh-4.2$ 
18:06:02.530258 tramp-process-actions (3) # Waiting for prompts from remote shell...done
18:06:02.530524 tramp-maybe-open-connection (3) # Found remote shell prompt on `unitedsoft.ch'
18:06:02.530677 tramp-open-shell (5) # Opening remote shell `/bin/sh'...
18:06:02.530884 tramp-send-command (6) # exec env ENV='' HISTFILE=/dev/null PROMPT_COMMAND='' PS1=\#\$\  PS2='' PS3='' /bin/sh 
18:06:02.582147 tramp-wait-for-regexp (6) # 
#$ 
18:06:02.582440 tramp-open-shell (5) # Opening remote shell `/bin/sh'...done
18:06:02.582586 tramp-open-connection-setup-interactive-shell (5) # Setting up remote shell environment
18:06:02.582747 tramp-send-command (6) # stty -inlcr -echo kill '^U' erase '^H'
18:06:02.628914 tramp-wait-for-regexp (6) # 
#$ 
18:06:02.629110 tramp-send-command (6) # echo foo
18:06:02.673959 tramp-wait-for-regexp (6) # 
foo
#$ 
18:06:02.674146 tramp-open-connection-setup-interactive-shell (5) # Setting shell prompt
18:06:02.674344 tramp-send-command (6) # PS1=///06fdc8c8f4a1778883b636f13ae5468c\#\$ PS2='' PS3='' PROMPT_COMMAND=''
18:06:02.718864 tramp-wait-for-regexp (6) # 
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:02.719090 tramp-open-connection-setup-interactive-shell (5) # Determining coding system
18:06:02.719641 tramp-send-command (6) # locale -a
18:06:02.829963 tramp-wait-for-regexp (6) # 
aa_DJ
aa_DJ.iso88591
aa_DJ.utf8
aa_ER
aa_ER@saaho
aa_ER.utf8
aa_ER.utf8@saaho
aa_ET
aa_ET.utf8
af_ZA
af_ZA.iso88591
af_ZA.utf8
am_ET
am_ET.utf8
an_ES
an_ES.iso885915
an_ES.utf8
ar_AE
ar_AE.iso88596
ar_AE.utf8
ar_BH
ar_BH.iso88596
ar_BH.utf8
ar_DZ
ar_DZ.iso88596
ar_DZ.utf8
ar_EG
ar_EG.iso88596
ar_EG.utf8
ar_IN
ar_IN.utf8
ar_IQ
ar_IQ.iso88596
ar_IQ.utf8
ar_JO
ar_JO.iso88596
ar_JO.utf8
ar_KW
ar_KW.iso88596
ar_KW.utf8
ar_LB
ar_LB.iso88596
ar_LB.utf8
ar_LY
ar_LY.iso88596
ar_LY.utf8
ar_MA
ar_MA.iso88596
ar_MA.utf8
ar_OM
ar_OM.iso88596
ar_OM.utf8
ar_QA
ar_QA.iso88596
ar_QA.utf8
ar_SA
ar_SA.iso88596
ar_SA.utf8
ar_SD
ar_SD.iso88596
ar_SD.utf8
ar_SY
ar_SY.iso88596
ar_SY.utf8
ar_TN
ar_TN.iso88596
ar_TN.utf8
ar_YE
ar_YE.iso88596
ar_YE.utf8
as_IN
as_IN.utf8
ast_ES
ast_ES.iso885915
ast_ES.utf8
ayc_PE
ayc_PE.utf8
az_AZ
az_AZ.utf8
be_BY
be_BY.cp1251
be_BY@latin
be_BY.utf8
be_BY.utf8@latin
bem_ZM
bem_ZM.utf8
ber_DZ
ber_DZ.utf8
ber_MA
ber_MA.utf8
bg_BG
bg_BG.cp1251
bg_BG.utf8
bho_IN
bho_IN.utf8
bn_BD
bn_BD.utf8
bn_IN
bn_IN.utf8
bo_CN
bo_CN.utf8
bo_IN
bo_IN.utf8
bokmal
bokmål
br_FR
br_FR@euro
br_FR.iso88591
br_FR.iso885915@euro
br_FR.utf8
brx_IN
brx_IN.utf8
bs_BA
bs_BA.iso88592
bs_BA.utf8
byn_ER
byn_ER.utf8
C
ca_AD
ca_AD.iso885915
ca_AD.utf8
ca_ES
ca_ES@euro
ca_ES.iso88591
ca_ES.iso885915@euro
ca_ES.utf8
ca_FR
ca_FR.iso885915
ca_FR.utf8
ca_IT
ca_IT.iso885915
ca_IT.utf8
catalan
crh_UA
crh_UA.utf8
croatian
csb_PL
csb_PL.utf8
cs_CZ
cs_CZ.iso88592
cs_CZ.utf8
cv_RU
cv_RU.utf8
cy_GB
cy_GB.iso885914
cy_GB.utf8
czech
da_DK
da_DK.iso88591
da_DK.iso885915
da_DK.utf8
danish
dansk
de_AT
de_AT@euro
de_AT.iso88591
de_AT.iso885915@euro
de_AT.utf8
de_BE
de_BE@euro
de_BE.iso88591
de_BE.iso885915@euro
de_BE.utf8
de_CH
de_CH.iso88591
de_CH.utf8
de_DE
de_DE@euro
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
de_LU
de_LU@euro
de_LU.iso88591
de_LU.iso885915@euro
de_LU.utf8
deutsch
doi_IN
doi_IN.utf8
dutch
dv_MV
dv_MV.utf8
dz_BT
dz_BT.utf8
eesti
el_CY
el_CY.iso88597
el_CY.utf8
el_GR
el_GR.iso88597
el_GR.utf8
en_AG
en_AG.utf8
en_AU
en_AU.iso88591
en_AU.utf8
en_BW
en_BW.iso88591
en_BW.utf8
en_CA
en_CA.iso88591
en_CA.utf8
en_DK
en_DK.iso88591
en_DK.utf8
en_GB
en_GB.iso88591
en_GB.iso885915
en_GB.utf8
en_HK
en_HK.iso88591
en_HK.utf8
en_IE
en_IE@euro
en_IE.iso88591
en_IE.iso885915@euro
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ
en_NZ.iso88591
en_NZ.utf8
en_PH
en_PH.iso88591
en_PH.utf8
en_SG
en_SG.iso88591
en_SG.utf8
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
en_ZA
en_ZA.iso88591
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW
en_ZW.iso88591
en_ZW.utf8
es_AR
es_AR.iso88591
es_AR.utf8
es_BO
es_BO.iso88591
es_BO.utf8
es_CL
es_CL.iso88591
es_CL.utf8
es_CO
es_CO.iso88591
es_CO.utf8
es_CR
es_CR.iso88591
es_CR.utf8
es_CU
es_CU.utf8
es_DO
es_DO.iso88591
es_DO.utf8
es_EC
es_EC.iso88591
es_EC.utf8
es_ES
es_ES@euro
es_ES.iso88591
es_ES.iso885915@euro
es_ES.utf8
es_GT
es_GT.iso88591
es_GT.utf8
es_HN
es_HN.iso88591
es_HN.utf8
es_MX
es_MX.iso88591
es_MX.utf8
es_NI
es_NI.iso88591
es_NI.utf8
es_PA
es_PA.iso88591
es_PA.utf8
es_PE
es_PE.iso88591
es_PE.utf8
es_PR
es_PR.iso88591
es_PR.utf8
es_PY
es_PY.iso88591
es_PY.utf8
es_SV
es_SV.iso88591
es_SV.utf8
estonian
es_US
es_US.iso88591
es_US.utf8
es_UY
es_UY.iso88591
es_UY.utf8
es_VE
es_VE.iso88591
es_VE.utf8
et_EE
et_EE.iso88591
et_EE.iso885915
et_EE.utf8
eu_ES
eu_ES@euro
eu_ES.iso88591
eu_ES.iso885915@euro
eu_ES.utf8
fa_IR
fa_IR.utf8
ff_SN
ff_SN.utf8
fi_FI
fi_FI@euro
fi_FI.iso88591
fi_FI.iso885915@euro
fi_FI.utf8
fil_PH
fil_PH.utf8
finnish
fo_FO
fo_FO.iso88591
fo_FO.utf8
français
fr_BE
fr_BE@euro
fr_BE.iso88591
fr_BE.iso885915@euro
fr_BE.utf8
fr_CA
fr_CA.iso88591
fr_CA.utf8
fr_CH
fr_CH.iso88591
fr_CH.utf8
french
fr_FR
fr_FR@euro
fr_FR.iso88591
fr_FR.iso885915@euro
fr_FR.utf8
fr_LU
fr_LU@euro
fr_LU.iso88591
fr_LU.iso885915@euro
fr_LU.utf8
fur_IT
fur_IT.utf8
fy_DE
fy_DE.utf8
fy_NL
fy_NL.utf8
ga_IE
ga_IE@euro
ga_IE.iso88591
ga_IE.iso885915@euro
ga_IE.utf8
galego
galician
gd_GB
gd_GB.iso885915
gd_GB.utf8
german
gez_ER
gez_ER@abegede
gez_ER.utf8
gez_ER.utf8@abegede
gez_ET
gez_ET@abegede
gez_ET.utf8
gez_ET.utf8@abegede
gl_ES
gl_ES@euro
gl_ES.iso88591
gl_ES.iso885915@euro
gl_ES.utf8
greek
gu_IN
gu_IN.utf8
gv_GB
gv_GB.iso88591
gv_GB.utf8
ha_NG
ha_NG.utf8
hebrew
he_IL
he_IL.iso88598
he_IL.utf8
hi_IN
hi_IN.utf8
hne_IN
hne_IN.utf8
hr_HR
hr_HR.iso88592
hr_HR.utf8
hrvatski
hsb_DE
hsb_DE.iso88592
hsb_DE.utf8
ht_HT
ht_HT.utf8
hu_HU
hu_HU.iso88592
hu_HU.utf8
hungarian
hy_AM
hy_AM.armscii8
hy_AM.utf8
ia_FR
ia_FR.utf8
icelandic
id_ID
id_ID.iso88591
id_ID.utf8
ig_NG
ig_NG.utf8
ik_CA
ik_CA.utf8
is_IS
is_IS.iso88591
is_IS.utf8
italian
it_CH
it_CH.iso88591
it_CH.utf8
it_IT
it_IT@euro
it_IT.iso88591
it_IT.iso885915@euro
it_IT.utf8
iu_CA
iu_CA.utf8
iw_IL
iw_IL.iso88598
iw_IL.utf8
ja_JP
ja_JP.eucjp
ja_JP.ujis
ja_JP.utf8
japanese
japanese.euc
ka_GE
ka_GE.georgianps
ka_GE.utf8
kk_KZ
kk_KZ.pt154
kk_KZ.utf8
kl_GL
kl_GL.iso88591
kl_GL.utf8
km_KH
km_KH.utf8
kn_IN
kn_IN.utf8
kok_IN
kok_IN.utf8
ko_KR
ko_KR.euckr
ko_KR.utf8
korean
korean.euc
ks_IN
ks_IN@devanagari
ks_IN.utf8
ks_IN.utf8@devanagari
ku_TR
ku_TR.iso88599
ku_TR.utf8
kw_GB
kw_GB.iso88591
kw_GB.utf8
ky_KG
ky_KG.utf8
lb_LU
lb_LU.utf8
lg_UG
lg_UG.iso885910
lg_UG.utf8
li_BE
li_BE.utf8
lij_IT
lij_IT.utf8
li_NL
li_NL.utf8
lithuanian
lo_LA
lo_LA.utf8
lt_LT
lt_LT.iso885913
lt_LT.utf8
lv_LV
lv_LV.iso885913
lv_LV.utf8
mag_IN
mag_IN.utf8
mai_IN
mai_IN.utf8
mg_MG
mg_MG.iso885915
mg_MG.utf8
mhr_RU
mhr_RU.utf8
mi_NZ
mi_NZ.iso885913
mi_NZ.utf8
mk_MK
mk_MK.iso88595
mk_MK.utf8
ml_IN
ml_IN.utf8
mni_IN
mni_IN.utf8
mn_MN
mn_MN.utf8
mr_IN
mr_IN.utf8
ms_MY
ms_MY.iso88591
ms_MY.utf8
mt_MT
mt_MT.iso88593
mt_MT.utf8
my_MM
my_MM.utf8
nan_TW@latin
nan_TW.utf8@latin
nb_NO
nb_NO.iso88591
nb_NO.utf8
nds_DE
nds_DE.utf8
nds_NL
nds_NL.utf8
ne_NP
ne_NP.utf8
nhn_MX
nhn_MX.utf8
niu_NU
niu_NU.utf8
niu_NZ
niu_NZ.utf8
nl_AW
nl_AW.utf8
nl_BE
nl_BE@euro
nl_BE.iso88591
nl_BE.iso885915@euro
nl_BE.utf8
nl_NL
nl_NL@euro
nl_NL.iso88591
nl_NL.iso885915@euro
nl_NL.utf8
nn_NO
nn_NO.iso88591
nn_NO.utf8
no_NO
no_NO.ISO-8859-1
norwegian
nr_ZA
nr_ZA.utf8
nso_ZA
nso_ZA.utf8
nynorsk
oc_FR
oc_FR.iso88591
oc_FR.utf8
om_ET
om_ET.utf8
om_KE
om_KE.iso88591
om_KE.utf8
or_IN
or_IN.utf8
os_RU
os_RU.utf8
pa_IN
pa_IN.utf8
pap_AN
pap_AN.utf8
pa_PK
pa_PK.utf8
pl_PL
pl_PL.iso88592
pl_PL.utf8
polish
portuguese
POSIX
ps_AF
ps_AF.utf8
pt_BR
pt_BR.iso88591
pt_BR.utf8
pt_PT
pt_PT@euro
pt_PT.iso88591
pt_PT.iso885915@euro
pt_PT.utf8
romanian
ro_RO
ro_RO.iso88592
ro_RO.utf8
ru_RU
ru_RU.iso88595
ru_RU.koi8r
ru_RU.utf8
russian
ru_UA
ru_UA.koi8u
ru_UA.utf8
rw_RW
rw_RW.utf8
sa_IN
sa_IN.utf8
sat_IN
sat_IN.utf8
sc_IT
sc_IT.utf8
sd_IN
sd_IN@devanagari
sd_IN.utf8
sd_IN.utf8@devanagari
se_NO
se_NO.utf8
shs_CA
shs_CA.utf8
sid_ET
sid_ET.utf8
si_LK
si_LK.utf8
sk_SK
sk_SK.iso88592
sk_SK.utf8
slovak
slovene
slovenian
sl_SI
sl_SI.iso88592
sl_SI.utf8
so_DJ
so_DJ.iso88591
so_DJ.utf8
so_ET
so_ET.utf8
so_KE
so_KE.iso88591
so_KE.utf8
so_SO
so_SO.iso88591
so_SO.utf8
spanish
sq_AL
sq_AL.iso88591
sq_AL.utf8
sq_MK
sq_MK.utf8
sr_ME
sr_ME.utf8
sr_RS
sr_RS@latin
sr_RS.utf8
sr_RS.utf8@latin
ss_ZA
ss_ZA.utf8
st_ZA
st_ZA.iso88591
st_ZA.utf8
sv_FI
sv_FI@euro
sv_FI.iso88591
sv_FI.iso885915@euro
sv_FI.utf8
sv_SE
sv_SE.iso88591
sv_SE.iso885915
sv_SE.utf8
swedish
sw_KE
sw_KE.utf8
sw_TZ
sw_TZ.utf8
szl_PL
szl_PL.utf8
ta_IN
ta_IN.utf8
ta_LK
ta_LK.utf8
te_IN
te_IN.utf8
tg_TJ
tg_TJ.koi8t
tg_TJ.utf8
thai
th_TH
th_TH.tis620
th_TH.utf8
ti_ER
ti_ER.utf8
ti_ET
ti_ET.utf8
tig_ER
tig_ER.utf8
tk_TM
tk_TM.utf8
tl_PH
tl_PH.iso88591
tl_PH.utf8
tn_ZA
tn_ZA.utf8
tr_CY
tr_CY.iso88599
tr_CY.utf8
tr_TR
tr_TR.iso88599
tr_TR.utf8
ts_ZA
ts_ZA.utf8
tt_RU
tt_RU@iqtelif
tt_RU.utf8
tt_RU.utf8@iqtelif
turkish
ug_CN
ug_CN.utf8
uk_UA
uk_UA.koi8u
uk_UA.utf8
unm_US
unm_US.utf8
ur_IN
ur_IN.utf8
ur_PK
ur_PK.utf8
uz_UZ
uz_UZ@cyrillic
uz_UZ.iso88591
uz_UZ.utf8@cyrillic
ve_ZA
ve_ZA.utf8
vi_VN
vi_VN.utf8
wa_BE
wa_BE@euro
wa_BE.iso88591
wa_BE.iso885915@euro
wa_BE.utf8
wae_CH
wae_CH.utf8
wal_ET
wal_ET.utf8
wo_SN
wo_SN.utf8
xh_ZA
xh_ZA.iso88591
xh_ZA.utf8
yi_US
yi_US.cp1255
yi_US.utf8
yo_NG
yo_NG.utf8
yue_HK
yue_HK.utf8
zh_CN
zh_CN.gb18030
zh_CN.gb2312
zh_CN.gbk
zh_CN.utf8
zh_HK
zh_HK.big5hkscs
zh_HK.utf8
zh_SG
zh_SG.gb2312
zh_SG.gbk
zh_SG.utf8
zh_TW
zh_TW.big5
zh_TW.euctw
zh_TW.utf8
zu_ZA
zu_ZA.iso88591
zu_ZA.utf8
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:02.830860 tramp-send-command (6) # echo foo ; echo bar
18:06:02.875852 tramp-wait-for-regexp (6) # 
foo
bar
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:02.876129 tramp-open-connection-setup-interactive-shell (5) # Setting coding system to `utf-8' and `utf-8-unix'
18:06:02.876300 tramp-send-command (6) # set +o vi +o emacs
18:06:02.920201 tramp-wait-for-regexp (6) # 
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:02.920484 tramp-open-connection-setup-interactive-shell (5) # Checking system information
18:06:02.920719 tramp-send-command (6) # echo \"`uname -sr`\" 2>/dev/null; echo tramp_exit_status $?
18:06:02.981900 tramp-wait-for-regexp (6) # 
"Linux 3.14.27-100.fc19.x86_64"
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:02.982206 tramp-open-connection-setup-interactive-shell (5) # Checking remote host type for `send-process-string' bug
18:06:02.982366 tramp-set-remote-path (5) # Setting $PATH environment variable
18:06:02.982483 tramp-send-command (6) # echo \"`getconf PATH 2>/dev/null`\" 2>/dev/null; echo tramp_exit_status $?
18:06:03.028837 tramp-wait-for-regexp (6) # 
"/bin:/usr/bin"
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.042271 tramp-get-test-command (5) # Finding a suitable `test' command
18:06:03.042547 tramp-send-command (6) # test 0 2>/dev/null; echo tramp_exit_status $?
18:06:03.087361 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.087727 tramp-send-command (6) # test -d /bin 2>/dev/null; echo tramp_exit_status $?
18:06:03.132584 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.133496 tramp-send-command (6) # test -d /usr/bin 2>/dev/null; echo tramp_exit_status $?
18:06:03.178530 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.179440 tramp-send-command (6) # test -d /sbin 2>/dev/null; echo tramp_exit_status $?
18:06:03.224133 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.225029 tramp-send-command (6) # test -d /usr/sbin 2>/dev/null; echo tramp_exit_status $?
18:06:03.270085 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.270939 tramp-send-command (6) # test -d /usr/local/bin 2>/dev/null; echo tramp_exit_status $?
18:06:03.316140 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.316994 tramp-send-command (6) # test -d /usr/local/sbin 2>/dev/null; echo tramp_exit_status $?
18:06:03.360760 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.361493 tramp-send-command (6) # test -d /local/bin 2>/dev/null; echo tramp_exit_status $?
18:06:03.405131 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.406041 tramp-send-command (6) # test -d /local/freeware/bin 2>/dev/null; echo tramp_exit_status $?
18:06:03.450643 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.451549 tramp-send-command (6) # test -d /local/gnu/bin 2>/dev/null; echo tramp_exit_status $?
18:06:03.496946 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.497863 tramp-send-command (6) # test -d /usr/freeware/bin 2>/dev/null; echo tramp_exit_status $?
18:06:03.543132 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.544020 tramp-send-command (6) # test -d /usr/pkg/bin 2>/dev/null; echo tramp_exit_status $?
18:06:03.589117 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.589993 tramp-send-command (6) # test -d /usr/contrib/bin 2>/dev/null; echo tramp_exit_status $?
18:06:03.633882 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.634759 tramp-send-command (6) # test -d /opt/bin 2>/dev/null; echo tramp_exit_status $?
18:06:03.679880 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.680797 tramp-send-command (6) # test -d /opt/sbin 2>/dev/null; echo tramp_exit_status $?
18:06:03.725420 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.726287 tramp-send-command (6) # test -d /opt/local/bin 2>/dev/null; echo tramp_exit_status $?
18:06:03.771381 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.771788 tramp-send-command (6) # PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export PATH
18:06:03.815694 tramp-wait-for-regexp (6) # 
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.815979 tramp-send-command (6) # echo ~root
18:06:03.860216 tramp-wait-for-regexp (6) # 
/root
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.860490 tramp-send-command (6) # mesg n; biff n
18:06:03.908179 tramp-wait-for-regexp (6) # 
sh: biff: command not found
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.908518 tramp-send-command (6) # echo \"`tty`\" 2>/dev/null; echo tramp_exit_status $?
18:06:03.954872 tramp-wait-for-regexp (6) # 
"/dev/pts/0"
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:03.955178 tramp-open-connection-setup-interactive-shell (5) # Setting default environment
18:06:03.955438 tramp-send-command (6) # while read var val; do export $var=$val; done <<'3e01f658b655bc2d35d2d3da5545eb20'
PAGER ""
INSIDE_EMACS '25.0.50.1,tramp:2.2.11-pre'
EMACS t
TERM dumb
LC_CTYPE ''
TMOUT 0
LC_ALL en_US.utf8
3e01f658b655bc2d35d2d3da5545eb20
18:06:04.002162 tramp-wait-for-regexp (6) # 
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.002415 tramp-send-command (6) # unset correct autocorrect MAILPATH MAILCHECK MAIL HISTORY CDPATH
18:06:04.046569 tramp-wait-for-regexp (6) # 
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.046897 tramp-maybe-open-connection (3) # Opening connection for silex@unitedsoft.ch using scpx...done
18:06:04.047027 tramp-send-command (6) # test 0 2>/dev/null; echo tramp_exit_status $?
18:06:04.097349 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.097760 tramp-send-command (6) # test -d /tmp/foo.txt 2>/dev/null; echo tramp_exit_status $?
18:06:04.142227 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.143616 tramp-sh-handle-file-truename (4) # Finding true name for `/scpx:silex@unitedsoft.ch:/tmp/foo.txt'
18:06:04.143769 tramp-get-remote-readlink (5) # Finding a suitable `readlink' command
18:06:04.144010 tramp-send-command (6) # which \readlink | wc -w
18:06:04.190608 tramp-wait-for-regexp (6) # 
1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.190933 tramp-send-command (6) # \readlink --canonicalize-missing / 2>/dev/null; echo tramp_exit_status $?
18:06:04.236887 tramp-wait-for-regexp (6) # 
/
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.237258 tramp-send-command (6) # \readlink --canonicalize-missing /tmp/foo.txt 2>/dev/null; echo tramp_exit_status $?
18:06:04.284124 tramp-wait-for-regexp (6) # 
/tmp/foo.txt
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.284409 tramp-sh-handle-file-truename (4) # True name of `/tmp/foo.txt' is `/tmp/foo.txt'
18:06:04.285470 tramp-get-remote-stat (5) # Finding a suitable `stat' command
18:06:04.285718 tramp-send-command (6) # which \stat | wc -w
18:06:04.331426 tramp-wait-for-regexp (6) # 
1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.331770 tramp-send-command (6) # \stat -c '("%N" %s)' / 2>/dev/null; echo tramp_exit_status $?
18:06:04.423701 tramp-wait-for-regexp (6) # 
("‘/’" 4096)
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.424267 tramp-do-file-attributes-with-stat (5) # file attributes with stat: /tmp/foo.txt
18:06:04.424520 tramp-get-file-exists-command (5) # Finding command to check if file exists
18:06:04.425002 tramp-send-command (6) # test -e / 2>/dev/null; echo tramp_exit_status $?
18:06:04.505338 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.505717 tramp-send-command (6) # test -e /\ this\ file\ does\ not\ exist\  2>/dev/null; echo tramp_exit_status $?
18:06:04.593479 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.593889 tramp-send-command (6) # ( (test -e /tmp/foo.txt || test -h /tmp/foo.txt) && \stat -c '(("%N") %h %ue0 %ge0 %Xe0 %Ye0 %Ze0 %se0 "%A" t %ie0 -1)' /tmp/foo.txt || echo nil) 2>/dev/null; echo tramp_exit_status $?
18:06:04.640593 tramp-wait-for-regexp (6) # 
nil
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.640884 tramp-do-file-attributes-with-ls (5) # file attributes with ls: /tmp/foo.txt
18:06:04.641062 tramp-get-ls-command (5) # Finding a suitable `ls' command
18:06:04.641313 tramp-send-command (6) # while read d; do if test -x $d/ls -a -f $d/ls; then echo tramp_executable $d/ls; break; fi; done <<'3e01f658b655bc2d35d2d3da5545eb20'
/bin
/usr/bin
/sbin
/usr/sbin
/usr/local/bin
/usr/local/sbin
3e01f658b655bc2d35d2d3da5545eb20
18:06:04.686883 tramp-wait-for-regexp (6) # 
tramp_executable /bin/ls
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.687197 tramp-send-command (6) # /bin/ls -lnd / 2>/dev/null; echo tramp_exit_status $?
18:06:04.734416 tramp-wait-for-regexp (6) # 
dr-xr-xr-x 18 0 0 4096 Jan 20 10:11 /
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.734763 tramp-send-command (6) # /bin/ls --color=never -al /dev/null 2>/dev/null; echo tramp_exit_status $?
18:06:04.781637 tramp-wait-for-regexp (6) # 
crw-rw-rw- 1 root root 1, 3 Jan 20 10:46 /dev/null
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.781997 tramp-send-command (6) # (test -e /tmp/foo.txt || test -h /tmp/foo.txt) && /bin/ls --color=never -ildn /tmp/foo.txt
18:06:04.827961 tramp-wait-for-regexp (6) # 
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.832385 tramp-handle-insert-file-contents (3) # Inserting `/scpx:silex@unitedsoft.ch:/tmp/foo.txt'...
18:06:04.833245 tramp-send-command (6) # test -e /tmp/foo.txt 2>/dev/null; echo tramp_exit_status $?
18:06:04.882373 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.882864 tramp-handle-insert-file-contents (1) # File not `/scpx:silex@unitedsoft.ch:/tmp/foo.txt' found on remote host
18:06:04.895180 tramp-send-command (6) # test -d /tmp/ 2>/dev/null; echo tramp_exit_status $?
18:06:04.939285 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.939608 tramp-send-command (6) # test -w /tmp/ 2>/dev/null; echo tramp_exit_status $?
18:06:04.984490 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:04.985845 tramp-do-file-attributes-with-stat (5) # file attributes with stat: /tmp/foo.txt
18:06:04.986110 tramp-send-command (6) # ( (test -e /tmp/foo.txt || test -h /tmp/foo.txt) && \stat -c '(("%N") %h %ue0 %ge0 %Xe0 %Ye0 %Ze0 %se0 "%A" t %ie0 -1)' /tmp/foo.txt || echo nil) 2>/dev/null; echo tramp_exit_status $?
18:06:05.035147 tramp-wait-for-regexp (6) # 
nil
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:05.035438 tramp-do-file-attributes-with-ls (5) # file attributes with ls: /tmp/foo.txt
18:06:05.035688 tramp-send-command (6) # (test -e /tmp/foo.txt || test -h /tmp/foo.txt) && /bin/ls --color=never -ildn /tmp/foo.txt
18:06:05.081906 tramp-wait-for-regexp (6) # 
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:05.082358 tramp-handle-insert-file-contents (3) # Inserting `/scpx:silex@unitedsoft.ch:/tmp/foo.txt'...failed
18:06:05.085695 tramp-send-command (6) # test -e /tmp/\#_ascpx_bsilex\@unitedsoft.ch_b_atmp_afoo.txt\# 2>/dev/null; echo tramp_exit_status $?
18:06:05.134022 tramp-wait-for-regexp (6) # 
tramp_exit_status 1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:05.154820 tramp-sh-handle-vc-registered (3) # Checking `vc-registered' for /scpx:silex@unitedsoft.ch:/tmp/foo.txt...
18:06:05.159055 tramp-maybe-send-script (5) # Sending script `tramp_vc_registered_read_file_names'...
18:06:05.159132 tramp-get-remote-perl (5) # Finding a suitable `perl' command
18:06:05.159249 tramp-send-command (6) # which \perl5 | wc -w
18:06:05.207376 tramp-wait-for-regexp (6) # 
which: no perl5 in (/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:05.207726 tramp-send-command (6) # while read d; do if test -x $d/perl5 -a -f $d/perl5; then echo tramp_executable $d/perl5; break; fi; done <<'3e01f658b655bc2d35d2d3da5545eb20'
/bin
/usr/bin
/sbin
/usr/sbin
/usr/local/bin
/usr/local/sbin
3e01f658b655bc2d35d2d3da5545eb20
18:06:05.254143 tramp-wait-for-regexp (6) # 
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:05.254462 tramp-send-command (6) # which \perl | wc -w
18:06:05.300186 tramp-wait-for-regexp (6) # 
1
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:05.300486 tramp-send-command (6) # \perl -e 'use File::Spec;' 2>/dev/null; echo tramp_exit_status $?
18:06:05.359330 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:05.359686 tramp-send-command (6) # \perl -e 'use Cwd "realpath";' 2>/dev/null; echo tramp_exit_status $?
18:06:05.418654 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:05.419005 tramp-send-command (6) # tramp_vc_registered_read_file_names () {
echo "("
while read file; do
    if test -e "$file"; then
	echo "(\"$file\" \"file-exists-p\" t)"
    else
	echo "(\"$file\" \"file-exists-p\" nil)"
    fi
    if test -r "$file"; then
	echo "(\"$file\" \"file-readable-p\" t)"
    else
	echo "(\"$file\" \"file-readable-p\" nil)"
    fi
done
echo ")"
} 2>/dev/null; echo tramp_exit_status $?
18:06:05.468251 tramp-wait-for-regexp (6) # 
tramp_exit_status 0
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:05.468541 tramp-maybe-send-script (5) # Sending script `tramp_vc_registered_read_file_names'...done
18:06:05.468993 tramp-send-command (6) # tramp_vc_registered_read_file_names <<'3e01f658b655bc2d35d2d3da5545eb20'
/tmp/RCS/foo.txt\,v
/tmp/foo.txt\,v
/tmp/RCS/foo.txt
/tmp/CVS/Entries
/tmp/foo.txt/.svn
/tmp/.svn
/.svn
/tmp/SCCS/s.foo.txt
/tmp/s.foo.txt
/tmp/.src/foo.txt\,v
/tmp/foo.txt/.bzr/checkout/format
/tmp/.bzr/checkout/format
/.bzr/checkout/format
/tmp/foo.txt/.git
/tmp/.git
/.git
/tmp/foo.txt/.hg
/tmp/.hg
/.hg
/tmp/foo.txt/_MTN/format
/tmp/_MTN/format
/_MTN/format
3e01f658b655bc2d35d2d3da5545eb20
18:06:05.563647 tramp-wait-for-regexp (6) # 
(
("/tmp/RCS/foo.txt,v" "file-exists-p" nil)
("/tmp/RCS/foo.txt,v" "file-readable-p" nil)
("/tmp/foo.txt,v" "file-exists-p" nil)
("/tmp/foo.txt,v" "file-readable-p" nil)
("/tmp/RCS/foo.txt" "file-exists-p" nil)
("/tmp/RCS/foo.txt" "file-readable-p" nil)
("/tmp/CVS/Entries" "file-exists-p" nil)
("/tmp/CVS/Entries" "file-readable-p" nil)
("/tmp/foo.txt/.svn" "file-exists-p" nil)
("/tmp/foo.txt/.svn" "file-readable-p" nil)
("/tmp/.svn" "file-exists-p" nil)
("/tmp/.svn" "file-readable-p" nil)
("/.svn" "file-exists-p" nil)
("/.svn" "file-readable-p" nil)
("/tmp/SCCS/s.foo.txt" "file-exists-p" nil)
("/tmp/SCCS/s.foo.txt" "file-readable-p" nil)
("/tmp/s.foo.txt" "file-exists-p" nil)
("/tmp/s.foo.txt" "file-readable-p" nil)
("/tmp/.src/foo.txt,v" "file-exists-p" nil)
("/tmp/.src/foo.txt,v" "file-readable-p" nil)
("/tmp/foo.txt/.bzr/checkout/format" "file-exists-p" nil)
("/tmp/foo.txt/.bzr/checkout/format" "file-readable-p" nil)
("/tmp/.bzr/checkout/format" "file-exists-p" nil)
("/tmp/.bzr/checkout/format" "file-readable-p" nil)
("/.bzr/checkout/format" "file-exists-p" nil)
("/.bzr/checkout/format" "file-readable-p" nil)
("/tmp/foo.txt/.git" "file-exists-p" nil)
("/tmp/foo.txt/.git" "file-readable-p" nil)
("/tmp/.git" "file-exists-p" nil)
("/tmp/.git" "file-readable-p" nil)
("/.git" "file-exists-p" nil)
("/.git" "file-readable-p" nil)
("/tmp/foo.txt/.hg" "file-exists-p" nil)
("/tmp/foo.txt/.hg" "file-readable-p" nil)
("/tmp/.hg" "file-exists-p" nil)
("/tmp/.hg" "file-readable-p" nil)
("/.hg" "file-exists-p" nil)
("/.hg" "file-readable-p" nil)
("/tmp/foo.txt/_MTN/format" "file-exists-p" nil)
("/tmp/foo.txt/_MTN/format" "file-readable-p" nil)
("/tmp/_MTN/format" "file-exists-p" nil)
("/tmp/_MTN/format" "file-readable-p" nil)
("/_MTN/format" "file-exists-p" nil)
("/_MTN/format" "file-readable-p" nil)
)
///06fdc8c8f4a1778883b636f13ae5468c#$
18:06:05.601129 tramp-sh-handle-vc-registered (3) # Checking `vc-registered' for /scpx:silex@unitedsoft.ch:/tmp/foo.txt...done
18:06:05.604340 tramp-maybe-open-connection (3) # Opening connection for silex@unitedsoft.ch using scpx...
18:06:05.604996 tramp-maybe-open-connection (6) # /bin/sh -i
18:06:05.607758 tramp-wait-for-regexp (6) # 
#$ 
18:06:05.610783 tramp-sh-handle-file-truename (4) # Finding true name for `/scpx:silex@unitedsoft.ch:/tmp/'
18:06:05.610902 tramp-send-command (6) # echo are you awake
18:06:15.613967 tramp-wait-for-regexp (6) # 
are you awake
#$ 
18:06:15.614566 tramp-wait-for-regexp (1) # File error: [[Regexp `\(^\|\0\)[^#$
]*///06fdc8c8f4a1778883b636f13ae5468c#\$\r?$' not found in 10 secs]]
18:06:15.618252 tramp-process-sentinel (5) # Sentinel called: `#<process *Async Shell*>' `killed
'
18:06:15.618630 tramp-maybe-open-connection (3) # Opening connection for silex@unitedsoft.ch using scpx...
18:06:15.632423 tramp-maybe-open-connection (6) # /bin/sh -i
18:06:15.632624 tramp-wait-for-regexp (6) # 
#$ 
18:06:15.633022 tramp-maybe-open-connection (3) # Sending command `exec ssh -q -l silex  -o ControlPath=/tmp/tramp.74563x9.%r@%h:%p -o ControlMaster=auto -o ControlPersist=no -e none -t -t unitedsoft.ch /bin/sh'
18:06:15.633100 tramp-send-command (6) # exec ssh -q -l silex  -o ControlPath=/tmp/tramp.74563x9.%r@%h:%p -o ControlMaster=auto -o ControlPersist=no -e none -t -t unitedsoft.ch /bin/sh
18:06:15.633226 tramp-maybe-open-connection (3) # Opening connection for silex@unitedsoft.ch using scpx...failed
18:06:15.640807 tramp-maybe-open-connection (3) # Sending command `exec ssh -q -l silex  -o ControlPath=/tmp/tramp.74563x9.%r@%h:%p -o ControlMaster=auto -o ControlPersist=no -e none -t -t unitedsoft.ch /bin/sh'
18:06:15.640910 tramp-send-command (6) # exec ssh -q -l silex  -o ControlPath=/tmp/tramp.74563x9.%r@%h:%p -o ControlMaster=auto -o ControlPersist=no -e none -t -t unitedsoft.ch /bin/sh
18:06:15.641106 tramp-maybe-open-connection (3) # Opening connection for silex@unitedsoft.ch using scpx...failed
18:06:15.647087 tramp-sh-handle-file-truename (4) # Finding true name for `/scpx:silex@unitedsoft.ch:/tmp/'
18:06:15.647240 tramp-get-remote-readlink (5) # Finding a suitable `readlink' command
18:06:15.647567 tramp-maybe-open-connection (3) # Opening connection for silex@unitedsoft.ch using scpx...
18:06:15.647792 tramp-process-sentinel (5) # Sentinel called: `#<process *tramp/scpx silex@unitedsoft.ch*>' `exited abnormally with code 129
'
18:06:15.648374 tramp-maybe-open-connection (6) # /bin/sh -i
18:06:15.648940 tramp-wait-for-regexp (6) # 
#$ 
18:06:15.649352 tramp-maybe-open-connection (3) # Sending command `exec ssh -l silex  -o ControlPath=/tmp/tramp.7456CWw.%r@%h:%p -o ControlMaster=auto -o ControlPersist=no -e none -t -t unitedsoft.ch /bin/sh'
18:06:15.649435 tramp-send-command (6) # exec ssh -l silex  -o ControlPath=/tmp/tramp.7456CWw.%r@%h:%p -o ControlMaster=auto -o ControlPersist=no -e none -t -t unitedsoft.ch /bin/sh
18:06:15.649654 tramp-process-actions (3) # Waiting for prompts from remote shell...
18:06:16.309757 tramp-process-one-action (5) # Looking for regexp "\(.*ogin\( .*\)?: *\)\'" from remote shell
18:06:16.310011 tramp-process-one-action (5) # Looking for regexp "\(^.*\(\(?:adgangskode\|contrase\(?:\(?:ny\|ñ\)a\)\|geslo\|h\(?:\(?:asł\|esl\)o\)\|iphasiwedi\|jelszó\|l\(?:ozinka\|ösenord\)\|m\(?:ot de passe\|ật khẩu\)\|pa\(?:rola\|s\(?:ahitza\|s\(?: phrase\|code\|ord\|phrase\|wor[dt]\)\|vorto\)\)\|s\(?:alasana\|enha\|laptažodis\)\|wachtwoord\|лозинка\|пароль\|ססמה\|كلمة السر\|गुप्तशब्द\|शब्दकूट\|গুপ্তশব্দ\|পাসওয়ার্ড\|ਪਾਸਵਰਡ\|પાસવર્ડ\|ପ୍ରବେଶ ସଙ୍କେତ\|கடவுச்சொல்\|సంకేతపదము\|ಗುಪ್ತಪದ\|അടയാളവാക്ക്\|රහස්පදය\|ពាក្យសម្ងាត់\|パスワード\|密[码碼]\|암호\)\).*:\0? *\)\'" from remote shell
18:06:16.310243 tramp-process-one-action (5) # Call `tramp-action-password'
18:06:16.310527 tramp-action-password (3) # Sending password
18:06:16.322528 tramp-sh-handle-file-truename (4) # Finding true name for `/scpx:silex@unitedsoft.ch:/tmp/'
18:06:16.322796 tramp-get-remote-readlink (5) # Finding a suitable `readlink' command
18:06:16.323022 tramp-send-command (6) # echo \"`getconf PATH 2>/dev/null`\" 2>/dev/null; echo tramp_exit_status $?
18:06:24.738019 tramp-file-name-handler (1) # Interrupt received in operation (file-truename /scpx:silex@unitedsoft.ch:/tmp/)

[-- Attachment #3: buggy-tramp-mode.el --]
[-- Type: text/x-emacs-lisp, Size: 775 bytes --]

(require 'tramp)

(defcustom buggy-tramp-mode-lighter
  '(:eval (format " BUGGY[%s]" (if (or (not (file-remote-p default-directory)) (tramp-connectable-p default-directory))
                                   (file-truename default-directory)
                                 ":(")))
  "Buggy example."
  :group 'buggy-tramp-mode
  :type 'sexp
  :risky t)

;;(setq buggy-tramp-mode-lighter '(:eval (format " BUGGY[%s]" default-directory)))

(define-minor-mode buggy-tramp-mode
  "test"
  :lighter buggy-tramp-mode-lighter
  :group 'buggy-tramp-mode)

(define-globalized-minor-mode global-buggy-tramp-mode
  buggy-tramp-mode
  buggy-tramp-mode)

(setq tramp-verbose 6)
(find-file "/scpx:silex@unitedsoft.ch:/tmp/foo.txt")

(global-buggy-tramp-mode)
(async-shell-command "ls")

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
  2015-01-21 17:40   ` Philippe Vaucher
@ 2015-01-22 11:07     ` Philippe Vaucher
  2015-01-25 19:40     ` Michael Albinus
  1 sibling, 0 replies; 13+ messages in thread
From: Philippe Vaucher @ 2015-01-22 11:07 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 19636

> Yes, it would be nice to be able to avoid that. The real world problem
> where this happens is for `projectile-mode`, a global minor mode that
> tries to detect wether you are in a project for every buffers. The
> final solution will probably involve avoiding detection in buffers
> where there's a process, even tho it'd make sense for the mode to work
> in these buffers as well. Basically the mode displays in which project
> you're in and sets up keybindings for naviguating files in this
> project, hence the use of :lighter in the mode, which checks for
> project root files (e.g .git/Gemfile/etc) in `default-directory` (and
> parents) for the current buffer in order to determinate the project
> name.

Just for clarifications, the new processes involved where this bug
happens is when you invoke "git fetch" when using magit or when doing
things like "M-& service nginx restart" over TRAMP.

Philippe





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
  2015-01-21 17:40   ` Philippe Vaucher
  2015-01-22 11:07     ` Philippe Vaucher
@ 2015-01-25 19:40     ` Michael Albinus
  2015-01-25 20:15       ` Philippe Vaucher
  1 sibling, 1 reply; 13+ messages in thread
From: Michael Albinus @ 2015-01-25 19:40 UTC (permalink / raw)
  To: Philippe Vaucher; +Cc: 19636

Philippe Vaucher <philippe.vaucher@gmail.com> writes:

>> (setq buggy-tramp-mode-lighter
>>       '(:eval (format " Projectile[%s]"
>>                       (if (file-remote-p default-directory)
>>                           default-directory
>>                         (file-truename default-directory)))))
>
> That's an interesting workaround, can I assume that
> `default-directory` over a TRAMP connection is always absolute? what
> about symlinks?

You can always assume, that `default-directory' is absolute, being it
local or remote. Symlinks are not expanded, 'tho.

However, there is always the buffer local variable
`buffer-file-truename'. Maybe you could use it somehow, when setting the
lighter? Something like

(if buffer-file-truename (file-name-directory buffer-file-truename) default-directory)

Short analysis of the debug buffer:

> 18:06:05.604340 tramp-maybe-open-connection (3) # Opening connection for silex@unitedsoft.ch using scpx...
> 18:06:05.604996 tramp-maybe-open-connection (6) # /bin/sh -i
> 18:06:05.607758 tramp-wait-for-regexp (6) # 
> #$ 

Here Tramp opens a second connection in order to call git.

> 18:06:05.610783 tramp-sh-handle-file-truename (4) # Finding true name for `/scpx:silex@unitedsoft.ch:/tmp/'
> 18:06:05.610902 tramp-send-command (6) # echo are you awake
> 18:06:15.613967 tramp-wait-for-regexp (6) # 
> are you awake
> #$ 
> 18:06:15.614566 tramp-wait-for-regexp (1) # File error: [[Regexp `\(^\|\)[^#$
> ]*///06fdc8c8f4a1778883b636f13ae5468c#\$?$' not found in 10 secs]]

And here Tramp tries to use the primary connection for getting the
truename of the default directory. Tramp is not able to accept those
requests while preparing the second connection for
start-file-process. Maybe I need to add something in order to make it
more robust. This is not such easy, it might take time.

> Philippe

Best regards, Michael.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
  2015-01-25 19:40     ` Michael Albinus
@ 2015-01-25 20:15       ` Philippe Vaucher
  2015-01-25 21:10         ` Michael Albinus
  0 siblings, 1 reply; 13+ messages in thread
From: Philippe Vaucher @ 2015-01-25 20:15 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 19636

> > That's an interesting workaround, can I assume that
> > `default-directory` over a TRAMP connection is always absolute? what
> > about symlinks?
>
> You can always assume, that `default-directory' is absolute, being it
> local or remote. Symlinks are not expanded, 'tho.
>
> However, there is always the buffer local variable
> `buffer-file-truename'. Maybe you could use it somehow, when setting the
> lighter? Something like
>
> (if buffer-file-truename (file-name-directory buffer-file-truename) default-directory)

Thanks for mentionning `buffer-file-truename', I didn't know about it.
Unfortunately my problem is more complex than that because at the
moment this package does many files existence checks in order to find
the project root directory (e.g it tries to find any of "Gemfile",
".git", "Makefile" in the current directory, then if not found in the
parent one, etc). I know that all these filesystem checks doesn't
scale very well when not done locally, but I'm kinda stuck with the
current design. It is planned to refactor it all into leveraging
caching and possibly doing these checks by spawning a little bash
script remotely.


> Short analysis of the debug buffer:
(snip)
> Here Tramp opens a second connection in order to call git.
(snip)
> And here Tramp tries to use the primary connection for getting the
> truename of the default directory. Tramp is not able to accept those
> requests while preparing the second connection for
> start-file-process. Maybe I need to add something in order to make it
> more robust. This is not such easy, it might take time.

Ah, that's very helpful to understand what's going on. What is weird
is that there seems to be some kind of deadlocking happening, because
"git fetch" takes less than 10 seconds to finish, and in the log we
see that it just waits for 10 seconds until the "Are you awake"
message (I tried increasing the timeout but it just waits until the
timeout, not processing either the "git fetch" or the `file-truename'.
It seems that when the second connection starts, if you request
something that happens to use the first connection, the second
connection will also be stuck and nothing will happen until the
timeout is reached.

So, basically I can see 3 ways to tackle the problem:

- Don't try to do project detection when there's more than one TRAMP
connection to the same host. Can you point me at a way to do that?
Something like `(tramp-connections-count default-directory)'
- Find a way to detect wether the 2nd connection is "ready", which is
my attempt with `tramp-connectable-p' or `file-remote-p', but I
believe this way is a dead-end because TRAMP will tell me about the
1st connection and not the 2nd one.
- Fix TRAMP so it better handles multiple connections, but it's likely
to involve quite some work. Maybe a simple idea would be that calls to
`file-truename` always use the most recent connection? I'm not sure I
make sense so feel free to ignore it :)

Thank you!
Philippe





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
  2015-01-25 20:15       ` Philippe Vaucher
@ 2015-01-25 21:10         ` Michael Albinus
  2015-01-25 21:47           ` Philippe Vaucher
  0 siblings, 1 reply; 13+ messages in thread
From: Michael Albinus @ 2015-01-25 21:10 UTC (permalink / raw)
  To: Philippe Vaucher; +Cc: 19636

Philippe Vaucher <philippe.vaucher@gmail.com> writes:

> Thanks for mentionning `buffer-file-truename', I didn't know about it.
> Unfortunately my problem is more complex than that because at the
> moment this package does many files existence checks in order to find
> the project root directory (e.g it tries to find any of "Gemfile",
> ".git", "Makefile" in the current directory, then if not found in the
> parent one, etc). I know that all these filesystem checks doesn't
> scale very well when not done locally, but I'm kinda stuck with the
> current design. It is planned to refactor it all into leveraging
> caching and possibly doing these checks by spawning a little bash
> script remotely.

Out of the Tramp problem, do you know `locate-dominating-file'? It's
designed for that purpose; see for example how it is used in `vc-find-root'.

> Ah, that's very helpful to understand what's going on. What is weird
> is that there seems to be some kind of deadlocking happening, because
> "git fetch" takes less than 10 seconds to finish, and in the log we
> see that it just waits for 10 seconds until the "Are you awake"
> message (I tried increasing the timeout but it just waits until the
> timeout, not processing either the "git fetch" or the `file-truename'.
> It seems that when the second connection starts, if you request
> something that happens to use the first connection, the second
> connection will also be stuck and nothing will happen until the
> timeout is reached.

In the current Tramp design, there can be only up to 2 parallel
connections. The primary one is always used for all file operations, and
the second one is used exclusively for `start-file-process'. So we must
teach `file-truename' and friends to use only the primary connection,
and not the one which is just active.

> So, basically I can see 3 ways to tackle the problem:
>
> - Don't try to do project detection when there's more than one TRAMP
> connection to the same host. Can you point me at a way to do that?
> Something like `(tramp-connections-count default-directory)'

All tests I could tell you are internal to Tramp. Likely, they will
change when I reimplement the connection handling; it's not worth to use
them in your case, therefore.

> - Find a way to detect wether the 2nd connection is "ready", which is
> my attempt with `tramp-connectable-p' or `file-remote-p', but I
> believe this way is a dead-end because TRAMP will tell me about the
> 1st connection and not the 2nd one.

No, not this way. `file-truename' must use the first connection, nothing
else.

> - Fix TRAMP so it better handles multiple connections, but it's likely
> to involve quite some work. Maybe a simple idea would be that calls to
> `file-truename` always use the most recent connection? I'm not sure I
> make sense so feel free to ignore it :)

I will think about. Not sure, whether there will be results very soon.

> Thank you!
> Philippe

Best regards, Michael.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
  2015-01-25 21:10         ` Michael Albinus
@ 2015-01-25 21:47           ` Philippe Vaucher
  0 siblings, 0 replies; 13+ messages in thread
From: Philippe Vaucher @ 2015-01-25 21:47 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 19636

> Out of the Tramp problem, do you know `locate-dominating-file'? It's
> designed for that purpose; see for example how it is used in `vc-find-root'.

Yes, actually they implement their own version, see
https://github.com/bbatsov/projectile/blob/master/projectile.el#L583
The issue that I'm trying to solve is
https://github.com/bbatsov/projectile/issues/523

There's many problems with the current implementation, namely that
they call `file-truename' way too much.

I'll follow your suggestion and take a look at `vc-find-root', maybe I
can propose a rewrite that is much simpler and TRAMP friendly.


> In the current Tramp design, there can be only up to 2 parallel
> connections. The primary one is always used for all file operations, and
> the second one is used exclusively for `start-file-process'. So we must
> teach `file-truename' and friends to use only the primary connection,
> and not the one which is just active.

Okay, good to know.


>> - Fix TRAMP so it better handles multiple connections, but it's likely
>> to involve quite some work. Maybe a simple idea would be that calls to
>> `file-truename` always use the most recent connection? I'm not sure I
>> make sense so feel free to ignore it :)
>
> I will think about. Not sure, whether there will be results very soon.

No worries. Understanding the problem helps a lot already, now I know
what can/should be done when we refactor this package.

Thanks,
Philippe





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
  2015-01-21 16:15 ` Michael Albinus
  2015-01-21 17:40   ` Philippe Vaucher
@ 2017-03-25 20:43   ` Philippe Vaucher
  2017-03-27 13:36     ` Michael Albinus
  1 sibling, 1 reply; 13+ messages in thread
From: Philippe Vaucher @ 2017-03-25 20:43 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 19636

[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]

>
> (setq buggy-tramp-mode-lighter
>       '(:eval (format " Projectile[%s]"
>                       (if (file-remote-p default-directory)
>                           default-directory
>                         (file-truename default-directory)))))
>

Hello,

I just wanted to notice you that I made progress about this issue at
https://github.com/bbatsov/projectile/pull/1129

To remind you a little bit the issue: TRAMP blocks or forgot to ask the
password to the user if a minor's mode lighter tries to query the buffer's
default-directory file properties.

My workaround is the following:

 (let* ((dir default-directory)
         (is-local (not (file-remote-p dir)))
         (is-connected (file-remote-p dir nil t)))
    (if (or is-local is-connected)
        (do-the-thing)
      (do-nothing)))

Basically, do nothing if there's no reliable way of getting the information
yet (we are remote and not connected yet).

This seems to repair the issue almost always, except for TRAMP 2.2.11 (the
one in emacs 24.5).

There is a recapitulary table at
https://github.com/bbatsov/projectile/pull/1129#issuecomment-289237057

I believe this workaround seems future proof, given all the information
comes from `file-remote-p` which is used to detect remoteness and
connectivity.

Hope it helps,
Philippe

[-- Attachment #2: Type: text/html, Size: 2051 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
  2017-03-25 20:43   ` Philippe Vaucher
@ 2017-03-27 13:36     ` Michael Albinus
  2017-03-27 15:46       ` Philippe Vaucher
  0 siblings, 1 reply; 13+ messages in thread
From: Michael Albinus @ 2017-03-27 13:36 UTC (permalink / raw)
  To: Philippe Vaucher; +Cc: 19636

Philippe Vaucher <philippe.vaucher@gmail.com> writes:

> Hello,

Hi Philippe,

> Basically, do nothing if there's no reliable way of getting the
> information yet (we are remote and not connected yet).

Sounds reasonable for me, thanks for reporting the status. I also
recommend to test with the development version of Emacs (aka 26.0.50),
because there have been serious changes in Tramp.

> This seems to repair the issue almost always, except for TRAMP 2.2.11
> (the one in emacs 24.5).

Well, I don't see what could be done else here on emacs-devel. What do
you expect us to do else?

> Hope it helps,
> Philippe

Best regards, Michael.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
  2017-03-27 13:36     ` Michael Albinus
@ 2017-03-27 15:46       ` Philippe Vaucher
  2017-07-14 13:12         ` Michael Albinus
  0 siblings, 1 reply; 13+ messages in thread
From: Philippe Vaucher @ 2017-03-27 15:46 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 19636

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

>
> > Basically, do nothing if there's no reliable way of getting the
> > information yet (we are remote and not connected yet).
>
> Sounds reasonable for me, thanks for reporting the status. I also
> recommend to test with the development version of Emacs (aka 26.0.50),
> because there have been serious changes in Tramp.
>

Good idea.


> > This seems to repair the issue almost always, except for TRAMP 2.2.11
> > (the one in emacs 24.5).
>
> Well, I don't see what could be done else here on emacs-devel. What do
> you expect us to do else?
>

Oh, I was just reporting my findings. Not much you can do except keep in
mind people *do* call various emacs api on buffer-file inside :lighter or
even inside the function that has to decide wether a mode should be on or
off, so the emacs api should be resilient to errors reguarding this.
Currently it fails kinda catastrophically when you don't check with
`file-remote-p` beforehand (emacs hang and one has to furiously press C-g
or C-c to get emacs back, and often this is not sufficient as any command
you want to type hangs again, so one has to quit).

Philippe

[-- Attachment #2: Type: text/html, Size: 1589 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
  2017-03-27 15:46       ` Philippe Vaucher
@ 2017-07-14 13:12         ` Michael Albinus
  2017-07-21 12:56           ` Philippe Vaucher
  0 siblings, 1 reply; 13+ messages in thread
From: Michael Albinus @ 2017-07-14 13:12 UTC (permalink / raw)
  To: Philippe Vaucher; +Cc: 19636-done

Version: 26.1

Philippe Vaucher <philippe.vaucher@gmail.com> writes:

Hi Philippe,

>     > Basically, do nothing if there's no reliable way of getting the
>     > information yet (we are remote and not connected yet).
>
>     Sounds reasonable for me, thanks for reporting the status. I also
>     recommend to test with the development version of Emacs (aka
>     26.0.50), because there have been serious changes in Tramp.
>
> Good idea.
>
>     Well, I don't see what could be done else here on emacs-devel.
>     What do you expect us to do else?
>
> Oh, I was just reporting my findings. Not much you can do except keep
> in mind people *do* call various emacs api on buffer-file inside :
> lighter or even inside the function that has to decide wether a mode
> should be on or off, so the emacs api should be resilient to errors
> reguarding this. Currently it fails kinda catastrophically when you
> don't check with `file-remote-p` beforehand (emacs hang and one has to
> furiously press C-g or C-c to get emacs back, and often this is not
> sufficient as any command you want to type hangs again, so one has to
> quit).

I'm closing this bug, because there's nothing left to do.

Tramp 2.3.2 of Emacs 26.0.50 has seen some patches for improving
asynchronous processes. Maybe they help you.

> Philippe

Best regards, Michael.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
  2017-07-14 13:12         ` Michael Albinus
@ 2017-07-21 12:56           ` Philippe Vaucher
  0 siblings, 0 replies; 13+ messages in thread
From: Philippe Vaucher @ 2017-07-21 12:56 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 19636-done

[-- Attachment #1: Type: text/plain, Size: 249 bytes --]

>
> I'm closing this bug, because there's nothing left to do.
>
> Tramp 2.3.2 of Emacs 26.0.50 has seen some patches for improving
> asynchronous processes. Maybe they help you.
>

Hello! Alright, thanks for letting me know.

Kind regards,
Philippe

[-- Attachment #2: Type: text/html, Size: 518 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-07-21 12:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 17:49 bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter Philippe Vaucher
2015-01-21 16:15 ` Michael Albinus
2015-01-21 17:40   ` Philippe Vaucher
2015-01-22 11:07     ` Philippe Vaucher
2015-01-25 19:40     ` Michael Albinus
2015-01-25 20:15       ` Philippe Vaucher
2015-01-25 21:10         ` Michael Albinus
2015-01-25 21:47           ` Philippe Vaucher
2017-03-25 20:43   ` Philippe Vaucher
2017-03-27 13:36     ` Michael Albinus
2017-03-27 15:46       ` Philippe Vaucher
2017-07-14 13:12         ` Michael Albinus
2017-07-21 12:56           ` Philippe Vaucher

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).