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.

classification
Title: test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot, OpenSSL 1.1.1a
Type: behavior Stage: resolved
Components: SSL, Tests Versions: Python 3.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: christian.heimes, koobs, ned.deily, pablogsal, vstinner
Priority: normal Keywords:

Created on 2018-11-01 14:19 by pablogsal, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (8)
msg329070 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2018-11-01 14:19
https://buildbot.python.org/all/#/builders/172/builds/40/steps/4/logs/stdio


======================================================================
ERROR: test_ciphers (test.test_ssl.SimpleBackgroundTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1672, in test_ciphers
    s.connect(self.server_addr)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1109, in connect
    self._real_connect(addr, False)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1100, in _real_connect
    self.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1077, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer
Stdout:
 server:  new connection from ('127.0.0.1', 12982)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
Test server failure:
Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1938, in run
    msg = self.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1915, in read
    return self.sslconn.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 633, in read
    v = self._sslobj.read(len)
 ConnectionResetError: [Errno 54] Connection reset by peer
======================================================================
ERROR: test_connect (test.test_ssl.SimpleBackgroundTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1497, in test_connect
    s.connect(self.server_addr)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1109, in connect
    self._real_connect(addr, False)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1100, in _real_connect
    self.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1077, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
BrokenPipeError: [Errno 32] Broken pipe
Stdout:
 server:  new connection from ('127.0.0.1', 12985)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
Test server failure:
Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1938, in run
    msg = self.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1915, in read
    return self.sslconn.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 633, in read
    v = self._sslobj.read(len)
 ConnectionResetError: [Errno 54] Connection reset by peer
======================================================================
ERROR: test_connect_cadata (test.test_ssl.SimpleBackgroundTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1614, in test_connect_cadata
    s.connect(self.server_addr)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1109, in connect
    self._real_connect(addr, False)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1100, in _real_connect
    self.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1077, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer
Stdout:
 server:  new connection from ('127.0.0.1', 12988)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
Test server failure:
Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1938, in run
    msg = self.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1915, in read
    return self.sslconn.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 633, in read
    v = self._sslobj.read(len)
 ConnectionResetError: [Errno 54] Connection reset by peer
======================================================================
ERROR: test_connect_capath (test.test_ssl.SimpleBackgroundTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1593, in test_connect_capath
    s.connect(self.server_addr)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1109, in connect
    self._real_connect(addr, False)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1100, in _real_connect
    self.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1077, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer
Stdout:
 server:  new connection from ('127.0.0.1', 12991)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
Test server failure:
Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1938, in run
    msg = self.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1915, in read
    return self.sslconn.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 633, in read
    v = self._sslobj.read(len)
 ConnectionResetError: [Errno 54] Connection reset by peer
======================================================================
ERROR: test_connect_with_context (test.test_ssl.SimpleBackgroundTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1555, in test_connect_with_context
    s.connect(self.server_addr)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1109, in connect
    self._real_connect(addr, False)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1100, in _real_connect
    self.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1077, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer
Stdout:
 server:  new connection from ('127.0.0.1', 12998)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
Test server failure:
Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1938, in run
    msg = self.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1915, in read
    return self.sslconn.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 633, in read
    v = self._sslobj.read(len)
 ConnectionResetError: [Errno 54] Connection reset by peer
test test_ssl failed
======================================================================
ERROR: test_get_server_certificate (test.test_ssl.SimpleBackgroundTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1659, in test_get_server_certificate
    _test_get_server_certificate(self, *self.server_addr, cert=SIGNING_CA)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1819, in _test_get_server_certificate
    pem = ssl.get_server_certificate((host, port), ca_certs=cert)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1231, in get_server_certificate
    with  create_connection(addr) as sock:
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/socket.py", line 724, in create_connection
    raise err
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused
Stdout:
 server:  new connection from ('127.0.0.1', 13007)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
Test server failure:
Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1938, in run
    msg = self.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1915, in read
    return self.sslconn.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 874, in read
    return self._sslobj.read(len, buffer)
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 633, in read
    v = self._sslobj.read(len)
 ConnectionResetError: [Errno 54] Connection reset by peer
----------------------------------------------------------------------
msg329071 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2018-11-01 14:20
There is also:

Traceback (most recent call last):
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py", line 1860, in wrap_conn
    self.sock, server_side=True)
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 407, in wrap_socket
    _context=self, _session=session)
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 817, in __init__
    self.do_handshake()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 1077, in do_handshake
    self._sslobj.do_handshake()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:847)

https://buildbot.python.org/all/#/builders/172/builds/69/steps/4/logs/stdio
msg329072 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2018-11-01 14:22
I'm trying to figure out the exact OpenSSL version. It used to be part of pythoninfo step.
msg329095 - (view) Author: Kubilay Kocak (koobs) (Python triager) Date: 2018-11-02 01:53
The version in base is:

/usr/bin/openssl version
OpenSSL 1.1.1-freebsd  11 Sep 2018

There is a version from ports also installed at a different prefix, which I don't believe Python picks up by default unless Modules/Setup or --with-openssl (is this in 3.6?) is used.

I don't believe either, or anything else non-default is used for this buildbot environment, either in the worker configuration, or the builder configs themselves.

If test_ssl isnt failing on 3.x on this same worker, then presumably there's a commit or fix that hasn't been backported.
msg330651 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-29 00:56
> I'm trying to figure out the exact OpenSSL version. It used to be part of pythoninfo step.

Did you click on "view all 165 lines"? I like to click on [download] to open the output in my text editor (gvim).

ssl info from pythoninfo:

ssl.HAS_SNI: True
ssl.OPENSSL_VERSION: OpenSSL 1.1.1a  20 Nov 2018
ssl.OPENSSL_VERSION_INFO: (1, 1, 1, 1, 15)
ssl.OP_ALL: 0x80000054
ssl.OP_NO_TLSv1_1: 0x10000000

That's the boring OpenSSL, not the funny LibreSSL, no?
msg331646 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-12-11 19:21
FWIW, test_ssl currently passes on the other FreeBSD 3.6 buildbot: FreeBSD 10-STABLE Non-Debug 3.6 buildbot.  Among any other differences, the SSL version there is older:
    ssl.OPENSSL_VERSION: OpenSSL 1.0.1u-freebsd  22 Sep 2016
msg331647 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-12-11 19:26
On the other hand and also FWIW, test_ssl does pass on the AMD64 FreeBSD CURRENT Shared 3.7 buildbot (the same system?) which also has 1.1.1a:
    ssl.OPENSSL_VERSION: OpenSSL 1.1.1a  20 Nov 2018
msg391302 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-04-17 18:26
I'm closing the issue as outdated.
History
Date User Action Args
2022-04-11 14:59:07adminsetgithub: 79317
2021-04-17 18:26:25christian.heimessetstatus: open -> closed
type: behavior
messages: + msg391302

resolution: out of date
stage: resolved
2019-01-18 15:10:24vstinnersettitle: test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot -> test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot, OpenSSL 1.1.1a
2018-12-11 19:26:30ned.deilysetmessages: + msg331647
2018-12-11 19:21:39ned.deilysetnosy: + ned.deily
messages: + msg331646
2018-11-29 00:56:59vstinnersetnosy: + vstinner
messages: + msg330651
2018-11-02 01:53:04koobssetmessages: + msg329095
2018-11-01 14:22:27christian.heimessetmessages: + msg329072
2018-11-01 14:20:49pablogsalsetmessages: + msg329071
2018-11-01 14:19:22pablogsalcreate