Subject: bug#63578: 29.0.91; Org Cannot tangle with tramp using sudo

From: Kostadin Ninev <[email-masked]>
Date: Fri, 19 May 2023 09:49:30 +0000

> Could you, pls, rerun the test with tramp-verbose set to 10?

This is the output:

;; Emacs: 29.0.91 Tramp: 2.6.0.29.1 -*- mode: outline; coding: utf-8; -*-
;; Location: /usr/share/emacs/29.0.91/lisp/net/tramp.elc Git: /
12:46:32.805953 tramp-get-connection-property (7) # copy-program undef; cache used: nil
12:46:32.806489 tramp-get-connection-property (7) # copy-program undef; cache used: nil
12:46:32.806672 tramp-get-connection-property (7) # copy-program undef; cache used: nil
12:46:32.806738 tramp-get-connection-property (7) # copy-program undef; cache used: nil
12:46:32.806787 tramp-add-hops (5) # Add (#("^srv$" 1 4 (tramp-default t)) #("^root$" 1 5 (tramp-default t)) #("/ssh:srv:" 0 9 (tramp-ad-hoc t))) to ‘tramp-default-proxies-alist’
12:46:32.806911 tramp-get-file-property (8) # /etc/test.conf file-exists-p undef; inhibit: 10; cache used: nil; cached at: nil
12:46:32.806941 tramp-get-file-property (8) # /etc/test.conf file-attributes undef; inhibit: 10; cache used: nil; cached at: nil
12:46:32.806966 tramp-get-connection-property (7) # file-exists undef; cache used: nil
12:46:32.806984 tramp-get-file-exists-command (5) # Finding command to check if file exists
12:46:32.807017 tramp-get-connection-property (7) # test undef; cache used: nil
12:46:32.807034 tramp-get-test-command (5) # Finding a suitable ‘test’ command
12:46:32.807057 tramp-get-connection-property (7) # null-device undef; cache used: nil
12:46:32.807236 tramp-set-connection-property (7) # null-device /dev/null
12:46:32.807257 tramp-get-connection-property (7) # process-name nil; cache used: nil
12:46:32.807276 tramp-get-connection-property (7) # process-name nil; cache used: nil
12:46:32.807295 tramp-get-connection-property (7) # process-buffer nil; cache used: nil
12:46:32.807315 tramp-get-connection-property (7) # process-buffer nil; cache used: nil
12:46:32.807335 tramp-set-connection-property (7) # process-buffer nil
12:46:32.807495 tramp-maybe-open-connection (3) # Opening connection nil for root@srv using sudo...
12:46:32.807686 tramp-call-process (6) # ‘locale -a’ nil  *temp*-119282
12:46:32.808395 tramp-call-process (6) # 0
bg_BG.utf8
C
C.UTF-8
en_US.utf8
POSIX
12:46:32.808429 tramp-get-local-locale (7) # locale en_US.utf8
12:46:43.771992 tramp-compute-multi-hops (10) # 
  backtrace()
  tramp-error((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("srv" 0 3 (tramp-default t)) nil "/etc/test.conf" nil) quit "")
  tramp-signal-hook-function(quit nil)
  #f(compiled-function () #<bytecode -0x1c8a4feadcf07a87>)()
  format-spec(#("/ssh:srv:" 0 9 (tramp-ad-hoc t)) ((117 . "") (104 . #("srv" 0 3 (tramp-ad-hoc t)))))
  tramp-compute-multi-hops((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("srv" 0 3 (tramp-default t)) nil "/etc/test.conf" nil))
  tramp-maybe-open-connection((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("srv" 0 3 (tramp-default t)) nil "/etc/test.conf" nil))
  tramp-send-command((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("srv" 0 3 (tramp-default t)) nil "/etc/test.conf" nil) "test 0 2>/dev/null; echo tramp_exit_status $?")
  tramp-send-command-and-check((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("srv" 0 3 (tramp-default t)) nil "/etc/test.conf" nil) "test 0")
  tramp-get-test-command((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("srv" 0 3 (tramp-default t)) nil "/etc/test.conf" nil))
  tramp-find-file-exists-command((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("srv" 0 3 (tramp-default t)) nil "/etc/test.conf" nil))
  tramp-get-file-exists-command((tramp-file-name "sudo" #("root" 0 4 (tramp-default t)) nil #("srv" 0 3 (tramp-default t)) nil "/etc/test.conf" nil))
  tramp-sh-handle-file-exists-p(#("/sudo:root@srv:/etc/test.conf" 6 10 (tramp-default t) 11 14 (tramp-default t)))
  tramp-sh-file-name-handler(file-exists-p #("/sudo:root@srv:/etc/test.conf" 6 10 (tramp-default t) 11 14 (tramp-default t)))
  apply(tramp-sh-file-name-handler file-exists-p #("/sudo:root@srv:/etc/test.conf" 6 10 (tramp-default t) 11 14 (tramp-default t)))
  tramp-file-name-handler(file-exists-p #("/sudo:root@srv:/etc/test.conf" 6 10 (tramp-default t) 11 14 (tramp-default t)))
  file-exists-p("/ssh:srv|sudo::/etc/test.conf")
  #f(compiled-function (by-fn) #<bytecode 0x35da530f428fa83>)(("/ssh:srv|sudo::/etc/test.conf" ("conf" 14 "1.org" "file:/home/dinko/1.org::*test" "test:1" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "code") (:tangle . "/ssh:srv|sudo::/etc/test.conf") (:hlines . "no") (:noweb . "no") (:cache . "no") (:session . "none")) "test" nil)))
  org-babel-tangle(nil)
  funcall-interactively(org-babel-tangle nil)
  command-execute(org-babel-tangle)
12:46:43.772057 tramp-compute-multi-hops (1) # Quit: "Quit", ""
12:46:43.772218 tramp-maybe-open-connection (3) # Opening connection nil for root@srv using sudo...failed
12:46:43.772930 tramp-get-connection-property (7) # process-buffer nil; cache used: t
12:46:43.772992 tramp-get-file-property (8) # / file-truename nil; inhibit: 10; cache used: nil; cached at: nil
12:46:43.773033 tramp-flush-directory-properties (8) # /
12:46:43.773080 tramp-flush-connection-properties (7) # (tramp-file-name sudo root nil srv nil nil nil) (process-buffer null-device)
-- 
Kostadin Ninev.