Skip to content

bpo-38920: Add audit hooks for when sys.excepthook and sys.unraisable hooks are invoked #17392

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

Merged
merged 3 commits into from
Nov 28, 2019

Conversation

zooba
Copy link
Member

@zooba zooba commented Nov 26, 2019

Also fixes some potential segfaults in unraisable hook handling.

https://bugs.python.org/issue38920

@zooba
Copy link
Member Author

zooba commented Nov 26, 2019

Targeted tests coming, but I want to manually test the 3.8 backport first.

@bedevere-bot
Copy link

GH-17393 is a backport of this pull request to the 3.8 branch.

if (err_msg == NULL) {
PyErr_Clear();
}
if (PySys_Audit("sys.unraisablehook", "OO", hook, hook_args) < 0) {
Copy link
Member

Choose a reason for hiding this comment

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

No audit event is generated if there is no custom exception hook set?

@zooba zooba merged commit bea33f5 into python:master Nov 28, 2019
@zooba zooba deleted the hooks branch November 28, 2019 16:46
zooba added a commit that referenced this pull request Nov 28, 2019
…hook are invoked (GH-17392)

Also fixes some potential segfaults in unraisable hook handling.
@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Windows7 SP1 3.8 has failed when building commit b74a6f1.

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/163/builds/1) and take a look at the build logs.
  4. Check if the failure is related to this commit (b74a6f1) 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/163/builds/1

Failed tests:

  • test_asyncio

Failed subtests:

  • test_huge_content - test.test_asyncio.test_sock_lowlevel.ProactorEventLoopTests
  • test_huge_content_recvinto - test.test_asyncio.test_sock_lowlevel.SelectEventLoopTests

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

== Tests result: FAILURE then FAILURE ==

389 tests OK.

10 slowest tests:

  • test_multiprocessing_spawn: 3 min 22 sec
  • test_io: 2 min 32 sec
  • test_venv: 2 min 22 sec
  • test_tools: 2 min 17 sec
  • test_mmap: 2 min 2 sec
  • test_concurrent_futures: 2 min 2 sec
  • test_tokenize: 1 min 51 sec
  • test_lib2to3: 1 min 35 sec
  • test_asyncio: 1 min 23 sec
  • test_zipfile: 1 min 19 sec

1 test failed:
test_asyncio

33 tests skipped:
test_curses test_dbm_gnu test_dbm_ndbm test_devpoll test_epoll
test_fcntl test_fork1 test_gdb test_grp test_ioctl test_kqueue
test_multiprocessing_fork test_multiprocessing_forkserver test_nis
test_openpty test_ossaudiodev test_pipes test_poll test_posix
test_pty test_pwd test_readline test_resource test_spwd
test_syslog test_threadsignals test_tix test_tk test_ttk_guionly
test_wait3 test_wait4 test_xxtestfuzz test_zipfile64

1 re-run test:
test_asyncio

Total duration: 15 min 15 sec

Click to see traceback logs
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 66, in _cancel_overlapped
    self._ov.cancel()
OSError: [WinError 6] The handle is invalid


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 453, in finish_recv
    return ov.getresult()
OSError: [WinError 64] The specified network name is no longer available


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 66, in _cancel_overlapped
    self._ov.cancel()
OSError: [WinError 6] The handle is invalid
k


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\proactor_events.py", line 768, in _loop_self_reading
    f.result()  # may raise
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 808, in _poll
    value = callback(transferred, key, ov)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 457, in finish_recv
    raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asyncio\test_sock_lowlevel.py", line 170, in test_huge_content
    self.loop.run_until_complete(
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\base_events.py", line 608, in run_until_complete
    return future.result()
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asyncio\test_sock_lowlevel.py", line 157, in _basetest_huge_content
    data = await self.loop.sock_recv(sock, DATA_SIZE)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\proactor_events.py", line 693, in sock_recv
    return await self._proactor.recv(sock, n)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 808, in _poll
    value = callback(transferred, key, ov)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 457, in finish_recv
    raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 64] The specified network name is no longer available


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asyncio\test_sock_lowlevel.py", line 225, in test_huge_content_recvinto
    self.loop.run_until_complete(
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\base_events.py", line 608, in run_until_complete
    return future.result()
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asyncio\test_sock_lowlevel.py", line 211, in _basetest_huge_content_recvinto
    nbytes = await self.loop.sock_recv_into(sock, buf)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\selector_events.py", line 400, in sock_recv_into
    return await fut
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\selector_events.py", line 409, in _sock_recv_into
    nbytes = sock.recv_into(buf)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 453, in finish_recv
    return ov.getresult()
OSError: [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\proactor_events.py", line 768, in _loop_self_reading
    f.result()  # may raise
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 808, in _poll
    value = callback(transferred, key, ov)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 457, in finish_recv
    raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request
k

@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 FreeBSD Shared 3.8 has failed when building commit b74a6f1.

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/18/builds/1) and take a look at the build logs.
  4. Check if the failure is related to this commit (b74a6f1) 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/18/builds/1

Failed tests:

  • test_ssl

Failed subtests:

  • test_min_max_version - test.test_ssl.ContextTests
  • test_min_max_version_mismatch - test.test_ssl.ThreadedTests

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

== Tests result: FAILURE then FAILURE ==

402 tests OK.

10 slowest tests:

  • test_tools: 7 min 45 sec
  • test_multiprocessing_spawn: 7 min 24 sec
  • test_lib2to3: 5 min 52 sec
  • test_concurrent_futures: 4 min 44 sec
  • test_tokenize: 4 min 20 sec
  • test_multiprocessing_fork: 3 min 21 sec
  • test_multiprocessing_forkserver: 3 min 16 sec
  • test_subprocess: 3 min 14 sec
  • test_regrtest: 2 min 56 sec
  • test_asyncio: 2 min 44 sec

1 test failed:
test_ssl

20 tests skipped:
test_dbm_gnu test_devpoll test_epoll test_gdb test_idle test_ioctl
test_msilib test_ossaudiodev test_spwd test_startfile test_tcl
test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle
test_winconsoleio test_winreg test_winsound test_zipfile64

1 re-run test:
test_ssl

Total duration: 27 min 40 sec

Click to see traceback logs
Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 OSError: [Errno 0] Error
 server:  new connection from ('127.0.0.1', 9479)


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1108)
k


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL] called a function you should not call (_ssl.c:1108)
 server:  new connection from ('127.0.0.1', 9477)


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1108)
k


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: UNEXPECTED_MESSAGE] unexpected message (_ssl.c:1108)
FAIL


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL] called a function you should not call (_ssl.c:1108)
 server:  new connection from ('127.0.0.1', 7658)


Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 1235, in test_min_max_version
    self.assertIn(
AssertionError: <TLSVersion.TLSv1_2: 771> not found in {<TLSVersion.SSLv3: 768>, <TLSVersion.TLSv1: 769>}


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL] called a function you should not call (_ssl.c:1108)
k


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1108)


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1108)
k


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1108)
k


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 OSError: [Errno 0] Error
 server:  new connection from ('127.0.0.1', 7660)


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2444, in run
    self.write(msg.lower())
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2363, in write
    return self.sslconn.write(bytes)
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1118, in write
    return self._sslobj.write(data)
 BrokenPipeError: [Errno 32] Broken pipe
