* bug#57800: TRAMP insert-file-contents now fails for regions
@ 2022-09-14 12:11 Paul Pogonyshev
2022-09-14 18:08 ` Lars Ingebrigtsen
0 siblings, 1 reply; 20+ messages in thread
From: Paul Pogonyshev @ 2022-09-14 12:11 UTC (permalink / raw)
To: 57800
[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]
Git commit fd1ee05977.
Open any file with TRAMP. From this buffer, evaluate:
(let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents
file nil)))
This works fine. However, if you use a region:
(let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents
file nil 1 10)))
this fails with an obviously wrong (file is certainly there) signal:
Debugger entered--Lisp error: (file-missing "/ssh:...")
signal(file-missing ("/ssh:..."))
tramp-error((tramp-file-name "ssh" "..." nil "..." "..." "..." nil)
file-missing "/ssh:...")
tramp-handle-insert-file-contents("/ssh:..." nil 1 10 nil)
apply(tramp-handle-insert-file-contents ("/ssh:..." nil 1 10 nil))
tramp-sh-file-name-handler(insert-file-contents "/ssh:..." nil 1 10
nil)
apply(tramp-sh-file-name-handler insert-file-contents ("/ssh:..." nil
1 10 nil))
tramp-file-name-handler(insert-file-contents "/ssh:..." nil 1 10 nil)
insert-file-contents("/ssh:..." nil 1 10)
(progn (insert-file-contents file nil 1 10))
Please add some automated tests for this.
Also, when a command fails with `file-missing' signal, Emacs UI only prints
the filename, as that seems to be the signal data. From user point of view
that says nothing. You can only understand what's wrong (even if this is
not a bug, as above) by setting `debug-on-error' to t, which is extremely
user-unfriendly.
Paul
[-- Attachment #2: Type: text/html, Size: 1902 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-14 12:11 bug#57800: TRAMP insert-file-contents now fails for regions Paul Pogonyshev
@ 2022-09-14 18:08 ` Lars Ingebrigtsen
2022-09-14 18:18 ` Paul Pogonyshev
0 siblings, 1 reply; 20+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-14 18:08 UTC (permalink / raw)
To: Paul Pogonyshev; +Cc: 57800
Paul Pogonyshev <pogonyshev@gmail.com> writes:
> Git commit fd1ee05977.
>
> Open any file with TRAMP. From this buffer, evaluate:
>
> (let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil)))
>
> This works fine. However, if you use a region:
>
> (let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10)))
>
> this fails with an obviously wrong (file is certainly there) signal:
>
> Debugger entered--Lisp error: (file-missing "/ssh:...")
> signal(file-missing ("/ssh:..."))
I tried this recipe with the current trunk, and things worked fine for
me.
Is it possible that you have an old version of tramp somewhere in your
load path? I seem to vaguely recall that insert-file-contents +
start/end was something that was fixed sometime last year.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-14 18:08 ` Lars Ingebrigtsen
@ 2022-09-14 18:18 ` Paul Pogonyshev
2022-09-14 18:23 ` Lars Ingebrigtsen
0 siblings, 1 reply; 20+ messages in thread
From: Paul Pogonyshev @ 2022-09-14 18:18 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 57800
[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]
Hm, now I cannot reproduce this anymore. But today I got this bug,
recompiled Emacs from Git and the bug was still there. Right now I
tested Emacs 28 in case I managed to switch them accidentally, but
no, also not there.
So, either I have mixed something up, or this depends on some
volatile state in TRAMP, e.g. its cache.
I guess you can close the bug.
Paul
On Wed, 14 Sept 2022 at 20:08, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Paul Pogonyshev <pogonyshev@gmail.com> writes:
>
> > Git commit fd1ee05977.
> >
> > Open any file with TRAMP. From this buffer, evaluate:
> >
> > (let ((file buffer-file-name)) (with-temp-buffer
> (insert-file-contents file nil)))
> >
> > This works fine. However, if you use a region:
> >
> > (let ((file buffer-file-name)) (with-temp-buffer
> (insert-file-contents file nil 1 10)))
> >
> > this fails with an obviously wrong (file is certainly there) signal:
> >
> > Debugger entered--Lisp error: (file-missing "/ssh:...")
> > signal(file-missing ("/ssh:..."))
>
> I tried this recipe with the current trunk, and things worked fine for
> me.
>
> Is it possible that you have an old version of tramp somewhere in your
> load path? I seem to vaguely recall that insert-file-contents +
> start/end was something that was fixed sometime last year.
>
[-- Attachment #2: Type: text/html, Size: 1899 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-14 18:18 ` Paul Pogonyshev
@ 2022-09-14 18:23 ` Lars Ingebrigtsen
2022-09-14 18:33 ` Paul Pogonyshev
0 siblings, 1 reply; 20+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-14 18:23 UTC (permalink / raw)
To: Paul Pogonyshev; +Cc: Michael Albinus, 57800
Paul Pogonyshev <pogonyshev@gmail.com> writes:
> Hm, now I cannot reproduce this anymore. But today I got this bug,
> recompiled Emacs from Git and the bug was still there. Right now I
> tested Emacs 28 in case I managed to switch them accidentally, but
> no, also not there.
>
> So, either I have mixed something up, or this depends on some
> volatile state in TRAMP, e.g. its cache.
>
> I guess you can close the bug.
Perhaps Michael has some comments here, so we'll wait for him to chime
in before closing, I think.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-14 18:23 ` Lars Ingebrigtsen
@ 2022-09-14 18:33 ` Paul Pogonyshev
2022-09-15 10:30 ` Michael Albinus
0 siblings, 1 reply; 20+ messages in thread
From: Paul Pogonyshev @ 2022-09-14 18:33 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Michael Albinus, 57800
[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]
Might be somehow related to bug 57486. That one also doesn't happen to
me anymore, though this might be because it got fixed by side-effect,
since I have recompiled Emacs several times since then. But that bug
happened to me at least twice (with Emacs restarted etc.) on different
days. I could immediately tell since our Java application won't even
compile if system encoding is not UTF-8.
Paul
On Wed, 14 Sept 2022 at 20:23, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Paul Pogonyshev <pogonyshev@gmail.com> writes:
>
> > Hm, now I cannot reproduce this anymore. But today I got this bug,
> > recompiled Emacs from Git and the bug was still there. Right now I
> > tested Emacs 28 in case I managed to switch them accidentally, but
> > no, also not there.
> >
> > So, either I have mixed something up, or this depends on some
> > volatile state in TRAMP, e.g. its cache.
> >
> > I guess you can close the bug.
>
> Perhaps Michael has some comments here, so we'll wait for him to chime
> in before closing, I think.
>
[-- Attachment #2: Type: text/html, Size: 1515 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-14 18:33 ` Paul Pogonyshev
@ 2022-09-15 10:30 ` Michael Albinus
2022-09-16 9:37 ` Lars Ingebrigtsen
0 siblings, 1 reply; 20+ messages in thread
From: Michael Albinus @ 2022-09-15 10:30 UTC (permalink / raw)
To: Paul Pogonyshev; +Cc: Lars Ingebrigtsen, 57800
Paul Pogonyshev <pogonyshev@gmail.com> writes:
Hi Paul,
> Might be somehow related to bug 57486. That one also doesn't happen to
> me anymore, though this might be because it got fixed by side-effect,
> since I have recompiled Emacs several times since then. But that bug
> happened to me at least twice (with Emacs restarted etc.) on different
> days. I could immediately tell since our Java application won't even
> compile if system encoding is not UTF-8.
tramp-handle-insert-file-contents hasn't been touched for about two
months, so it shouldn't be caused by a change in that function. But as
said in bug#57486, there were some bugs when migrating Tramp to use
rx. They are fixed meanwhile (I hope I could detect all of them), which
might explain the behavior.
Btw, tramp-test09-insert-file-contents checks also inserting just a
file region. So the Tramp testsuite should signal regressions here.
From my pov, we could close the bug, unless the problem happens again.
> Paul
Best regards, Michael.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-15 10:30 ` Michael Albinus
@ 2022-09-16 9:37 ` Lars Ingebrigtsen
2022-09-29 9:24 ` Paul Pogonyshev
0 siblings, 1 reply; 20+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-16 9:37 UTC (permalink / raw)
To: Michael Albinus; +Cc: Paul Pogonyshev, 57800
Michael Albinus <michael.albinus@gmx.de> writes:
>>From my pov, we could close the bug, unless the problem happens again.
>
>> Paul
OK; closing this bug report, then.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-16 9:37 ` Lars Ingebrigtsen
@ 2022-09-29 9:24 ` Paul Pogonyshev
2022-09-29 10:43 ` Lars Ingebrigtsen
0 siblings, 1 reply; 20+ messages in thread
From: Paul Pogonyshev @ 2022-09-29 9:24 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Michael Albinus, 57800
[-- Attachment #1: Type: text/plain, Size: 397 bytes --]
Happened to me again. Symptoms are exactly the same: inserting the whole
file works, inserting only a part dies with `file-missing'.
Paul
On Fri, 16 Sept 2022 at 11:37, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Michael Albinus <michael.albinus@gmx.de> writes:
>
> >>From my pov, we could close the bug, unless the problem happens again.
> >
> >> Paul
>
> OK; closing this bug report, then.
>
[-- Attachment #2: Type: text/html, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-29 9:24 ` Paul Pogonyshev
@ 2022-09-29 10:43 ` Lars Ingebrigtsen
2022-09-29 11:26 ` Paul Pogonyshev
0 siblings, 1 reply; 20+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-29 10:43 UTC (permalink / raw)
To: Paul Pogonyshev; +Cc: Michael Albinus, 57800
Paul Pogonyshev <pogonyshev@gmail.com> writes:
> Happened to me again. Symptoms are exactly the same: inserting the whole file
> works, inserting only a part dies with `file-missing'.
OK; reopening.
Do you have a backtrace for when it fails?
A complete recipe to reproduce the problem would also be helpful.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-29 10:43 ` Lars Ingebrigtsen
@ 2022-09-29 11:26 ` Paul Pogonyshev
2022-09-29 11:27 ` Paul Pogonyshev
2022-09-29 17:39 ` Michael Albinus
0 siblings, 2 replies; 20+ messages in thread
From: Paul Pogonyshev @ 2022-09-29 11:26 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Michael Albinus, 57800
[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]
No, the bug is not reproducible all the time. I have switched to Emacs 28
since then, as this breaks functionality important for me. Now tried to run
29 again, but it doesn't happen anymore, neither with `-Q' nor without.
Also cannot find a backtrace for the same reason now.
From the reproducing early today I remember that restarting Emacs doesn't
help - or is at least random, since now a newly started Emacs doesn't
exhibit this problem. It feels like the problem is in some cache and the
cache appears to be persistent (cross-Emacs), if TRAMP uses something like
that at all.
The files I have noticed this on have names like "/ssh:USER@HOST#22222:/...",
i.e. using SSH backend and a non-standard port, if that matters.
Paul
On Thu, 29 Sept 2022 at 12:43, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Paul Pogonyshev <pogonyshev@gmail.com> writes:
>
> > Happened to me again. Symptoms are exactly the same: inserting the whole
> file
> > works, inserting only a part dies with `file-missing'.
>
> OK; reopening.
>
> Do you have a backtrace for when it fails?
>
> A complete recipe to reproduce the problem would also be helpful.
>
[-- Attachment #2: Type: text/html, Size: 1615 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-29 11:26 ` Paul Pogonyshev
@ 2022-09-29 11:27 ` Paul Pogonyshev
2022-09-29 17:39 ` Michael Albinus
1 sibling, 0 replies; 20+ messages in thread
From: Paul Pogonyshev @ 2022-09-29 11:27 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Michael Albinus, 57800
[-- Attachment #1: Type: text/plain, Size: 1547 bytes --]
> is not reproducible all the time
As a clarification, if certain Emacs instance is affected, then the bug
appears to happen in it always. Likewise, if it works once in an instance,
then it will work properly every time in it -- or at least I haven't seen
any counterexamples.
Paul
On Thu, 29 Sept 2022 at 13:26, Paul Pogonyshev <pogonyshev@gmail.com> wrote:
> No, the bug is not reproducible all the time. I have switched to Emacs 28
> since then, as this breaks functionality important for me. Now tried to run
> 29 again, but it doesn't happen anymore, neither with `-Q' nor without.
> Also cannot find a backtrace for the same reason now.
>
> From the reproducing early today I remember that restarting Emacs doesn't
> help - or is at least random, since now a newly started Emacs doesn't
> exhibit this problem. It feels like the problem is in some cache and the
> cache appears to be persistent (cross-Emacs), if TRAMP uses something like
> that at all.
>
> The files I have noticed this on have names like "/ssh:USER@HOST#22222:/...",
> i.e. using SSH backend and a non-standard port, if that matters.
>
> Paul
>
> On Thu, 29 Sept 2022 at 12:43, Lars Ingebrigtsen <larsi@gnus.org> wrote:
>
>> Paul Pogonyshev <pogonyshev@gmail.com> writes:
>>
>> > Happened to me again. Symptoms are exactly the same: inserting the
>> whole file
>> > works, inserting only a part dies with `file-missing'.
>>
>> OK; reopening.
>>
>> Do you have a backtrace for when it fails?
>>
>> A complete recipe to reproduce the problem would also be helpful.
>>
>
[-- Attachment #2: Type: text/html, Size: 2333 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-29 11:26 ` Paul Pogonyshev
2022-09-29 11:27 ` Paul Pogonyshev
@ 2022-09-29 17:39 ` Michael Albinus
2022-09-30 8:49 ` Paul Pogonyshev
1 sibling, 1 reply; 20+ messages in thread
From: Michael Albinus @ 2022-09-29 17:39 UTC (permalink / raw)
To: Paul Pogonyshev; +Cc: Lars Ingebrigtsen, 57800
Paul Pogonyshev <pogonyshev@gmail.com> writes:
Hi Paul,
> No, the bug is not reproducible all the time. I have switched to Emacs
> 28 since then, as this breaks functionality important for me. Now
> tried to run 29 again, but it doesn't happen anymore, neither with
> `-Q' nor without. Also cannot find a backtrace for the same reason
> now.
>
> From the reproducing early today I remember that restarting Emacs
> doesn't help - or is at least random, since now a newly started Emacs
> doesn't exhibit this problem. It feels like the problem is in some
> cache and the cache appears to be persistent (cross-Emacs), if TRAMP
> uses something like that at all.
>
> The files I have noticed this on have names like
> "/ssh:USER@HOST#22222:/...", i.e. using SSH backend and a non-standard
> port, if that matters.
Thanks, this might make a difference when caching files. Ports are used
for creating a file name index in the cache, but I'm not certain they
are always taken into account, in all dark corners of Tramp. Will analyze.
However, it would be great if you could reproduce the bug somehow in an
Emacs instance started with
--8<---------------cut here---------------start------------->8---
emacs -Q --eval '(setq tramp-verbose 10)'
--8<---------------cut here---------------end--------------->8---
If the problem happens, pls show the recipe to provoke, and the Tramp
debug buffer.
> Paul
Best regards, Michael.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-29 17:39 ` Michael Albinus
@ 2022-09-30 8:49 ` Paul Pogonyshev
2022-09-30 18:39 ` Michael Albinus
0 siblings, 1 reply; 20+ messages in thread
From: Paul Pogonyshev @ 2022-09-30 8:49 UTC (permalink / raw)
To: Michael Albinus; +Cc: Lars Ingebrigtsen, 57800
[-- Attachment #1.1: Type: text/plain, Size: 2169 bytes --]
Happened again. See attached `BACKTRACE' and `TRAMP-LOG' generated after
evalling `(setf tramp-verbose 10)'.
Note this suspicious entry in the log:
10:26:36.864700 tramp-get-remote-tmpdir (1) # File error: Directory
/ssh:USER@HOST#22222:/ssh:USER@HOST#22222:/tmp not accessible
Mentioned Git commit cannot be found, because I build Emacs with a few
minor local changes. I can assure you they have nothing to do with TRAMP.
The build is from 14th of September, so upstream commit number should be
around 997284d2a5 or so.
I will keep this Emacs instance around in case you have questions.
Paul
On Thu, 29 Sept 2022 at 19:39, Michael Albinus <michael.albinus@gmx.de>
wrote:
> Paul Pogonyshev <pogonyshev@gmail.com> writes:
>
> Hi Paul,
>
> > No, the bug is not reproducible all the time. I have switched to Emacs
> > 28 since then, as this breaks functionality important for me. Now
> > tried to run 29 again, but it doesn't happen anymore, neither with
> > `-Q' nor without. Also cannot find a backtrace for the same reason
> > now.
> >
> > From the reproducing early today I remember that restarting Emacs
> > doesn't help - or is at least random, since now a newly started Emacs
> > doesn't exhibit this problem. It feels like the problem is in some
> > cache and the cache appears to be persistent (cross-Emacs), if TRAMP
> > uses something like that at all.
> >
> > The files I have noticed this on have names like
> > "/ssh:USER@HOST#22222:/...", i.e. using SSH backend and a non-standard
> > port, if that matters.
>
> Thanks, this might make a difference when caching files. Ports are used
> for creating a file name index in the cache, but I'm not certain they
> are always taken into account, in all dark corners of Tramp. Will analyze.
>
> However, it would be great if you could reproduce the bug somehow in an
> Emacs instance started with
>
> --8<---------------cut here---------------start------------->8---
> emacs -Q --eval '(setq tramp-verbose 10)'
> --8<---------------cut here---------------end--------------->8---
>
> If the problem happens, pls show the recipe to provoke, and the Tramp
> debug buffer.
>
> > Paul
>
> Best regards, Michael.
>
[-- Attachment #1.2: Type: text/html, Size: 2852 bytes --]
[-- Attachment #2: BACKTRACE --]
[-- Type: application/octet-stream, Size: 5639 bytes --]
Debugger entered--Lisp error: (file-missing "/ssh:USER@HOST#22222:/PATH")
signal(file-missing ("/ssh:USER@HOST#22222:/PATH"))
tramp-error((tramp-file-name "ssh" "USER" nil "HOST" "22222" "/PATH" nil) file-missing "/ssh:USER@HOST#22222:/PATH")
tramp-handle-insert-file-contents("/ssh:USER@HOST#22222:/PATH" nil 1 10 nil)
apply(tramp-handle-insert-file-contents ("/ssh:USER@HOST#22222:/PATH" nil 1 10 nil))
tramp-sh-file-name-handler(insert-file-contents "/ssh:USER@HOST#22222:/PATH" nil 1 10 nil)
apply(tramp-sh-file-name-handler insert-file-contents ("/ssh:USER@HOST#22222:/PATH" nil 1 10 nil))
tramp-file-name-handler(insert-file-contents "/ssh:USER@HOST#22222:/PATH" nil 1 10 nil)
insert-file-contents("/ssh:USER@HOST#22222:/PATH" nil 1 10)
(progn (insert-file-contents file nil 1 10))
(unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(let ((file buffer-file-name)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
eval((let ((file buffer-file-name)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) t)
#f(compiled-function (exp &optional insert-value no-truncate char-print-limit) "Evaluate EXP and print value in the echo area.\nWhen called interactively, read an Emacs Lisp expression and\nevaluate it. Value is also consed on to front of the variable\n`values'. Optional argument INSERT-VALUE non-nil (interactively,\nwith a non `-' prefix argument) means insert the result into the\ncurrent buffer instead of printing it in the echo area.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. When NO-TRUNCATE is\nnon-nil (interactively, with a prefix argument of zero), however,\nthere is no such truncation.\n\nIf the resulting value is an integer, and CHAR-PRINT-LIMIT is\nnon-nil (interactively, unless given a non-zero prefix argument)\nit will be printed in several additional formats (octal,\nhexadecimal, and character). The character format is used only\nif the value is below CHAR-PRINT-LIMIT (interactively, if the\nprefix argument is -1 or the value doesn't exceed\n`eval-expression-print-maximum-character').\n\nRuns the hook `eval-expression-minibuffer-setup-hook' on entering the\nminibuffer.\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive #f(compiled-function () #<bytecode -0x456f37b6488d2cd>)) #<bytecode 0x1eb79da7fc1b0212>)((let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127)
apply(#f(compiled-function (exp &optional insert-value no-truncate char-print-limit) "Evaluate EXP and print value in the echo area.\nWhen called interactively, read an Emacs Lisp expression and\nevaluate it. Value is also consed on to front of the variable\n`values'. Optional argument INSERT-VALUE non-nil (interactively,\nwith a non `-' prefix argument) means insert the result into the\ncurrent buffer instead of printing it in the echo area.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. When NO-TRUNCATE is\nnon-nil (interactively, with a prefix argument of zero), however,\nthere is no such truncation.\n\nIf the resulting value is an integer, and CHAR-PRINT-LIMIT is\nnon-nil (interactively, unless given a non-zero prefix argument)\nit will be printed in several additional formats (octal,\nhexadecimal, and character). The character format is used only\nif the value is below CHAR-PRINT-LIMIT (interactively, if the\nprefix argument is -1 or the value doesn't exceed\n`eval-expression-print-maximum-character').\n\nRuns the hook `eval-expression-minibuffer-setup-hook' on entering the\nminibuffer.\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive #f(compiled-function () #<bytecode -0x456f37b6488d2cd>)) #<bytecode 0x1eb79da7fc1b0212>) ((let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127))
eval-expression((let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127)
funcall-interactively(eval-expression (let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127)
#<subr call-interactively>(eval-expression nil nil)
apply(#<subr call-interactively> eval-expression (nil nil))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> eval-expression nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (eval-expression nil nil))
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
[-- Attachment #3: TRAMP-LOG --]
[-- Type: application/octet-stream, Size: 18432 bytes --]
;; Emacs: 29.0.50 Tramp: 2.6.0-pre -*- mode: outline; coding: utf-8; -*-
;; Location: /usr/local/share/emacs/29.0.50/lisp/net/tramp.elc Git: master/5fd8e1cc49d2ebd59219ddf3a691949a22b601f3
10:26:36.638086 tramp-handle-insert-file-contents (3) # Inserting ‘/ssh:USER@HOST#22222:/PATH’...
10:26:36.639033 tramp-get-connection-property (7) # remote-tmpdir undef; cache used: nil
10:26:36.639200 tramp-get-connection-property (7) # tmpdir /ssh:USER@HOST#22222:/tmp; cache used: t
10:26:36.639335 tramp-get-connection-property (7) # tmpdir /ssh:USER@HOST#22222:/tmp; cache used: t
10:26:36.770463 tramp-get-file-property (8) # /ssh:USER@HOST#22222:/tmp file-directory-p nil; inhibit: 600; cache used: t; cached at: 10:25:59
10:26:36.864494 tramp-get-remote-tmpdir (10) #
backtrace()
tramp-error((tramp-file-name "ssh" "USER" nil "HOST" "22222" "/PATH" nil) file-error "Directory %s not accessible" "/ssh:USER@HOST#22222:/ssh:USER...")
tramp-get-remote-tmpdir((tramp-file-name "ssh" "USER" nil "HOST" "22222" "/PATH" nil))
tramp-make-tramp-temp-file((tramp-file-name "ssh" "USER" nil "HOST" "22222" "/PATH" nil))
tramp-handle-insert-file-contents("/ssh:USER@HOST#22222:/PATH" nil 1 10 nil)
apply(tramp-handle-insert-file-contents ("/ssh:USER@HOST#22222:/PATH" nil 1 10 nil))
tramp-sh-file-name-handler(insert-file-contents "/ssh:USER@HOST#22222:/PATH" nil 1 10 nil)
apply(tramp-sh-file-name-handler insert-file-contents ("/ssh:USER@HOST#22222:/PATH" nil 1 10 nil))
tramp-file-name-handler(insert-file-contents "/ssh:USER@HOST#22222:/PATH" nil 1 10 nil)
insert-file-contents("/ssh:USER@HOST#22222:/PATH" nil 1 10)
(progn (insert-file-contents file nil 1 10))
(unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(let ((file buffer-file-name)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
eval((let ((file buffer-file-name)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) t)
#f(compiled-function (exp &optional insert-value no-truncate char-print-limit) "Evaluate EXP and print value in the echo area.\nWhen called interactively, read an Emacs Lisp expression and\nevaluate it. Value is also consed on to front of the variable\n`values'. Optional argument INSERT-VALUE non-nil (interactively,\nwith a non `-' prefix argument) means insert the result into the\ncurrent buffer instead of printing it in the echo area.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. When NO-TRUNCATE is\nnon-nil (interactively, with a prefix argument of zero), however,\nthere is no such truncation.\n\nIf the resulting value is an integer, and CHAR-PRINT-LIMIT is\nnon-nil (interactively, unless given a non-zero prefix argument)\nit will be printed in several additional formats (octal,\nhexadecimal, and character). The character format is used only\nif the value is below CHAR-PRINT-LIMIT (interactively, if the\nprefix argument is -1 or the value doesn't exceed\n`eval-expression-print-maximum-character').\n\nRuns the hook `eval-expression-minibuffer-setup-hook' on entering the\nminibuffer.\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive #f(compiled-function () #<bytecode -0x456f37b6488d2cd>)) #<bytecode 0x1eb79da7fc1b0212>)((let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127)
apply(#f(compiled-function (exp &optional insert-value no-truncate char-print-limit) "Evaluate EXP and print value in the echo area.\nWhen called interactively, read an Emacs Lisp expression and\nevaluate it. Value is also consed on to front of the variable\n`values'. Optional argument INSERT-VALUE non-nil (interactively,\nwith a non `-' prefix argument) means insert the result into the\ncurrent buffer instead of printing it in the echo area.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. When NO-TRUNCATE is\nnon-nil (interactively, with a prefix argument of zero), however,\nthere is no such truncation.\n\nIf the resulting value is an integer, and CHAR-PRINT-LIMIT is\nnon-nil (interactively, unless given a non-zero prefix argument)\nit will be printed in several additional formats (octal,\nhexadecimal, and character). The character format is used only\nif the value is below CHAR-PRINT-LIMIT (interactively, if the\nprefix argument is -1 or the value doesn't exceed\n`eval-expression-print-maximum-character').\n\nRuns the hook `eval-expression-minibuffer-setup-hook' on entering the\nminibuffer.\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive #f(compiled-function () #<bytecode -0x456f37b6488d2cd>)) #<bytecode 0x1eb79da7fc1b0212>) ((let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127))
eval-expression((let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127)
funcall-interactively(eval-expression (let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127)
#<subr call-interactively>(eval-expression nil nil)
apply(#<subr call-interactively> eval-expression (nil nil))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> eval-expression nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (eval-expression nil nil))
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
10:26:36.864700 tramp-get-remote-tmpdir (1) # File error: Directory /ssh:USER@HOST#22222:/ssh:USER@HOST#22222:/tmp not accessible
10:26:36.865093 tramp-handle-insert-file-contents (3) # Inserting ‘/ssh:USER@HOST#22222:/PATH’...failed
10:26:36.865894 tramp-get-file-property (8) # /PATH file-exists-p t; inhibit: 600; cache used: t; cached at: 10:25:59
10:26:36.937445 tramp-handle-insert-file-contents (10) #
backtrace()
tramp-error((tramp-file-name "ssh" "USER" nil "HOST" "22222" "/PATH" nil) file-error "Directory /ssh:USER@HOST#22222:/ssh...")
tramp-signal-hook-function(file-error ("Directory /ssh:USER@HOST#22222:/ssh..."))
signal(file-error ("Directory /ssh:USER@HOST#22222:/ssh..."))
tramp-handle-insert-file-contents("/ssh:USER@HOST#22222:/PATH" nil 1 10 nil)
apply(tramp-handle-insert-file-contents ("/ssh:USER@HOST#22222:/PATH" nil 1 10 nil))
tramp-sh-file-name-handler(insert-file-contents "/ssh:USER@HOST#22222:/PATH" nil 1 10 nil)
apply(tramp-sh-file-name-handler insert-file-contents ("/ssh:USER@HOST#22222:/PATH" nil 1 10 nil))
tramp-file-name-handler(insert-file-contents "/ssh:USER@HOST#22222:/PATH" nil 1 10 nil)
insert-file-contents("/ssh:USER@HOST#22222:/PATH" nil 1 10)
(progn (insert-file-contents file nil 1 10))
(unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(let ((file buffer-file-name)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
eval((let ((file buffer-file-name)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) t)
#f(compiled-function (exp &optional insert-value no-truncate char-print-limit) "Evaluate EXP and print value in the echo area.\nWhen called interactively, read an Emacs Lisp expression and\nevaluate it. Value is also consed on to front of the variable\n`values'. Optional argument INSERT-VALUE non-nil (interactively,\nwith a non `-' prefix argument) means insert the result into the\ncurrent buffer instead of printing it in the echo area.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. When NO-TRUNCATE is\nnon-nil (interactively, with a prefix argument of zero), however,\nthere is no such truncation.\n\nIf the resulting value is an integer, and CHAR-PRINT-LIMIT is\nnon-nil (interactively, unless given a non-zero prefix argument)\nit will be printed in several additional formats (octal,\nhexadecimal, and character). The character format is used only\nif the value is below CHAR-PRINT-LIMIT (interactively, if the\nprefix argument is -1 or the value doesn't exceed\n`eval-expression-print-maximum-character').\n\nRuns the hook `eval-expression-minibuffer-setup-hook' on entering the\nminibuffer.\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive #f(compiled-function () #<bytecode -0x456f37b6488d2cd>)) #<bytecode 0x1eb79da7fc1b0212>)((let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127)
apply(#f(compiled-function (exp &optional insert-value no-truncate char-print-limit) "Evaluate EXP and print value in the echo area.\nWhen called interactively, read an Emacs Lisp expression and\nevaluate it. Value is also consed on to front of the variable\n`values'. Optional argument INSERT-VALUE non-nil (interactively,\nwith a non `-' prefix argument) means insert the result into the\ncurrent buffer instead of printing it in the echo area.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. When NO-TRUNCATE is\nnon-nil (interactively, with a prefix argument of zero), however,\nthere is no such truncation.\n\nIf the resulting value is an integer, and CHAR-PRINT-LIMIT is\nnon-nil (interactively, unless given a non-zero prefix argument)\nit will be printed in several additional formats (octal,\nhexadecimal, and character). The character format is used only\nif the value is below CHAR-PRINT-LIMIT (interactively, if the\nprefix argument is -1 or the value doesn't exceed\n`eval-expression-print-maximum-character').\n\nRuns the hook `eval-expression-minibuffer-setup-hook' on entering the\nminibuffer.\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive #f(compiled-function () #<bytecode -0x456f37b6488d2cd>)) #<bytecode 0x1eb79da7fc1b0212>) ((let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127))
eval-expression((let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127)
funcall-interactively(eval-expression (let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127)
#<subr call-interactively>(eval-expression nil nil)
apply(#<subr call-interactively> eval-expression (nil nil))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> eval-expression nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (eval-expression nil nil))
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
10:26:36.937674 tramp-handle-insert-file-contents (1) # File error: Directory /ssh:USER@HOST#22222:/ssh:USER@HOST#22222:/tmp not accessible
10:26:36.999310 tramp-handle-insert-file-contents (10) #
backtrace()
tramp-error((tramp-file-name "ssh" "USER" nil "HOST" "22222" "/PATH" nil) file-missing "/ssh:USER@HOST#22222:/PATH")
tramp-handle-insert-file-contents("/ssh:USER@HOST#22222:/PATH" nil 1 10 nil)
apply(tramp-handle-insert-file-contents ("/ssh:USER@HOST#22222:/PATH" nil 1 10 nil))
tramp-sh-file-name-handler(insert-file-contents "/ssh:USER@HOST#22222:/PATH" nil 1 10 nil)
apply(tramp-sh-file-name-handler insert-file-contents ("/ssh:USER@HOST#22222:/PATH" nil 1 10 nil))
tramp-file-name-handler(insert-file-contents "/ssh:USER@HOST#22222:/PATH" nil 1 10 nil)
insert-file-contents("/ssh:USER@HOST#22222:/PATH" nil 1 10)
(progn (insert-file-contents file nil 1 10))
(unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(let ((file buffer-file-name)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
eval((let ((file buffer-file-name)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file nil 1 10)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) t)
#f(compiled-function (exp &optional insert-value no-truncate char-print-limit) "Evaluate EXP and print value in the echo area.\nWhen called interactively, read an Emacs Lisp expression and\nevaluate it. Value is also consed on to front of the variable\n`values'. Optional argument INSERT-VALUE non-nil (interactively,\nwith a non `-' prefix argument) means insert the result into the\ncurrent buffer instead of printing it in the echo area.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. When NO-TRUNCATE is\nnon-nil (interactively, with a prefix argument of zero), however,\nthere is no such truncation.\n\nIf the resulting value is an integer, and CHAR-PRINT-LIMIT is\nnon-nil (interactively, unless given a non-zero prefix argument)\nit will be printed in several additional formats (octal,\nhexadecimal, and character). The character format is used only\nif the value is below CHAR-PRINT-LIMIT (interactively, if the\nprefix argument is -1 or the value doesn't exceed\n`eval-expression-print-maximum-character').\n\nRuns the hook `eval-expression-minibuffer-setup-hook' on entering the\nminibuffer.\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive #f(compiled-function () #<bytecode -0x456f37b6488d2cd>)) #<bytecode 0x1eb79da7fc1b0212>)((let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127)
apply(#f(compiled-function (exp &optional insert-value no-truncate char-print-limit) "Evaluate EXP and print value in the echo area.\nWhen called interactively, read an Emacs Lisp expression and\nevaluate it. Value is also consed on to front of the variable\n`values'. Optional argument INSERT-VALUE non-nil (interactively,\nwith a non `-' prefix argument) means insert the result into the\ncurrent buffer instead of printing it in the echo area.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. When NO-TRUNCATE is\nnon-nil (interactively, with a prefix argument of zero), however,\nthere is no such truncation.\n\nIf the resulting value is an integer, and CHAR-PRINT-LIMIT is\nnon-nil (interactively, unless given a non-zero prefix argument)\nit will be printed in several additional formats (octal,\nhexadecimal, and character). The character format is used only\nif the value is below CHAR-PRINT-LIMIT (interactively, if the\nprefix argument is -1 or the value doesn't exceed\n`eval-expression-print-maximum-character').\n\nRuns the hook `eval-expression-minibuffer-setup-hook' on entering the\nminibuffer.\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive #f(compiled-function () #<bytecode -0x456f37b6488d2cd>)) #<bytecode 0x1eb79da7fc1b0212>) ((let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127))
eval-expression((let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127)
funcall-interactively(eval-expression (let ((file buffer-file-name)) (with-temp-buffer (insert-file-contents file nil 1 10))) nil nil 127)
#<subr call-interactively>(eval-expression nil nil)
apply(#<subr call-interactively> eval-expression (nil nil))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> eval-expression nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (eval-expression nil nil))
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
10:26:36.999890 tramp-handle-insert-file-contents (1) # File is missing: /ssh:USER@HOST#22222:/PATH
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-30 8:49 ` Paul Pogonyshev
@ 2022-09-30 18:39 ` Michael Albinus
2022-09-30 18:52 ` Paul Pogonyshev
0 siblings, 1 reply; 20+ messages in thread
From: Michael Albinus @ 2022-09-30 18:39 UTC (permalink / raw)
To: Paul Pogonyshev; +Cc: Lars Ingebrigtsen, 57800
Paul Pogonyshev <pogonyshev@gmail.com> writes:
Hi Paul,
> Happened again. See attached `BACKTRACE' and `TRAMP-LOG' generated
> after evalling `(setf tramp-verbose 10)'.
I guess you mean setq.
> Note this suspicious entry in the log:
> 10:26:36.864700 tramp-get-remote-tmpdir (1) # File error: Directory
> /ssh:USER@HOST#22222:/ssh:USER@HOST#22222:/tmp not accessible
Yes. And the debug buffer shows us
--8<---------------cut here---------------start------------->8---
> ;; Emacs: 29.0.50 Tramp: 2.6.0-pre -*- mode: outline; coding: utf-8; -*-
> ;; Location: /usr/local/share/emacs/29.0.50/lisp/net/tramp.elc Git: master/5fd8e1cc49d2ebd59219ddf3a691949a22b601f3
> 10:26:36.638086 tramp-handle-insert-file-contents (3) # Inserting ‘/ssh:USER@HOST#22222:/PATH’...
> 10:26:36.639033 tramp-get-connection-property (7) # remote-tmpdir undef; cache used: nil
> 10:26:36.639200 tramp-get-connection-property (7) # tmpdir /ssh:USER@HOST#22222:/tmp; cache used: t
> 10:26:36.639335 tramp-get-connection-property (7) # tmpdir /ssh:USER@HOST#22222:/tmp; cache used: t
--8<---------------cut here---------------end--------------->8---
The value of of "tmpdir" is completely wrong, it must be something like
"/tmp" or so. Tramp doesn't set this connection property anymore; it
takes it from tramp-methods if declared there.
It was set like this prior commit 9ea40b3ddfb of 2022-08-15, likely your
cache did offer this old value. Could you pls apply "M-x
tramp-cleanup-all-connections" in order to clean up the connection
cache, and retry your test?
Best regards, Michael.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-30 18:39 ` Michael Albinus
@ 2022-09-30 18:52 ` Paul Pogonyshev
2022-09-30 19:11 ` Michael Albinus
0 siblings, 1 reply; 20+ messages in thread
From: Paul Pogonyshev @ 2022-09-30 18:52 UTC (permalink / raw)
To: Michael Albinus; +Cc: Lars Ingebrigtsen, 57800
[-- Attachment #1: Type: text/plain, Size: 2095 bytes --]
Yes, that fixes the problem. Does that mean I somehow have a mixup of
sources from different commits (not sure how) or that the cache is
persistent and can survive long times? Note that I also run Emacs 28 from
time to time. Could it be that 29 reuses cache created by 28 that contains
no-longer-compatible values?
Paul
On Fri, 30 Sept 2022 at 20:39, Michael Albinus <michael.albinus@gmx.de>
wrote:
> Paul Pogonyshev <pogonyshev@gmail.com> writes:
>
> Hi Paul,
>
> > Happened again. See attached `BACKTRACE' and `TRAMP-LOG' generated
> > after evalling `(setf tramp-verbose 10)'.
>
> I guess you mean setq.
>
> > Note this suspicious entry in the log:
> > 10:26:36.864700 tramp-get-remote-tmpdir (1) # File error: Directory
> > /ssh:USER@HOST#22222:/ssh:USER@HOST#22222:/tmp not accessible
>
> Yes. And the debug buffer shows us
>
> --8<---------------cut here---------------start------------->8---
> > ;; Emacs: 29.0.50 Tramp: 2.6.0-pre -*- mode: outline; coding: utf-8; -*-
> > ;; Location: /usr/local/share/emacs/29.0.50/lisp/net/tramp.elc Git:
> master/5fd8e1cc49d2ebd59219ddf3a691949a22b601f3
> > 10:26:36.638086 tramp-handle-insert-file-contents (3) # Inserting
> ‘/ssh:USER@HOST#22222:/PATH’...
> > 10:26:36.639033 tramp-get-connection-property (7) # remote-tmpdir undef;
> cache used: nil
> > 10:26:36.639200 tramp-get-connection-property (7) # tmpdir /ssh:USER@HOST#22222:/tmp;
> cache used: t
> > 10:26:36.639335 tramp-get-connection-property (7) # tmpdir /ssh:USER@HOST#22222:/tmp;
> cache used: t
> --8<---------------cut here---------------end--------------->8---
>
> The value of of "tmpdir" is completely wrong, it must be something like
> "/tmp" or so. Tramp doesn't set this connection property anymore; it
> takes it from tramp-methods if declared there.
>
> It was set like this prior commit 9ea40b3ddfb of 2022-08-15, likely your
> cache did offer this old value. Could you pls apply "M-x
> tramp-cleanup-all-connections" in order to clean up the connection
> cache, and retry your test?
>
> Best regards, Michael.
>
[-- Attachment #2: Type: text/html, Size: 2604 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-30 18:52 ` Paul Pogonyshev
@ 2022-09-30 19:11 ` Michael Albinus
2022-09-30 19:58 ` Michael Albinus
0 siblings, 1 reply; 20+ messages in thread
From: Michael Albinus @ 2022-09-30 19:11 UTC (permalink / raw)
To: Paul Pogonyshev; +Cc: Lars Ingebrigtsen, 57800
Paul Pogonyshev <pogonyshev@gmail.com> writes:
Hi Paul,
> Yes, that fixes the problem. Does that mean I somehow have a mixup of
> sources from different commits (not sure how) or that the cache is
> persistent and can survive long times? Note that I also run Emacs 28
> from time to time. Could it be that 29 reuses cache created by 28 that
> contains no-longer-compatible values?
Could be the latter, yes. "tmpdir" is the only cache value I know of
which has changed its meaning(*). Perhaps I shall add a test that it
ignores cached "tmpdir" values if they are remote. But hmm, it has
changed its meaning also in Tramp 2.5.3.2, which is distributed via GNU
ELPA.
(*): More precisely, there were two different meanings in different
places of Tramp. The fix was needed to fix that bug.
> Paul
Best regards, Michael.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-30 19:11 ` Michael Albinus
@ 2022-09-30 19:58 ` Michael Albinus
2022-09-30 20:48 ` Paul Pogonyshev
0 siblings, 1 reply; 20+ messages in thread
From: Michael Albinus @ 2022-09-30 19:58 UTC (permalink / raw)
To: Paul Pogonyshev; +Cc: 57800-done, Lars Ingebrigtsen
Version: 29.1
Michael Albinus <michael.albinus@gmx.de> writes:
Hi Paul,
>> Yes, that fixes the problem. Does that mean I somehow have a mixup of
>> sources from different commits (not sure how) or that the cache is
>> persistent and can survive long times? Note that I also run Emacs 28
>> from time to time. Could it be that 29 reuses cache created by 28 that
>> contains no-longer-compatible values?
>
> Could be the latter, yes. "tmpdir" is the only cache value I know of
> which has changed its meaning(*). Perhaps I shall add a test that it
> ignores cached "tmpdir" values if they are remote. But hmm, it has
> changed its meaning also in Tramp 2.5.3.2, which is distributed via GNU
> ELPA.
Pushed this change to the emacs-28 branch, it will appear in the master
branch after merge.
It will also be contained in the upcoming Tramp 2.5.3.4 on GNU
ELPA. Closing the bug.
>> Paul
Best regards, Michael.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-30 19:58 ` Michael Albinus
@ 2022-09-30 20:48 ` Paul Pogonyshev
2022-10-01 15:18 ` Michael Albinus
0 siblings, 1 reply; 20+ messages in thread
From: Paul Pogonyshev @ 2022-09-30 20:48 UTC (permalink / raw)
To: Michael Albinus; +Cc: 57800-done, Lars Ingebrigtsen
[-- Attachment #1: Type: text/plain, Size: 1500 bytes --]
Thanks. I suggest also adding a simple "version" to the cache. Whenever you
make an incompatible change in the future, bump this version. And also make
Tramp automatically discard all cached values when they come from a
different (earlier or even a later) version. Otherwise something like this
will certainly happen again sooner or later and will cost both the person
bumping into it and you or whoever responds to the bugreport a lot of time
again.
Paul
On Fri, 30 Sept 2022 at 21:58, Michael Albinus <michael.albinus@gmx.de>
wrote:
> Version: 29.1
>
> Michael Albinus <michael.albinus@gmx.de> writes:
>
> Hi Paul,
>
> >> Yes, that fixes the problem. Does that mean I somehow have a mixup of
> >> sources from different commits (not sure how) or that the cache is
> >> persistent and can survive long times? Note that I also run Emacs 28
> >> from time to time. Could it be that 29 reuses cache created by 28 that
> >> contains no-longer-compatible values?
> >
> > Could be the latter, yes. "tmpdir" is the only cache value I know of
> > which has changed its meaning(*). Perhaps I shall add a test that it
> > ignores cached "tmpdir" values if they are remote. But hmm, it has
> > changed its meaning also in Tramp 2.5.3.2, which is distributed via GNU
> > ELPA.
>
> Pushed this change to the emacs-28 branch, it will appear in the master
> branch after merge.
>
> It will also be contained in the upcoming Tramp 2.5.3.4 on GNU
> ELPA. Closing the bug.
>
> >> Paul
>
> Best regards, Michael.
>
[-- Attachment #2: Type: text/html, Size: 2053 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-09-30 20:48 ` Paul Pogonyshev
@ 2022-10-01 15:18 ` Michael Albinus
2022-10-01 16:16 ` Paul Pogonyshev
0 siblings, 1 reply; 20+ messages in thread
From: Michael Albinus @ 2022-10-01 15:18 UTC (permalink / raw)
To: Paul Pogonyshev; +Cc: Lars Ingebrigtsen, 57800
Paul Pogonyshev <pogonyshev@gmail.com> writes:
Hi Paul,
> Thanks. I suggest also adding a simple "version" to the cache.
> Whenever you make an incompatible change in the future, bump this
> version. And also make Tramp automatically discard all cached values
> when they come from a different (earlier or even a later) version.
> Otherwise something like this will certainly happen again sooner or
> later and will cost both the person bumping into it and you or whoever
> responds to the bugreport a lot of time again.
That's a good idea, thanks! I've pushed a respective change to master.
However, the cache doesn't keep its own version, it uses just the Tramp
version for check. Using an own cache version is error-prone, there are
good chances to forget to change it when needed. At least *I* would
forget it always, as far as I know me.
> Paul
Best regards, Michael.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#57800: TRAMP insert-file-contents now fails for regions
2022-10-01 15:18 ` Michael Albinus
@ 2022-10-01 16:16 ` Paul Pogonyshev
0 siblings, 0 replies; 20+ messages in thread
From: Paul Pogonyshev @ 2022-10-01 16:16 UTC (permalink / raw)
To: Michael Albinus; +Cc: Lars Ingebrigtsen, 57800
[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]
> However, the cache doesn't keep its own version, it uses just the Tramp
> version for check.
Yeah, as long as it is not expensive, it won't hurt to throw it away
whenever Tramp version changes, even if cache format stays the same,
just to be sure.
Paul
On Sat, 1 Oct 2022 at 17:19, Michael Albinus <michael.albinus@gmx.de> wrote:
> Paul Pogonyshev <pogonyshev@gmail.com> writes:
>
> Hi Paul,
>
> > Thanks. I suggest also adding a simple "version" to the cache.
> > Whenever you make an incompatible change in the future, bump this
> > version. And also make Tramp automatically discard all cached values
> > when they come from a different (earlier or even a later) version.
> > Otherwise something like this will certainly happen again sooner or
> > later and will cost both the person bumping into it and you or whoever
> > responds to the bugreport a lot of time again.
>
> That's a good idea, thanks! I've pushed a respective change to master.
>
> However, the cache doesn't keep its own version, it uses just the Tramp
> version for check. Using an own cache version is error-prone, there are
> good chances to forget to change it when needed. At least *I* would
> forget it always, as far as I know me.
>
> > Paul
>
> Best regards, Michael.
>
[-- Attachment #2: Type: text/html, Size: 1807 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2022-10-01 16:16 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-14 12:11 bug#57800: TRAMP insert-file-contents now fails for regions Paul Pogonyshev
2022-09-14 18:08 ` Lars Ingebrigtsen
2022-09-14 18:18 ` Paul Pogonyshev
2022-09-14 18:23 ` Lars Ingebrigtsen
2022-09-14 18:33 ` Paul Pogonyshev
2022-09-15 10:30 ` Michael Albinus
2022-09-16 9:37 ` Lars Ingebrigtsen
2022-09-29 9:24 ` Paul Pogonyshev
2022-09-29 10:43 ` Lars Ingebrigtsen
2022-09-29 11:26 ` Paul Pogonyshev
2022-09-29 11:27 ` Paul Pogonyshev
2022-09-29 17:39 ` Michael Albinus
2022-09-30 8:49 ` Paul Pogonyshev
2022-09-30 18:39 ` Michael Albinus
2022-09-30 18:52 ` Paul Pogonyshev
2022-09-30 19:11 ` Michael Albinus
2022-09-30 19:58 ` Michael Albinus
2022-09-30 20:48 ` Paul Pogonyshev
2022-10-01 15:18 ` Michael Albinus
2022-10-01 16:16 ` Paul Pogonyshev
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.