GNU bug report logs - #55832
28.1; Emacs crashes when using tramp from helm in emacs-29

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thievol <at> posteo.net>

Date: Tue, 7 Jun 2022 15:24:02 UTC

Severity: normal

Found in version 28.1

Fixed in version 29.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, larsi <at> gnus.org, 55832 <at> debbugs.gnu.org
Subject: bug#55832: 28.1; Emacs crashes when using tramp from helm in emacs-29
Date: Tue, 14 Jun 2022 19:42:50 +0200
Thierry Volpiatto <thievol <at> posteo.net> writes:

Hi Thierry,

>>> I have a function wrote long time ago to delete tramp connections which
>>> is not working (or most of the time not working) because it uses
>>> tramp-list-connections which is itself broken (unexpectedly it worked
>>> only once today don't know why).
>>>
>>> The test (tramp-connection-property-p key "process-buffer") is wrong IMO
>>> according to the data fetched from tramp-cache-data,
>>
>> I don't understand this. tramp-connection-property-p just tests whether
>> a connection property is defined.
>
> Where? in key or value?

Key.

> tramp-list-connections is often returning nil whatever the value of
> tramp-cache-data is but I have no recipe to reproduce this reliabily, if
> I can make a recipe when I have time I will report it, for now perhaps
> you can forget it.

Hmm. Start "emacs -Q -l tramp". Then in *scratch*

;; There's an empty cache.
tramp-cache-data
=> #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ())

;; Open a connection.
(file-attributes "/sudo::")
=> (t 9 0 0 (25256 27751 0 0) (25256 48385 0 0) (25256 48385 0 0) 4096 "dr-xr-x---" nil 2621441 (-1 . 1))

;; The cache contains an entry for this connection, and this entry
;; contains the property "process-buffer" with value nil.
(pp tramp-cache-data)
=> #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data
	      ((tramp-file-name "sudo"
				#("root" 0 4
				  (tramp-default t))
				nil
				#("gandalf" 0 7
				  (tramp-default t))
				nil nil nil)
	       #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data
			     ("null-device" "/dev/null" "process-buffer" nil "uname" "Linux 5.17.12-300.fc36.x86_64" "locale" "LC_ALL=en_US.utf8" "test" "test" "remote-path"
			      ("/usr/bin" "/bin" "/sbin" "/usr/sbin" "/usr/local/bin" "/usr/local/sbin")
			      "pipe-buf" 4096 "remote-shell" "/bin/sh"
			      #("~root" 1 5
				(tramp-default t))
			      "/root" "stat" "env QUOTING_STYLE=locale \\stat" "id" "/usr/bin/id" "gid-integer" 0))
   ...

;; Here we see that "process-buffer" is declared.
(tramp-connection-property-p (tramp-dissect-file-name "/sudo::") "process-buffer")
=> t

(tramp-list-connections)
=> ((tramp-file-name sudo root nil gandalf nil nil nil))

;; Now wait ca 5 min, until you see the message
;; "Tramp: Timeout session /sudo:root <at> gandalf:".
(tramp-connection-property-p (tramp-dissect-file-name "/sudo::") "process-buffer")
=> nil

(tramp-list-connections)
=> nil

> Thanks.

Best regards, Michael.




This bug report was last modified 2 years and 333 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.