Skip to content

test_ssl: test_min_max_version() fails on FreeBSD and Fedora #82996

Closed

Description

@vstinner
BPO 38815
Nosy @vstinner, @taleinat, @tiran, @ned-deily, @koobs, @pablogsal, @miss-islington, @sumagnadas
PRs
  • bpo-38815: Accept TLSv3 default in min max test (GH-NNNN) #17437
  • [3.8] bpo-38815: Accept TLSv3 default in min max test (GH-NNNN) (GH-17437) #17438
  • [3.7] bpo-38815: Accept TLSv3 default in min max test (GH-NNNN) (GH-17437) #17439
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/tiran'
    closed_at = <Date 2021-04-17.18:19:39.273>
    created_at = <Date 2019-11-15.16:54:20.894>
    labels = ['expert-SSL', 'tests', '3.9']
    title = 'test_ssl: test_min_max_version() fails on FreeBSD and Fedora'
    updated_at = <Date 2021-04-17.18:19:39.272>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2021-04-17.18:19:39.272>
    actor = 'christian.heimes'
    assignee = 'christian.heimes'
    closed = True
    closed_date = <Date 2021-04-17.18:19:39.273>
    closer = 'christian.heimes'
    components = ['Tests', 'SSL']
    creation = <Date 2019-11-15.16:54:20.894>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38815
    keywords = ['patch']
    message_count = 26.0
    messages = ['356691', '356692', '356857', '357705', '357706', '357707', '357710', '357711', '357712', '357715', '357716', '357717', '357718', '357719', '357792', '357794', '357959', '358314', '358693', '369252', '369254', '369260', '369272', '377049', '377541', '391298']
    nosy_count = 8.0
    nosy_names = ['vstinner', 'taleinat', 'christian.heimes', 'ned.deily', 'koobs', 'pablogsal', 'miss-islington', 'sumagnadas']
    pr_nums = ['17437', '17438', '17439']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue38815'
    versions = ['Python 3.9']

    Activity

    1. vstinner commented on Nov 15, 2019

      @vstinner
      MemberAuthor

      Fail with OpenSSL 1.1.1d 10 Sep 2019 on AMD64 FreeBSD Shared 3.x:
      https://buildbot.python.org/all/#/builders/371/builds/78

      ======================================================================
      FAIL: test_min_max_version (test.test_ssl.ContextTests)
      ----------------------------------------------------------------------

      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>}

      ======================================================================
      FAIL: test_min_max_version_mismatch (test.test_ssl.ThreadedTests)
      ----------------------------------------------------------------------

      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)'

      SSL infos from pythoninfo:

      ssl.HAS_SNI: True
      ssl.OPENSSL_VERSION: OpenSSL 1.1.1d 10 Sep 2019
      ssl.OPENSSL_VERSION_INFO: (1, 1, 1, 4, 15)
      ssl.OP_ALL: 0x80000054
      ssl.OP_NO_TLSv1_1: 0x10000000

      ssl.SSLContext.maximum_version: TLSVersion.MAXIMUM_SUPPORTED
      ssl.SSLContext.minimum_version: TLSVersion.MINIMUM_SUPPORTED
      ssl.SSLContext.options: Options.OP_ALL|OP_NO_SSLv3|OP_CIPHER_SERVER_PREFERENCE|OP_ENABLE_MIDDLEBOX_COMPAT|OP_NO_COMPRESSION
      ssl.SSLContext.protocol: _SSLMethod.PROTOCOL_TLS
      ssl.SSLContext.verify_mode: VerifyMode.CERT_NONE

      ssl.default_https_context.maximum_version: TLSVersion.MAXIMUM_SUPPORTED
      ssl.default_https_context.minimum_version: TLSVersion.MINIMUM_SUPPORTED
      ssl.default_https_context.options: Options.OP_ALL|OP_NO_SSLv3|OP_CIPHER_SERVER_PREFERENCE|OP_ENABLE_MIDDLEBOX_COMPAT|OP_NO_COMPRESSION
      ssl.default_https_context.protocol: _SSLMethod.PROTOCOL_TLS
      ssl.default_https_context.verify_mode: VerifyMode.CERT_REQUIRED

      ssl.stdlib_context.maximum_version: TLSVersion.MAXIMUM_SUPPORTED
      ssl.stdlib_context.minimum_version: TLSVersion.MINIMUM_SUPPORTED
      ssl.stdlib_context.options: Options.OP_ALL|OP_NO_SSLv3|OP_CIPHER_SERVER_PREFERENCE|OP_ENABLE_MIDDLEBOX_COMPAT|OP_NO_COMPRESSION
      ssl.stdlib_context.protocol: _SSLMethod.PROTOCOL_TLS
      ssl.stdlib_context.verify_mode: VerifyMode.CERT_NONE

    2. vstinner commented on Nov 15, 2019

      @vstinner
      MemberAuthor

      Same failure on AMD64 FreeBSD Shared 3.8:
      https://buildbot.python.org/all/#/builders/374/builds/32

      FAIL: test_min_max_version (test.test_ssl.ContextTests)
      FAIL: test_min_max_version_mismatch (test.test_ssl.ThreadedTests)

    3. vstinner commented on Nov 18, 2019

      @vstinner
      MemberAuthor

      And the last one, AMD64 FreeBSD Shared 3.7:
      https://buildbot.python.org/all/#/builders/367/builds/25

      FAIL: test_min_max_version (test.test_ssl.ContextTests)
      FAIL: test_min_max_version_mismatch (test.test_ssl.ThreadedTests)

    4. vstinner commented on Dec 2, 2019

      @vstinner
      MemberAuthor
    5. vstinner commented on Dec 2, 2019

      @vstinner
      MemberAuthor

      Debian and Fedora are already using OPENSSL_CONF=/non-existing-file workaround.

      IMHO test_ssl should be fixed instead. test_ssl should not make assumptions on min/max TLS version.

    6. vstinner commented on Dec 2, 2019

      @vstinner
      MemberAuthor

      Previous attempt:
      #11508 (comment)

      Old Fedora issue, worked around in the Fedora buildbot configuration: bpo-35045.

    7. vstinner commented on Dec 2, 2019

      @vstinner
      MemberAuthor

      I marked bpo-38954 as duplicate of this issue. Copy of its message:
      ---
      This issue is probably duplicate of some other, but I decided to make one new one due to the fact that this affect all Fedora build bots.

      test test_ssl failed
      test_timeout_connect_ex (test.test_ssl.NetworkedTests) ... ok
      ======================================================================
      FAIL: test_min_max_version (test.test_ssl.ContextTests)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/home/buildbot/buildarea/3.8.cstratak-fedora-rawhide-x86_64.lto-pgo/build/Lib/test/test_ssl.py", line 1207, in test_min_max_version
          self.assertEqual(
      AssertionError: <TLSVersion.TLSv1_3: 772> != <TLSVersion.MAXIMUM_SUPPORTED: -1>

      Ran 161 tests in 2.681s
      FAILED (failures=1, skipped=11)
      1 test failed again:
      test_ssl

      Example failure:

      https://buildbot.python.org/all/#/builders/222
      ---

    8. changed the title [-]test_ssl: test_min_max_version() fails on AMD64 FreeBSD Shared 3.x[/-] [+]test_ssl: test_min_max_version() fails on FreeBSD and Fedora[/+] on Dec 2, 2019
    9. pablogsal commented on Dec 2, 2019

      @pablogsal
      Member

      Raising the priority to 'critical' as this is masking all other problems on a significant number of buildbots.

      Christian, could you take a look?

    10. tiran commented on Dec 2, 2019

      @tiran
      Member

      Tomas Orsava is going to provide a PR within the next hour.

    11. miss-islington commented on Dec 2, 2019

      @miss-islington
      Contributor

      New changeset 34864d1 by Miss Islington (bot) (torsava) in branch 'master':
      bpo-38815: Accept TLSv3 default in min max test (GH-NNNN) (GH-17437)
      34864d1

    12. 9 remaining items

    13. vstinner commented on May 18, 2020

      @vstinner
      MemberAuthor

      I'm not sure why, but test_ssl does not pass on FreeBSD and Fedora, so I close the issue.

    14. tiran commented on May 18, 2020

      @tiran
      Member

      Please don't close tickets assigned to an owner without consent.

    15. reopened this on May 18, 2020
    16. vstinner commented on May 18, 2020

      @vstinner
      MemberAuthor

      Please don't close tickets assigned to an owner without consent.

      Can you please elaborate why you reopened the issue?

      The initial "test_ssl: test_min_max_version() fails on FreeBSD and Fedora" issue is now fixed.

      For example, test_ssl pass on AMD64 Fedora Stable LTO 3.x buildbot and it no longer uses the OPENSSL_CONF=/non-existing-file workaround.
      https://buildbot.python.org/all/#/builders/112/builds/850
      "ssl.OPENSSL_VERSION: OpenSSL 1.1.1g FIPS 21 Apr 2020"

      Same for AMD64 FreeBSD Shared 3.x:
      https://buildbot.python.org/all/#/builders/152/builds/852
      "ssl.OPENSSL_VERSION: OpenSSL 1.1.1g 21 Apr 2020"

      If there are remaining new issues, I would prefer to open new issues.

    17. tiran commented on May 18, 2020

      @tiran
      Member

      If you think that a ticket no longer apply, please use the pending status and give me a chance to verify the result. I haven't looked into the issue and I don't have time to do it right now.

    18. taleinat commented on Sep 17, 2020

      @taleinat
      Contributor

      Ping?

    19. sumagnadas commented on Sep 26, 2020

      sumagnadasmannequin
      Mannequin

      still getting this issue on Ubuntu 20.04 with the latest master checkout of cpython

    20. tiran commented on Apr 17, 2021

      @tiran
      Member

      I haven't seen the problem in a while.

    21. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions