This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients christian.heimes, ned.deily, nneonneo, ronaldoussoren, tacocat
Date 2020-10-23.09:12:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1603444357.76.0.911711668795.issue33090@roundup.psfhosted.org>
In-reply-to
Content
The script still fails on macOS 10.15 with python 3.9 (installed from python.org).

Interestingly enough:
- First run of the script worked without any problems
- Subsequent runs failed with various errors:

$ python3.9 t.py
Got connection from ('127.0.0.1', 60640)
Exception in thread ReadThread:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 950, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 888, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/ronald/Projects/python/github/cpython-ronald/t.py", line 93, in read_thread
    csocket.recv()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1226, in recv
    return self.read(buflen)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1101, in read
    return self._sslobj.read(len)
BlockingIOError: [Errno 35] Resource temporarily unavailable


----

Got connection from ('127.0.0.1', 60651)
.Traceback (most recent call last):
  File "/Users/ronald/Projects/python/github/cpython-ronald/t.py", line 74, in server_thread
Exception in thread WriteThread:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 950, in _bootstrap_inner
Exception in thread ReadThread:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 950, in _bootstrap_inner
    deal_with_client(newsocket)
  File "/Users/ronald/Projects/python/github/cpython-ronald/t.py", line 68, in deal_with_client
    data = connstream.read()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1101, in read
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 888, in run
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 888, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/ronald/Projects/python/github/cpython-ronald/t.py", line 93, in read_thread
    self._target(*self._args, **self._kwargs)
  File "/Users/ronald/Projects/python/github/cpython-ronald/t.py", line 89, in write_thread
    return self._sslobj.read(len)
    csocket.recv()
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2621)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1226, in recv
    csocket.send(b'blah')
Closed connection from ('127.0.0.1', 60651)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1173, in send
    return self.read(buflen)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1101, in read
    return self._sslobj.write(data)
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:2471)
    return self._sslobj.read(len)
ssl.SSLError: [SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:2621)

----

Got connection from ('127.0.0.1', 60636)
.Exception in thread ReadThread:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 950, in _bootstrap_inner
Traceback (most recent call last):
  File "/Users/ronald/Projects/python/github/cpython-ronald/t.py", line 74, in server_thread
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 888, in run
    deal_with_client(newsocket)
  File "/Users/ronald/Projects/python/github/cpython-ronald/t.py", line 68, in deal_with_client
    self._target(*self._args, **self._kwargs)
  File "/Users/ronald/Projects/python/github/cpython-ronald/t.py", line 93, in read_thread
    csocket.recv()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1226, in recv
    data = connstream.read()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1101, in read
    return self.read(buflen)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1101, in read
    return self._sslobj.read(len)
    return self._sslobj.read(len)
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2621)
Closed connection from ('127.0.0.1', 60636)
BlockingIOError: [Errno 35] Resource temporarily unavailable
Exception in thread WriteThread:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 950, in _bootstrap_inner
History
Date User Action Args
2020-10-23 09:12:38ronaldoussorensetrecipients: + ronaldoussoren, nneonneo, christian.heimes, ned.deily, tacocat
2020-10-23 09:12:37ronaldoussorensetmessageid: <1603444357.76.0.911711668795.issue33090@roundup.psfhosted.org>
2020-10-23 09:12:37ronaldoussorenlinkissue33090 messages
2020-10-23 09:12:37ronaldoussorencreate