k


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1108)
 server:  new connection from ('127.0.0.1', 7608)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
 Connection reset by peer: ('127.0.0.1', 7608)
k


Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 217, in wrapper
    return func(*args, **kw)
  File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 3835, in test_min_max_version_mismatch
    self.assertIn("alert", str(e.exception))
AssertionError: 'alert' not found in '[SSL: NO_PROTOCOLS_AVAILABLE] no protocols available (_ssl.c:1108)'


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2300, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.8.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1108)
 server:  new connection from ('127.0.0.1', 9459)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
 Connection reset by peer: ('127.0.0.1', 9459)
k

@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 FreeBSD Shared 3.x has failed when building commit bea33f5.

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/152/builds/1) and take a look at the build logs.
  4. Check if the failure is related to this commit (bea33f5) 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/152/builds/1

Failed tests:

  • test_ssl

Failed subtests:

  • test_min_max_version - test.test_ssl.ContextTests
  • test_min_max_version_mismatch - test.test_ssl.ThreadedTests

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

== Tests result: FAILURE then FAILURE ==

399 tests OK.

10 slowest tests:

  • test_tokenize: 7 min 30 sec
  • test_unparse: 6 min 36 sec
  • test_multiprocessing_spawn: 6 min 23 sec
  • test_concurrent_futures: 5 min 5 sec
  • test_lib2to3: 4 min 44 sec
  • test_multiprocessing_forkserver: 4 min 11 sec
  • test_unicodedata: 4 min 5 sec
  • test_pickle: 3 min 42 sec
  • test_asyncio: 3 min 26 sec
  • test_capi: 3 min 10 sec

1 test failed:
test_ssl

20 tests skipped:
test_dbm_gnu test_devpoll test_epoll test_gdb test_idle test_ioctl
test_msilib test_ossaudiodev test_spwd test_startfile test_tcl
test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle
test_winconsoleio test_winreg test_winsound test_zipfile64

1 re-run test:
test_ssl

Total duration: 29 min 9 sec

Click to see traceback logs
Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1108)
k


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1108)
k


Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 1238, in test_min_max_version
    self.assertIn(
AssertionError: <TLSVersion.TLSv1_2: 771> not found in {<TLSVersion.SSLv3: 768>, <TLSVersion.TLSv1: 769>}


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1108)
 server:  new connection from ('127.0.0.1', 13642)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
 Connection reset by peer: ('127.0.0.1', 13642)
k


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1108)
 server:  new connection from ('127.0.0.1', 12041)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
 Connection reset by peer: ('127.0.0.1', 12041)
k


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1108)
k


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL] called a function you should not call (_ssl.c:1108)
 server:  new connection from ('127.0.0.1', 13660)


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1108)
k


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL] called a function you should not call (_ssl.c:1108)
k


Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 220, in wrapper
    return func(*args, **kw)
  File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 3840, in test_min_max_version_mismatch
    self.assertIn("alert", str(e.exception))
AssertionError: 'alert' not found in '[SSL: NO_PROTOCOLS_AVAILABLE] no protocols available (_ssl.c:1108)'


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 OSError: [Errno 0] Error
 server:  new connection from ('127.0.0.1', 12061)


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 OSError: [Errno 0] Error
 server:  new connection from ('127.0.0.1', 13662)


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1108)


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL] called a function you should not call (_ssl.c:1108)
 server:  new connection from ('127.0.0.1', 12059)


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2305, in wrap_conn
    self.sslconn = self.server.context.wrap_socket(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: UNEXPECTED_MESSAGE] unexpected message (_ssl.c:1108)
FAIL


Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2449, in run
    self.write(msg.lower())
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", line 2368, in write
    return self.sslconn.write(bytes)
   File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/ssl.py", line 1118, in write
    return self._sslobj.write(data)
 BrokenPipeError: [Errno 32] Broken pipe
k

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
… hooks are invoked (pythonGH-17392)

Also fixes some potential segfaults in unraisable hook handling.
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
… hooks are invoked (pythonGH-17392)

Also fixes some potential segfaults in unraisable hook handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants