← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1873368] Re: ssshuttle server fails to connect endpoints with python 3.8

 

** Changed in: sshuttle
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1873368

Title:
  ssshuttle server fails to connect endpoints with python 3.8

Status in Sshuttle:
  Fix Released
Status in sshuttle package in Ubuntu:
  In Progress
Status in sshuttle source package in Xenial:
  In Progress
Status in sshuttle source package in Bionic:
  In Progress
Status in sshuttle source package in Focal:
  In Progress
Status in sshuttle source package in Groovy:
  In Progress
Status in sshuttle package in Debian:
  Fix Released

Bug description:
  [Impact]

  sshuttle fails to connect to a remote system with python >= 3.8, or
  (after initial patch) to remote system with python <= 3.4.

  [Test Case]

  connect from a system with sshuttle installed to a remote system, in
  all combinations (t/x/b/f/g with sshuttle to remote t/x/b/f/g system).
  All combinations should work.

  The first failure, connecting to remote systems with python >= 3.8,
  will fail like:

  $ sshuttle -r ubuntu@{ip-addr} {subnet-1}
  assembler.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  client: Connected.
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "assembler.py", line 38, in <module>
    File "sshuttle.server", line 298, in main
    File "/usr/lib/python3.8/socket.py", line 544, in fromfd
      return socket(family, type, proto, nfd)
    File "/usr/lib/python3.8/socket.py", line 231, in __init__
      _socket.socket.__init__(self, family, type, proto, fileno)
  OSError: [Errno 88] Socket operation on non-socket
  client: fatal: server died with error code 1

  The second failure, connecting to remote systems with python <= 3.4,
  will fail like:

  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "assembler.py", line 39, in <module>
    File "sshuttle.server", line 400, in main
    File "sshuttle.ssnet", line 598, in runonce
    File "sshuttle.ssnet", line 488, in callback
    File "sshuttle.ssnet", line 437, in flush
  AttributeError: 'module' object has no attribute 'set_blocking'
  client: fatal: server died with error code 1

  [Regression Potential]

  any regression would likely cause problems at connection
  initialization, i.e. when connecting from the sshuttle system to the
  remote system. it's unlikely this would cause any regression that
  occurs after the initial setup has been completed.

  [scope]

  First, I'll note this regression illustrates the importance of the
  [scope] section, and why I always include it in my SRUs...

  tl;dr for scope is 2 fixes are needed (work with remote py >= 3.8 and
  work with remote py <= 3.4), and both fixes are needed in sshuttle for
  all releases.

  details:

  this is needed for all releases; x, b, f, and g. However there are 2
  parts to fixing this; the first part is fixing sshuttle connecting
  from any release to a system with python >= 3.8. That is done for g,
  and in proposed for f, and not done for b or x. The second part is to
  correct the first patch's regression to allow sshuttle connecting from
  any release to a system with python <= 3.4. That is needed for x, b,
  f, and g.

  a good scope table from @smoser is in comment 26.

  [Other Info]

  https://github.com/sshuttle/sshuttle/issues/381
  https://bugs.python.org/issue39685
  https://bugs.python.org/issue35415

  [Original Description]

  Client
  $ python3 --version
  Python 3.8.2
  $ lsb_release -rd
  Description:    Ubuntu Focal Fossa (development branch)
  Release:        20.04
  $ apt-cache policy sshuttle
  sshuttle:
    Installed: 0.78.5-1
    Candidate: 0.78.5-1

  Server
  $ python3 --version
  Python 3.8.2
  $ lsb_release -rd
  Description:    Ubuntu 20.04 LTS
  Release:        20.04
  $ apt-cache policy openssh-server
  openssh-server:
    Installed: 1:8.2p1-4
    Candidate: 1:8.2p1-4

  $ sshuttle -r ubuntu@{ip-addr} {subnet-1} {subnet-2}
  assembler.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  client: Connected.
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "assembler.py", line 38, in <module>
    File "sshuttle.server", line 298, in main
    File "/usr/lib/python3.8/socket.py", line 544, in fromfd
      return socket(family, type, proto, nfd)
    File "/usr/lib/python3.8/socket.py", line 231, in __init__
      _socket.socket.__init__(self, family, type, proto, fileno)
  OSError: [Errno 88] Socket operation on non-socket
  client: fatal: server died with error code 1

  The sshuttle upstream tracker is issue#381 [0]. They are waiting on a
  response to bpo#39685 [1].

  This regression was introduced in python 3.8 by bpo#35415 [2], which
  restricts socket.fromfd() calls to provide valid socket family file
  descriptors.

  [0] https://github.com/sshuttle/sshuttle/issues/381
  [1] https://bugs.python.org/issue39685
  [2] https://bugs.python.org/issue35415

To manage notifications about this bug go to:
https://bugs.launchpad.net/sshuttle/+bug/1873368/+subscriptions