New submission from Brian May <[email protected]>:
After upgrading to Python 3.8, users of sshuttle report seeing this error:
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
https://github.com/sshuttle/sshuttle/issues/381
The cause of the error is this line:
https://github.com/sshuttle/sshuttle/blob/6ad4473c87511bcafaec3d8d0c69dfcb166b48ed/sshuttle/server.py#L297
which does:
socket.fromfd(sys.stdin.fileno(), socket.AF_INET, socket.SOCK_STREAM)
socket.fromfd(sys.stdout.fileno(), socket.AF_INET, socket.SOCK_STREAM)
Where sys.stdin and sys.stdout are stdin/stdout provided by the ssh server when
it ran our remote ssh process.
I believe this change in behavior is as a result of a fix for the following
bug: https://bugs.python.org/issue35415
I am wondering if this is a bug in Python for causing such a regression, or a
bug in sshuttle. Possibly sshuttle is using socket.fromfd in a way that was
never intended?
Would appreciate an authoritative answer on this.
Thanks
----------
components: IO
messages: 362255
nosy: brian
priority: normal
severity: normal
status: open
title: Python 3.8 regression Socket operation on non-socket
versions: Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39685>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com