unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: James Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Dima Kogan <dima@secretsauce.net>,
	49954@debbugs.gnu.org, 60534@debbugs.gnu.org
Subject: bug#49954: bug#60534: 28.2; Forbidden reentrant call of Tramp
Date: Tue, 17 Dec 2024 04:05:22 +0530	[thread overview]
Message-ID: <86frmnb6j9.fsf_-_@gmx.net> (raw)
In-Reply-To: <878s03s3t1.fsf@gmx.de> (Michael Albinus's message of "Sat, 11 Sep 2021 14:19:06 +0200")

Michael Albinus wrote:

> In order to understand the problem, let's assume the following scenario:
>
> - You have connected to a remote host, say "/ssh:host:". Tramp uses
>   internally the process *tramp/ssh host* for communicating with that
>   process.
>
> - You have also started another asynchronous process to that remote
>   host.
>
> - Now, while normal use of Emacs, the function (file-attributes
>   "/ssh:host:/path/to/file") is called. Tramp sends a command to the
>   process *tramp/ssh host*, like "stat /path/to/file".
>
> - While Tramp waits for the answer of the "stat ..." command, your other
>   process has finished. It might have a process sentinel, which is
>   called exactly at this time, because Tramp is in a loop
>   (accept-process-output ...).
>
> - This process filter might trigger another file operation, like
>   (delete-file "/ssh:host:/tmp/tmpfile"). This would require to send
>   another command to the *tramp/ssh host* process like "rm -f /tmp/tmpfile".
>
> - Since the first command, "stat ...", hasn't been finished, this would
>   result in inconsistencies. Tramp detects this situation, and raises
>   the "Forbidden reentrant call of Tramp" error.
>
> Not so easy to solve. Ideally, remote file name functions initiated in
> process filters, process sentinels, timers and alike shall wait, until
> the currently executed remote command has finished. Don't know how to
> achieve this.

(This may be an ignorant question, but) if that's so, is it possible to
open a separate connection (perhaps with a ControlPath suffix, and
ControlPersist-ed) in the place of the "Forbidden reentrant call"?

Regards,
James





      parent reply	other threads:[~2024-12-16 22:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09  9:08 bug#49954: 28.0.50; TRAMP: cannot kill child processes: "Forbidden reentrant call of Tramp" Dima Kogan
2021-08-09 12:33 ` Michael Albinus
2021-08-10  4:26   ` Dima Kogan
2021-08-10 13:52     ` Michael Albinus
2021-09-11  8:32       ` Dima Kogan
2021-09-11 12:19         ` Michael Albinus
2021-09-15  0:39           ` Dima Kogan
2021-09-15 19:25             ` Dima Kogan
2021-09-16 15:45               ` Michael Albinus
2021-09-16 15:42             ` Michael Albinus
2021-09-16 17:17               ` Dima Kogan
2021-09-16 17:36                 ` Michael Albinus
2021-09-18 20:18                   ` Dima Kogan
2021-09-18 20:50                     ` Michael Albinus
2024-12-16 22:35           ` James Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]

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=86frmnb6j9.fsf_-_@gmx.net \
    --to=bug-gnu-emacs@gnu.org \
    --cc=49954@debbugs.gnu.org \
    --cc=60534@debbugs.gnu.org \
    --cc=dima@secretsauce.net \
    --cc=jimjoe@gmx.net \
    --cc=michael.albinus@gmx.de \
    /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).