Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-117649: Raise ImportError for unsupported modules in free-threaded build #117651

Merged

Conversation

colesbury
Copy link
Contributor

@colesbury colesbury commented Apr 8, 2024

The free-threaded build does not currently support the combination of single-phase init modules and legacy, non-isolated subinterpreters. Note that with isolated interpreters, single-phase init modules already trigger ImportError.

…readed build

The free-threaded build does not currently support the combination of
single-phase init modules and legacy, non-isolated subinterpreters. Note
that with isolated interpreters, single-phase init modules already
trigger `ImportError`.
Python/import.c Outdated Show resolved Hide resolved
@colesbury colesbury requested a review from encukou April 9, 2024 19:21
As suggested by Petr in the corresponding issue.
@colesbury
Copy link
Contributor Author

@encukou, I've updated the PR with your suggestions from #117649 (comment).

Copy link
Member

@encukou encukou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get to finish a full review today, submitting what I have so far.

Lib/test/test_capi/test_misc.py Outdated Show resolved Hide resolved
Lib/test/test_interpreters/test_api.py Outdated Show resolved Hide resolved
Python/import.c Outdated Show resolved Hide resolved
colesbury and others added 2 commits April 10, 2024 13:34
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Copy link
Member

@encukou encukou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

Python/import.c Outdated Show resolved Hide resolved
Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from possible comments and using "expected failure" in tests, LGTM.

Include/cpython/pylifecycle.h Show resolved Hide resolved
Lib/test/test_capi/test_misc.py Outdated Show resolved Hide resolved
Lib/test/test_capi/test_misc.py Outdated Show resolved Hide resolved
@bedevere-app
Copy link

bedevere-app bot commented Apr 11, 2024

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@colesbury
Copy link
Contributor Author

Thanks for the review @ericsnowcurrently. I've changed the skips to expected failures and added comments pointing to gh-117649.

I have made the requested changes; please review again

@bedevere-app
Copy link

bedevere-app bot commented Apr 11, 2024

Thanks for making the requested changes!

@encukou, @ericsnowcurrently: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from encukou April 11, 2024 17:57
Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks for making those changes. They should really help.

@colesbury colesbury merged commit 25f6ff5 into python:main Apr 11, 2024
35 of 38 checks passed
@colesbury colesbury deleted the gh-117649-singlephase-subinterp-nogil branch April 11, 2024 19:00
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot ARM64 MacOS M1 Refleaks NoGIL 3.x has failed when building commit 25f6ff5.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1368/builds/710) and take a look at the build logs.
  4. Check if the failure is related to this commit (25f6ff5) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1368/builds/710

Failed tests:

  • test_capi

Failed subtests:

  • test_pha_required_nocert - test.test_ssl.TestPostHandshakeAuth.test_pha_required_nocert

Test leaking resources:

  • test_capi: file descriptors

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2359, in run
    msg = self.read()
          ~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2336, in read
    return self.sslconn.read()
           ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1141, in read
    return self._sslobj.read(len)
           ~~~~~~~~~~~~~~~~~^^^^^
 ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2580)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2359, in run
    msg = self.read()
          ~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2336, in read
    return self.sslconn.read()
           ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1141, in read
    return self._sslobj.read(len)
           ~~~~~~~~~~~~~~~~~^^^^^
 ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2580)
TLS: (<ssl.SSLSocket fd=7, family=2, type=1, proto=0, laddr=('127.0.0.1', 61554)>, 'read', <TLSVersion.TLSv1_3: 772>, <_TLSContentType.ALERT: 21>, <_TLSAlertType.CERTIFICATE_REQUIRED: 116>, b'\x02t')
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1020)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLEOFError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1020)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:1020)
 server:  new connection from ('127.0.0.1', 61940)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 Connection reset by peer: ('127.0.0.1', 61940)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2359, in run
    msg = self.read()
          ~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2336, in read
    return self.sslconn.read()
           ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1141, in read
    return self._sslobj.read(len)
           ~~~~~~~~~~~~~~~~~^^^^^
 ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2580)
FAIL


Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 4538, in test_pha_required_nocert
    with self.assertRaisesRegex(
    ...<11 lines>...
        s.recv(1024)
AssertionError: "certificate required|EOF occurred|closed by the remote host|Connection reset by peer" does not match "[Errno 32] Broken pipe"


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1020)
 server:  new connection from ('127.0.0.1', 63402)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 Connection reset by peer: ('127.0.0.1', 63402)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1020)
 connection timeout TimeoutError('timed out')
 connection timeout TimeoutError('timed out')
k


Traceback (most recent call last):
  File "<string>", line 10, in <module>
  File "<frozen importlib._bootstrap>", line 813, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1314, in create_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: module _test_module_state_shared does not support loading in subinterpreters
xpected failure


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:1020)
 server:  new connection from ('127.0.0.1', 63713)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 Connection reset by peer: ('127.0.0.1', 63713)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1020)
 server:  new connection from ('127.0.0.1', 60872)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 Connection reset by peer: ('127.0.0.1', 60872)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ConnectionResetError: [Errno 54] Connection reset by peer
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1020)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:1020)
 server:  new connection from ('127.0.0.1', 60986)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 Connection reset by peer: ('127.0.0.1', 60986)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1020)
 connection timeout TimeoutError('timed out')
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1020)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1020)
 server:  new connection from ('127.0.0.1', 60920)
 server: connection cipher is now ('ECDHE-PSK-CHACHA20-POLY1305', 'TLSv1.2', 256)
 server:  new connection from ('127.0.0.1', 60922)
 server: connection cipher is now ('ECDHE-PSK-CHACHA20-POLY1305', 'TLSv1.2', 256)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: NO_SUITABLE_KEY_SHARE] no suitable key share (_ssl.c:1020)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1020)
 connection timeout TimeoutError('timed out')
 server:  new connection from ('127.0.0.1', 61757)
 server: connection cipher is now ('ECDHE-PSK-CHACHA20-POLY1305', 'TLSv1.2', 256)
 server:  new connection from ('127.0.0.1', 61759)
 server: connection cipher is now ('ECDHE-PSK-CHACHA20-POLY1305', 'TLSv1.2', 256)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1020)
 server:  new connection from ('127.0.0.1', 61655)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 Connection reset by peer: ('127.0.0.1', 61655)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1020)
k


Traceback (most recent call last):
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_ssl.py", line 2274, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sock, server_side=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        sock=sock,
        ^^^^^^^^^^
    ...<5 lines>...
        session=session
        ^^^^^^^^^^^^^^^
    )
    ^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1077, in _create
    self.do_handshake()
    ~~~~~~~~~~~~~~~~~^^
   File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/ssl.py", line 1363, in do_handshake
    self._sslobj.do_handshake()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
 ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1020)
 server:  new connection from ('127.0.0.1', 63644)
 server: connection cipher is now ('ECDHE-PSK-CHACHA20-POLY1305', 'TLSv1.2', 256)
 server:  new connection from ('127.0.0.1', 63646)
 server: connection cipher is now ('ECDHE-PSK-CHACHA20-POLY1305', 'TLSv1.2', 256)
k

@colesbury
Copy link
Contributor Author

I'm looking into the file descriptor leak (in test_overridden_setting_extensions_subinterp_check)

diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…readed build (python#117651)

The free-threaded build does not currently support the combination of
single-phase init modules and non-isolated subinterpreters. Ensure that
`check_multi_interp_extensions` is always `True` for subinterpreters in
the free-threaded build so that importing these modules raises an
`ImportError`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants