Hi Tomas,
On Di 21 Jun 2022 22:19:31 CEST, Tomáš Cerha wrote:
Dear list members,
We develop a custom client for our application using python-x2go and
we make use of X2GoRevFwTunnel to expose some client side
functionality to the server side app. We observed regular X2Go
session freezing after about 3 hours running on Windows (several
versions, reliably reproducible on Windows 10) with the following
output:WARN: Reverse tunnel <paramiko.Channel 16 (open) window=2036405 ->
<paramiko.Transport at 0x4e4f270L (cipher aes128-ctr, 128 bits)
(active; 2 open channel(s))>> encoutered socket error: [Errno 10054]
An existing connection was forcibly closed by the remote hostThis message comes from x2go_rev_forward_channel_handler() and if
the error persists, the code loops endlessly. This freezes the
whole session (IMHO due to cooperative multitasking not having a
chance to switch).The attached patch solves the problem by breaking after catching the
socket error 1024 times. This leads to the tunnel being closed,
which allows the application to reopen it automatically and recover
gracefully from the situation. This seems suffitiently
conservative, seems to make sense generally and definitely helps in
our case. Of course, there may be other ways to deal with the
problem, so the patch is just a suggestion.We currently work around the problem by monkey patching the function
x2go_rev_forward_channel_handler(), but of course, we would love to
see the problem solved upstream.Thank you for considering the patch and for your great work on the
X2Go project.Best regards
Tomáš Cerha
Thanks for digging into this. Patch has been applied.
DAS-NETZWERKTEAM c\o Technik- und Ökologiezentrum Eckernförde Mike Gabriel, Marienthaler Str. 17, 24340 Eckernförde mobile: +49 (1520) 1976 148 landline: +49 (4351) 850 8940
GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de