GNU logs - #49954, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#49954: 28.0.50; TRAMP: cannot kill child processes: "Forbidden reentrant call of Tramp"
Resent-From: Dima Kogan <dima@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 09 Aug 2021 09:09:01 +0000
Resent-Message-ID: <handler.49954.B.16285000932392 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 49954
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 49954 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.16285000932392
          (code B ref -1); Mon, 09 Aug 2021 09:09:01 +0000
Received: (at submit) by debbugs.gnu.org; 9 Aug 2021 09:08:13 +0000
Received: from localhost ([127.0.0.1]:55728 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mD1GX-0000cV-28
	for submit <at> debbugs.gnu.org; Mon, 09 Aug 2021 05:08:13 -0400
Received: from lists.gnu.org ([209.51.188.17]:33808)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dima@HIDDEN>) id 1mD1GT-0000cK-Dq
 for submit <at> debbugs.gnu.org; Mon, 09 Aug 2021 05:08:11 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36528)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dima@HIDDEN>)
 id 1mD1GT-00041s-1Z
 for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2021 05:08:09 -0400
Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:40589)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dima@HIDDEN>)
 id 1mD1GQ-0006Bs-FD
 for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2021 05:08:08 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.west.internal (Postfix) with ESMTP id EB26D32004CE
 for <bug-gnu-emacs@HIDDEN>; Mon,  9 Aug 2021 05:08:02 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Mon, 09 Aug 2021 05:08:03 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net;
 h=from:to:subject:date:message-id:mime-version:content-type; s=
 fm1; bh=yHifl772bQoXdaZ8A5RxZ4iZhRqKC7tzt8mI7kh775M=; b=Hj254fH3
 W8O6MkEaZFu1UFBj3NDxYJuZheesWd9p/cROzwc9L8P/CQWjInurP5Vm1fxxU8Wc
 wpAUUIM7isnljGIUn/rUcl1pQwK1U4NfBLEQ/vONJhk9HcLCbfY1y5GLykcXm+iI
 NNczne8XKo/nThP2bHkcK9gQX0o8XtWVDET2M8lVVP2P1VBTZEEbLAtsmgB+WLsG
 6iPDyiOsYCmE7mtsA9A3x66eREyKmvMms+9zP3u++LXHBCCO5ohkl/zCQ8FNn2Vs
 BkO415Klyf0v5L8HopP7hCmH3js8hUDXeXMvbTX/SlkwHioeAnbNMBgTkayluHJ5
 CXH0Kzb4Rwh4Ng==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm3; bh=yHifl772bQoXdaZ8A5RxZ4iZhRqKC
 7tzt8mI7kh775M=; b=A3V3CqRIXP+AZpu6NO27AP8MSDMS3HhykzliOKtiAmTSR
 sRU1TDmy0TsTzCXedu/WbhMEMCJaz0N7cZNpDI/PM3G7GnCWRewppFdEWXyKptSs
 ARewOXoNmtwJ04A5Cde4a6cbdnJZQD2tSKra9niexNmGvQ57V8Z3f50ZByj/pG20
 zN8fawbwCpxmLw7MkSUe9wv8lIne4LdmmnRcRPzrUJlj5Fjijv+FRghS/haPG9mX
 GUegtXJpKABaSQolcIu+kP/UaxyNm70p4i9q/cEzjG0QYknMzHKS2Rq98qxBffj0
 0Y6jO3GO1MmBn0B7eUk/P28bWPsNcSy+TouHl1fFA==
X-ME-Sender: <xms:cvAQYbHqRNKFBxjuXLInfmHCpGcCxabj8_BD4O5y_jFITF9RhaqJ-g>
 <xme:cvAQYYUPVZMILgeHWlHrerlbRRJAl9_HeVK4urmZBGSDYGDqr7tNKH6k3excRAS1E
 cLW5JRgRGk8j3sn>
