unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Daniel Pittman <slippycheeze@google.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: TRAMP VC optimization fails: non-TRAMP filenames handled incorrectly in async operations.
Date: Fri, 29 Mar 2019 18:03:55 +0100	[thread overview]
Message-ID: <87bm1tr4sk.fsf@gmx.de> (raw)
In-Reply-To: <CAC45yQus1vNs0MmxgXOYANNSuddMSuyxp8WQ2TOSBxbGpQtksA@mail.gmail.com> (Daniel Pittman's message of "Fri, 29 Mar 2019 12:36:21 +0000")

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

Daniel Pittman <slippycheeze@google.com> writes:

Hi Daniel,

>     Since I cannot reproduce the problem (yet), do you have a
>     backtrace?
>
> Sure, please see it follow.  I have censored the content of a small
> number of strings, but this is replacing a standard ASCII letter with
> 'X' so should have no semantic effect.  Sorry to have to do that.
> Fair warning, it is ... long.

Thanks! Could you pls send it next time as attachment? As text in the
message body, line breaks are set randomly, which makes it hard to read.

> The most interesting part is at the very start, where my `revert-file
> ` operation on a remote file triggers a `vc-refresh-state`, which ends
> up causing `tramp-send-string` to run `process-send-string`, and then
> a timer fires that drives the "deferred" third party library [1] to
> move on to running a background command, using the timeout(1) and p4
> (1) binaries to grab some state information.

Yes. Tramp fights indeed with timers, and so I have disabled timers in
tramp-accept-process-output already. Maybe we shall do the same in
tramp-send-string? Would the following patch help?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1705 bytes --]

*** /tmp/ediffDh3DJa	2019-03-29 18:01:12.059246938 +0100
--- /home/albinus/src/tramp/lisp/tramp.el	2019-03-29 17:58:44.756196926 +0100
***************
*** 4210,4216 ****
  the remote host use line-endings as defined in the variable
  `tramp-rsh-end-of-line'.  The communication buffer is erased before sending."
    (let* ((p (tramp-get-connection-process vec))
! 	 (chunksize (tramp-get-connection-property p "chunksize" nil)))
      (unless p
        (tramp-error
         vec 'file-error "Can't send string to remote host -- not logged in"))
--- 4210,4219 ----
  the remote host use line-endings as defined in the variable
  `tramp-rsh-end-of-line'.  The communication buffer is erased before sending."
    (let* ((p (tramp-get-connection-process vec))
! 	 (chunksize (tramp-get-connection-property p "chunksize" nil))
! 	 ;; We do not want to run timers.
!          (stimers (with-timeout-suspend))
! 	 timer-list timer-idle-list)
      (unless p
        (tramp-error
         vec 'file-error "Can't send string to remote host -- not logged in"))
***************
*** 4238,4244 ****
  	      (process-send-string
  	       p (substring string pos (min (+ pos chunksize) end)))
  	      (setq pos (+ pos chunksize))))
! 	(process-send-string p string)))))

  (defun tramp-get-inode (vec)
    "Returns the virtual inode number.
--- 4241,4249 ----
  	      (process-send-string
  	       p (substring string pos (min (+ pos chunksize) end)))
  	      (setq pos (+ pos chunksize))))
! 	(process-send-string p string))
!       ;; Reenable the timers.
!       (with-timeout-unsuspend stimers))))

  (defun tramp-get-inode (vec)
    "Returns the virtual inode number.

[-- Attachment #3: Type: text/plain, Size: 24 bytes --]


Best regards, Michael.

  reply	other threads:[~2019-03-29 17:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27 15:38 TRAMP VC optimization fails: non-TRAMP filenames handled incorrectly in async operations Daniel Pittman
2019-03-27 15:55 ` Michael Albinus
2019-03-27 16:22   ` Daniel Pittman
2019-03-27 17:49     ` Michael Albinus
2019-03-29 12:36       ` Daniel Pittman
2019-03-29 17:03         ` Michael Albinus [this message]
2019-04-02  9:34           ` Daniel Pittman
2019-04-02 13:18             ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bm1tr4sk.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=slippycheeze@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).