X-ME-Received: <xmr:cvAQYdJxJcPG4KsSkWKjQMuz2YhSFUORxnm17dWYfyUsZjJxYPQLcPOFBHyVIr8SphIaQwBygdpqKCjO1ZZr8JNwq-m4dHaKdY37JGfBut3X-WhKPEM>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeejgdduvdcutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfggtgesthdtredttddttd
 enucfhrhhomhepffhimhgrucfmohhgrghnuceoughimhgrsehsvggtrhgvthhsrghutggv
 rdhnvghtqeenucggtffrrghtthgvrhhnpeffvdffudfhkeffhfeifefhffdvtdfgfeejve
 euvdefudejjeduveeftdeggeeuvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr
 mhepmhgrihhlfhhrohhmpeguihhmrgesshgvtghrvghtshgruhgtvgdrnhgvth
X-ME-Proxy: <xmx:cvAQYZGOrwl1EAD2v1q-PWywHrzC7KYjJg7tbL5ohvKvzRbK2yptaw>
 <xmx:cvAQYRW-xUEM8p-Mw--kXazFq4vjbXWZKscy6enHu0YvqBVTc_ilkw>
 <xmx:cvAQYUNpO5zMO48MvHeJ1sBr6sFGlLA7YMy4c4-bYgoScu5MC_MUjg>
 <xmx:cvAQYQDOlxt0Jgr7a_kTbmvBW4eSPz4xgdrYmjS66GQYSlSeSJXwBw>
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-gnu-emacs@HIDDEN>; Mon, 9 Aug 2021 05:08:02 -0400 (EDT)
From: Dima Kogan <dima@HIDDEN>
Date: Mon, 09 Aug 2021 02:08:00 -0700
Message-ID: <875ywf9ea7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=64.147.123.21; envelope-from=dima@HIDDEN;
 helo=wout5-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

Hi. I see this problem often in everyday use of emacs, but every time I
try to construct a reliable reproducing recipe, it always works ok, so
some of this report is a request for debugging help.

I've seen this sort of bug for years, so probably it exists in the
latest emacs. Today I'm seeing it in a build from a few weeks ago:
553ad9c9e85 built on 20210716. I don't know how to reproduce in the
latest emacs. In the session I have running (from the 20210716 build) I
have a shell buffer that shows the problem 100% of the time. New shell
buffers do not show this problem.

A recipe that should work:

1. emacs
   Run emacs. Possibly my config is triggering it. I don't know

2. C-x C-f /ssh:server:
   Open a remote TRAMP connection

3. M-x shell
   Open a remote shell

4. cat
   Run a "cat" command in the remote shell

5. C-c C-c
   kill the "cat"

In fresh emacs sessions and fresh shell buffers this works fine: the
"cat" process is killed and we get back to the prompt. Something happens
with older shell buffers where the child process is NOT killed, and
emacs complains with "Forbidden reentrant call of Tramp"

I just tried to (setq tramp-verbose 10) to get a debug log of the
failure. It says this:

  ;; Emacs: 28.0.50 Tramp: 2.5.1 -*- mode: outline; coding: utf-8; -*-
  ;; Location: /usr/share/emacs/28.0.50/lisp/net/tramp.el.gz Git: /
  01:49:39.391745 tramp-interrupt-process (5) # Interrupt process shell<6> with pid 3705628
  01:49:39.391864 tramp-get-connection-property (7) # null-device /dev/null; cache used: t
  01:49:39.391946 tramp-get-connection-property (7) # process-name nil; cache used: nil
  01:49:39.392019 tramp-get-connection-property (7) # process-name nil; cache used: nil
  01:49:39.392089 tramp-get-connection-property (7) # process-buffer nil; cache used: nil
  01:49:39.392180 tramp-get-connection-property (7) # last-cmd-time (24848 60388 520023 896000); cache used: t
  01:49:39.392262 tramp-get-connection-property (7) # process-name nil; cache used: nil
  01:49:39.392325 tramp-get-connection-property (7) # remote-echo nil; cache used: nil
  01:49:39.392385 tramp-send-command (6) # echo are you awake
  01:49:39.392447 tramp-get-connection-property (7) # process-name nil; cache used: nil
  01:49:39.392509 tramp-get-connection-property (7) # chunksize 0; cache used: t
  01:49:39.392573 tramp-set-connection-property (7) # last-cmd-time (24848 60451 392543 712000)
  01:49:39.392637 tramp-send-string (10) # echo are you awake
  01:49:39.392698 tramp-get-connection-property (7) # process-buffer nil; cache used: nil
  01:49:39.392775 tramp-get-connection-property (7) # locked nil; cache used: nil
  01:49:39.392828 tramp-set-connection-property (7) # locked t
  01:49:39.392912 tramp-flush-connection-property (7) # locked
  01:49:39.392981 tramp-get-connection-property (7) # check-remote-echo nil; cache used: nil
  01:49:39.393036 tramp-get-connection-property (7) # check-remote-echo nil; cache used: nil
  01:49:39.393120 tramp-get-connection-property (7) # locked nil; cache used: nil
  01:49:39.393173 tramp-set-connection-property (7) # locked t
  01:49:39.441305 tramp-accept-process-output (10) # *tramp/ssh fatty* nil run t
  are you awake
  ///66c246702753a7fa497f74164e69b140#$
  01:49:39.441619 tramp-flush-connection-property (7) # locked
  01:49:39.441783 tramp-get-connection-property (7) # check-remote-echo nil; cache used: nil
  01:49:39.441931 tramp-get-connection-property (7) # check-remote-echo nil; cache used: nil
  01:49:39.442103 tramp-wait-for-regexp (6) # 
  are you awake
  ///66c246702753a7fa497f74164e69b140#$
  01:49:39.442387 tramp-get-connection-property (7) # process-name nil; cache used: nil
  01:49:39.442556 tramp-get-connection-property (7) # remote-echo nil; cache used: nil
  01:49:39.442710 tramp-send-command (6) # (\kill -2 -3705628 || \kill -2 3705628) 2>/dev/null
  01:49:39.442872 tramp-get-connection-property (7) # process-name nil; cache used: nil
  01:49:39.443034 tramp-get-connection-property (7) # chunksize 0; cache used: t
  01:49:39.443204 tramp-set-connection-property (7) # last-cmd-time (24848 60451 443130 172000)
  01:49:39.443376 tramp-send-string (10) # (\kill -2 -3705628 || \kill -2 3705628) 2>/dev/null
  01:49:39.443589 tramp-get-connection-property (7) # process-buffer nil; cache used: nil
  01:49:39.443792 tramp-get-connection-property (7) # locked nil; cache used: nil
  01:49:39.443936 tramp-set-connection-property (7) # locked t
  01:49:39.444124 tramp-flush-connection-property (7) # locked
  01:49:39.444293 tramp-get-connection-property (7) # check-remote-echo nil; cache used: nil
  01:49:39.444433 tramp-get-connection-property (7) # check-remote-echo nil; cache used: nil
  01:49:39.444579 tramp-get-connection-property (7) # locked nil; cache used: nil
  01:49:39.444719 tramp-set-connection-property (7) # locked t
  01:49:39.493255 tramp-accept-process-output (10) # *tramp/ssh fatty* nil run t
  ///66c246702753a7fa497f74164e69b140#$
  01:49:39.493535 tramp-flush-connection-property (7) # locked
  01:49:39.493687 tramp-get-connection-property (7) # check-remote-echo nil; cache used: nil
  01:49:39.493835 tramp-get-connection-property (7) # check-remote-echo nil; cache used: nil
  01:49:39.494001 tramp-wait-for-regexp (6) # 
  ///66c246702753a7fa497f74164e69b140#$
  01:49:39.494263 tramp-get-connection-property (7) # locked t; cache used: t
  01:49:39.512596 tramp-accept-process-output (10) # 
    backtrace()
    tramp-error(#<process shell<6>> remote-file-error "Forbidden reentrant call of Tramp")
    tramp-accept-process-output(#<process shell<6>> 0)
    tramp-interrupt-process(nil t)
    comint-interrupt-subjob()
    funcall-interactively(comint-interrupt-subjob)
    command-execute(comint-interrupt-subjob)
  01:49:41.733242 tramp-accept-process-output


If I open a fresh shell in the same emacs session, it works OK. That
debug log is similar, except the last tramp-get-connection-property line says:

  01:48:36.571873 tramp-get-connection-property (7) # locked nil; cache used: nil

I don't know how it's unlocked. Debugging suggestions? Should I just add
more diagnostics in every lock/unlock path? Do we think this may be
fixed in the latest emacs?

Thanks!




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Dima Kogan <dima@HIDDEN>
Subject: bug#49954: Acknowledgement (28.0.50; TRAMP: cannot kill child
 processes: "Forbidden reentrant call of Tramp")
Message-ID: <handler.49954.B.16285000932392.ack <at> debbugs.gnu.org>
References: <875ywf9ea7.fsf@HIDDEN>
X-Gnu-PR-Message: ack 49954
X-Gnu-PR-Package: emacs
Reply-To: 49954 <at> debbugs.gnu.org
Date: Mon, 09 Aug 2021 09:09:01 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 49954 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
49954: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D49954
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#49954: 28.0.50; TRAMP: cannot kill child processes: "Forbidden reentrant call of Tramp"
Resent-From: Michael Albinus <michael.albinus@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 09 Aug 2021 12:34:01 +0000
Resent-Message-ID: <handler.49954.B49954.162851240316368 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 49954
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dima Kogan <dima@HIDDEN>
Cc: 49954 <at> debbugs.gnu.org
Received: via spool by 49954-submit <at> debbugs.gnu.org id=B49954.162851240316368
          (code B ref 49954); Mon, 09 Aug 2021 12:34:01 +0000
Received: (at 49954) by debbugs.gnu.org; 9 Aug 2021 12:33:23 +0000
Received: from localhost ([127.0.0.1]:56270 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mD4T5-0004Fw-IU
	for submit <at> debbugs.gnu.org; Mon, 09 Aug 2021 08:33:23 -0400
Received: from mout.gmx.net ([212.227.15.19]:47315)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1mD4T2-0004Fh-4v
 for 49954 <at> debbugs.gnu.org; Mon, 09 Aug 2021 08:33:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1628512391;
 bh=0tCg7iGwyFYFKX23kN28POzTfNEXITMZZHmWVzYgSVw=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=ggrR7u3vFe3SZgvsMFDQnzIi53yLvhcTXLZFKULhX9hq6mSK462FblBOL+OKRKABd
 HXRlafsLa72DCZcCR5Ly+3F3H4xLu9qpmQH+UHqEJsTYXVq2nWLmdRNL1jTXkExCX/
 ww8fyIgvLAnK5aPi4gjkrwWpwu7KxJSqmkMtdnKY=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from gandalf.gmx.de ([212.91.238.138]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N2V4P-1nGQhd3clD-013vUJ; Mon, 09
 Aug 2021 14:33:11 +0200
From: Michael Albinus <michael.albinus@HIDDEN>
References: <875ywf9ea7.fsf@HIDDEN>
Date: Mon, 09 Aug 2021 14:33:09 +0200
In-Reply-To: <875ywf9ea7.fsf@HIDDEN> (Dima Kogan's message of "Mon,
 09 Aug 2021 02:08:00 -0700")
Message-ID: <871r72ssqi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:go6eKnGfIyL8iDSO5JlCs8RgCCyeExvK7wyrRpZT8t5zHnVjwg0
 CT+f2wFHYt980CyxD4NplD/ay0qub+GM7Jbn6k1JaYAVsvkWSpundYHB6uFckRO1LPDbiC2
 q1M25/9An9OBAZ3v7RY9/Jt2U9SQRy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MpcWLMu4Oqb8Mv3OgLJHT9MYViw4jvijkIsbNU
 8mdTbDMZAQgrWzrli/I6VNnHL5kTwdQ72Buc30/N5iqcmxPoW4pamaAj2tgc9Uv/PjyDzkVhB
 Bh57sqbCg6twtkHV19vwksaYt070j5ygP0hfLNSQjsjFqg8A1gHxutuaDp9jWOXHXvIAVRwPj
 dsLseJO4H+XLgAPnr0yEdMSOyVZie9qqEGWP6uPQSVvxXQ3E3awraJJAw==
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Dima Kogan <dima@HIDDEN> writes:

> Hi.

Hi Dima,

> I don't know how it's unlocked. Debugging suggestions? Should I just add
> more diagnostics in every lock/unlock path? Do we think this may be
> fixed in the latest emacs?

This error message has been added to Tramp 2.5 in order to get more
diagnostics when the problem happens. It is an indication that a remote
opeation has been started asynchronously, from a timer, a process filter
or sentinel, or other asynchronous invocation (like interrupt process).

I don't believe it has been fixed yet in Emacs master, I haven't done
anything in this area for weeks. I'll try to fix your use case, but it
might take time - these days I'm occupied otherwise. Holiday season.

See the respective entry in Tramp's FAQ (info "(tramp) Frequently Asked Questions")

See also the discussion on the Tramp ML
<https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=forbidden&submit=Search%21&idxname=tramp-devel&max=20&result=normal&sort=score>

> Thanks!

Best regards, Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#49954: 28.0.50; TRAMP: cannot kill child processes: "Forbidden reentrant call of Tramp"
Resent-From: Dima Kogan <dima@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 10 Aug 2021 04:27:02 +0000
Resent-Message-ID: <handler.49954.B49954.162856961028757 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 49954
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Michael Albinus <michael.albinus@HIDDEN>
Cc: 49954 <at> debbugs.gnu.org
Received: via spool by 49954-submit <at> debbugs.gnu.org id=B49954.162856961028757
          (code B ref 49954); Tue, 10 Aug 2021 04:27:02 +0000
Received: (at 49954) by debbugs.gnu.org; 10 Aug 2021 04:26:50 +0000
Received: from localhost ([127.0.0.1]:58184 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mDJLm-0007Tl-G2
	for submit <at> debbugs.gnu.org; Tue, 10 Aug 2021 00:26:50 -0400
Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:58053)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dima@HIDDEN>) id 1mDJLj-0007TV-Ij
 for 49954 <at> debbugs.gnu.org; Tue, 10 Aug 2021 00:26:49 -0400
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46])
 by mailout.west.internal (Postfix) with ESMTP id 5D609320024A;
 Tue, 10 Aug 2021 00:26:41 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute6.internal (MEProxy); Tue, 10 Aug 2021 00:26:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net;
 h=references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type; s=fm1; bh=2LhiVjNekSL/Z9/WePaWCSRAl1
 dC8qdaYRGw5Fts4iI=; b=fVZm4R1LNr6qUybeNeRubvzFT8n4U720JzJuN+Fe20
 NNYErt7b5V2t4obdss6aOWjoQZqy+3E3w3Ibh9iYNkuVO0t2UWtaexhS2y833YAg
 enJvfOxP6OBYcXQ7+mgBW1YOYZBUu1UCtusyZ3RaXtt8a3N9zZoVq76dMSoX3h4h
 qRlvkdnFBtg2rZzP/fW/trraO+kxF7TaT2giftuknB1128quss9JUWFnRc8oMQ0g
 yZPRbCKctB37kjS1aZkfwtAAV700+ued/TR15EWH8dvRfnBQby1nVfF+LiCMx9cq
 mOxibalfAYL5sCmmk+ycak/mHhK6ijyRGA+yLF1+sHTQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=2LhiVj
 NekSL/Z9/WePaWCSRAl1dC8qdaYRGw5Fts4iI=; b=j9DGrd0M9bEo5IK5gT03i9
 SeukhlNm8DX2inQHFV9+e8EQkTqu2V9SUo8qer/iho9uMsYA3wknxpTqJR13pMkw
 ySabIGoR1VCTFOqiA8sIQyz24hHz/jbEK9nJa/CIPfrs+J7R+8yJVDuanCufGGWd
 ixfrWMUqH9EGxGDd8hD9dcqKISU9UQ0LuKcgLvJ/t4d2pr+9ozt1EOaH1qP++P1e
 bP3+JsB53IIKGfWRWZ05oQdhu6mpCx1HW5MDEvVYf17GQPynsGVSEgB+ZsciWQH1
 WkYJgtop+dihpd/8cDeoiCGVQeH26NjyQuAEp1ASrzDwbMr1Pm+NimO5fOf1A56Q
 ==
X-ME-Sender: <xms:AAASYSfcJPtZqTWfcAaJjjYxvH1T_cC3gV7F3xM40arDUEszbnH6gw>
 <xme:AAASYcPiZhos7OIftTL1u_Y8qx-7etd9QOQ4dyscO0wAe0WIUKX9py2sN3fE4UPXC
 6O0ytYXqkfJVSTS>
X-ME-Received: <xmr:AAASYTgXrsqurNh995L51hx9yzYTUS6HX_qRZAZTgguvynz2ahaVp2jj7Ut_lbaHxOl57w0bSiADlV92dH4lEVb3alVTCpFrWsOOzjnRBXz7rDk0Yb0>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeekgdekgecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpehffgfhvffujgffkfggtgesthdtredttdertdenucfhrhhomhepffhimhgrucfm
 ohhgrghnuceoughimhgrsehsvggtrhgvthhsrghutggvrdhnvghtqeenucggtffrrghtth
 gvrhhnpeefveefgfettdefvdetgfekvddtffevhfevleelhfejheelgfduffdtieduueek
 heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeguih
 hmrgesshgvtghrvghtshgruhgtvgdrnhgvth
X-ME-Proxy: <xmx:AAASYf-ef_EkmDlSHKAAXGD5uH4G_lxEvzFW5vyiFAdYgY16sEMxjA>
 <xmx:AAASYeuQh2064EGgUUqOpcrWo_FWujleI6NhPTb4fxtwGuhLL-y1Kw>
 <xmx:AAASYWFydlLogVywCPa3FGYbfZm1eOm8phFDgwF1UokJq217BF_U0A>
 <xmx:AQASYU3jQYzG-uc6ny7QPTBomTwhPeVjgiOn-Mv-Q-MLatn_10QXSw>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 10 Aug 2021 00:26:40 -0400 (EDT)
References: <875ywf9ea7.fsf@HIDDEN> <871r72ssqi.fsf@HIDDEN>
User-agent: mu4e 1.4.15; emacs 28.0.50
From: Dima Kogan <dima@HIDDEN>
In-reply-to: <871r72ssqi.fsf@HIDDEN>
Date: Mon, 09 Aug 2021 21:26:38 -0700
Message-ID: <874kby7wn5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Michael. There's no rush to work on this. I'll reply here for
whenever you get around to looking at it.

I did some debugging, and it appears that the tramp property-caching
mechanism is failing. We exit the (with-tramp-locked-connection ...)
form, but when we try to enter the next (with-tramp-locked-connection
...) form, it looks locked because

(tramp-get-connection-property proc "locked" nil)

is evaluating to t. I instrumented (tramp-get-connection-property), and
I can see that this t comes from the property cache. I can "fix" the bug
by removing the

    (when (and (not (eq cached tramp-cache-undefined))
	       ;; If the key is an auxiliary process object, check
	       ;; whether the process is still alive.
	       (not (and (processp key) (not (process-live-p key)))))
      (setq value cached
	    cache-used t))

form from (tramp-get-connection-property)

Can I get the intent of this form? Are you trying to use this form if
the process is alive, or if the process is dead? My process is very much
alive, so this form is being used. Is this what we want?

If it is what we want, then the cached value of t is the problem. I
haven't looked into why that's happening yet.

Thanks!




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#49954: 28.0.50; TRAMP: cannot kill child processes: "Forbidden reentrant call of Tramp"
Resent-From: Michael Albinus <michael.albinus@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 10 Aug 2021 13:54:02 +0000
Resent-Message-ID: <handler.49954.B49954.162860358327423 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 49954
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dima Kogan <dima@HIDDEN>
Cc: 49954 <at> debbugs.gnu.org
Received: via spool by 49954-submit <at> debbugs.gnu.org id=B49954.162860358327423
          (code B ref 49954); Tue, 10 Aug 2021 13:54:02 +0000
Received: (at 49954) by debbugs.gnu.org; 10 Aug 2021 13:53:03 +0000
Received: from localhost ([127.0.0.1]:58803 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mDSBj-00078E-B6
	for submit <at> debbugs.gnu.org; Tue, 10 Aug 2021 09:53:03 -0400
Received: from mout.gmx.net ([212.227.17.21]:53241)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1mDSBe-00077f-Rt
 for 49954 <at> debbugs.gnu.org; Tue, 10 Aug 2021 09:53:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1628603569;
 bh=mQvZ/B2LNuDrn5RD3w9NN+JmHJizSYxGW1iwtDHGTpg=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=Fxqkcgjn15gtjR3bpghEl+PNDHnHMMFXX0WAH2A5bsUTQoxdVIVQQ2MUv1JAdZ0Sd
 r9cVl/5Ic5PMGyFF4IG9MBooaQVLG4DMbdGEgf7u4ZkIYCf6AZ2XLQREDFiYERA298
 iHFZTaY0nQ+y4CY8e6tBAo5pyPSA3DipnCxrJrIQ=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from gandalf.gmx.de ([213.220.147.198]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M9Wuq-1mAAOT1Ri8-005d0C; Tue, 10
 Aug 2021 15:52:49 +0200
From: Michael Albinus <michael.albinus@HIDDEN>
References: <875ywf9ea7.fsf@HIDDEN> <871r72ssqi.fsf@HIDDEN>
 <874kby7wn5.fsf@HIDDEN>
Date: Tue, 10 Aug 2021 15:52:47 +0200
In-Reply-To: <874kby7wn5.fsf@HIDDEN> (Dima Kogan's message of "Mon,
 09 Aug 2021 21:26:38 -0700")
Message-ID: <875ywdquds.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:ipxtwv8ivUWckEwWuSq0agHSl7BWCI0LlEdy5zB8kjw4RLO69C7
 07rNKA+m2VYCOtMXrntHFC8f9O1TBpuZFQksXJWrh0c8K2MQdVxek81gUPqVPGXD0nWYgsQ
 h4qo31SUL7Et0V849MjOQexdrJgDTF4wMQzxCjMF2ZglPrkNq3jOlQwetyqCjYJ/hUsUkkU
 9PVO+i6+vQet0a73Agomg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:2Z3Sib9qaPc=:3skVxbhMHHaAQalLL2n76o
 QiTamzz+5MZIt0zmQ44U2w6/siNHVG8m5+beiVuXiQDYgIIEM3PQxXgjgfgIlCO++ZzPtw+wD
 bVMNOfsDyvum+MY2zEdn848/SdO+TH5GB3ZvCiYLkW9LNkRlv7t50HOE1aVwryYQw2zFkhYb4
 ayPPnQM+Lpj+NFxWcg4EAqURZi0UE0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18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Dima Kogan <dima@HIDDEN> writes:

> Hi Michael.

Hi Dima,

> I did some debugging, and it appears that the tramp property-caching
> mechanism is failing. We exit the (with-tramp-locked-connection ...)
> form, but when we try to enter the next (with-tramp-locked-connection
> ...) form, it looks locked because
>
> (tramp-get-connection-property proc "locked" nil)
>
> is evaluating to t. I instrumented (tramp-get-connection-property), and
> I can see that this t comes from the property cache. I can "fix" the bug
> by removing the
>
>     (when (and (not (eq cached tramp-cache-undefined))
> 	       ;; If the key is an auxiliary process object, check
> 	       ;; whether the process is still alive.
> 	       (not (and (processp key) (not (process-live-p key)))))
>       (setq value cached
> 	    cache-used t))
>
> form from (tramp-get-connection-property)
>
> Can I get the intent of this form? Are you trying to use this form if
> the process is alive, or if the process is dead? My process is very much
> alive, so this form is being used. Is this what we want?

No, I believe the mechanism is working correctly. A lock is placed on
the connection process of Tramp, and it is kept until the related
operation has finished. The process is expected to be alive, the
additional check of process-live-p is just a reassurance.

> If it is what we want, then the cached value of t is the problem. I
> haven't looked into why that's happening yet.

The problem is the following: Tramp sends a (shell) command to the
remote host, and waits for the reply. This must be atomic, no other
command shall be sent in parallel, in order to get the proper reply.

If there is asynchronous code running, from a timer, a process filter or
sentinel, or process interrupt, this can happen: a second command is
sent, while the other command didn't get its reply yet. The macro
with-tramp-locked-connection shall protect us in this case, and it
raises the respective error. That's not a perfect solution. A better way
would do use threads with mutexes, so that the second command can wait
until the first command got its reply. Something like this needs to be
implemented.

> Thanks!

Best regards, Michael.





Last modified: Tue, 10 Aug 2021 14:00:02 UTC

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