[Bug 2091540] Re: ssl test failures with openssl >= 3.4.0

Launchpad Bug Tracker 2091540 at bugs.launchpad.net
Tue Dec 17 21:19:26 UTC 2024


This bug was fixed in the package python-eventlet - 0.36.1-11ubuntu1

---------------
python-eventlet (0.36.1-11ubuntu1) plucky; urgency=medium

  * d/p/openssl-3.4.0-compat.patch: Tweak tests to be compatible
    with new version of OpenSSL (LP: #2091540).

 -- James Page <james.page at ubuntu.com>  Tue, 17 Dec 2024 14:07:00 +0000

** Changed in: python-eventlet (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-eventlet in Ubuntu.
https://bugs.launchpad.net/bugs/2091540

Title:
  ssl test failures with openssl >= 3.4.0

Status in python-eventlet package in Ubuntu:
  Fix Released

Bug description:
  Currently blocking the build of this package in plucky-proposed - it
  looks like the behaviour between Python 3.{12,13) and openssl has
  changed a little - tests are expecting a SSLZeroReturnERror and a
  SSLError is thrown instead with "[SYS] unknown error".

  openssl 3.4.0 is currently in proposed; I've tried with older openssl
  versions and the newer pythons and the previous behaviour is observed.

  ----

  ========================================================= FAILURES =========================================================
  __________________________________________________ SSLTest.test_ssl_close __________________________________________________

  self = <tests.ssl_test.SSLTest testMethod=test_ssl_close>

      def test_ssl_close(self):
          def serve(listener):
              sock, addr = listener.accept()
              sock.recv(8192)
              try:
                  self.assertEqual(b'', sock.recv(8192))
              except greenio.SSL.ZeroReturnError:
                  pass
      
          sock = listen_ssl_socket()
      
          server_coro = eventlet.spawn(serve, sock)
      
          raw_client = eventlet.connect(sock.getsockname())
          client = ssl.wrap_socket(raw_client)
          client.sendall(b'X')
          greenio.shutdown_safe(client)
          client.close()
  >       server_coro.wait()

  tests/ssl_test.py:95: 
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
  eventlet/greenthread.py:225: in wait
      return self._exit_event.wait()
  eventlet/event.py:124: in wait
      result = hub.switch()
  eventlet/hubs/hub.py:310: in switch
      return self.greenlet.switch()
  eventlet/greenthread.py:265: in main
      result = function(*args, **kwargs)
  tests/ssl_test.py:82: in serve
      self.assertEqual(b'', sock.recv(8192))
  eventlet/green/ssl.py:255: in recv
      return self._base_recv(buflen, flags, into=False)
  eventlet/green/ssl.py:282: in _base_recv
      read = self.read(nbytes)
  eventlet/green/ssl.py:196: in read
      return self._call_trampolining(
  eventlet/green/ssl.py:166: in _call_trampolining
      return func(*a, **kw)
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

  self = <eventlet.green.ssl.GreenSSLSocket fd=14, family=2, type=1, proto=0, laddr=('127.0.0.1', 55679)>, len = 8192
  buffer = None

      def read(self, len=1024, buffer=None):
          """Read up to LEN bytes and return them.
          Return zero-length string on EOF."""
      
          self._checkClosed()
          if self._sslobj is None:
              raise ValueError("Read on closed or unwrapped SSL socket.")
          try:
              if buffer is not None:
                  return self._sslobj.read(len, buffer)
              else:
  >               return self._sslobj.read(len)
  E               ssl.SSLError: [SYS] unknown error (_ssl.c:2570)

  /usr/lib/python3.12/ssl.py:1105: SSLError
  --------------------------------------------------- Captured stderr call ---------------------------------------------------
  Traceback (most recent call last):
    File "/home/jamespage/src/upstream/eventlet/eventlet/hubs/poll.py", line 111, in wait
      listener.cb(fileno)
    File "/home/jamespage/src/upstream/eventlet/eventlet/greenthread.py", line 265, in main
      result = function(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/jamespage/src/upstream/eventlet/tests/ssl_test.py", line 82, in serve
      self.assertEqual(b'', sock.recv(8192))
                            ^^^^^^^^^^^^^^^
    File "/home/jamespage/src/upstream/eventlet/eventlet/green/ssl.py", line 255, in recv
      return self._base_recv(buflen, flags, into=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/jamespage/src/upstream/eventlet/eventlet/green/ssl.py", line 282, in _base_recv
      read = self.read(nbytes)
             ^^^^^^^^^^^^^^^^^
    File "/home/jamespage/src/upstream/eventlet/eventlet/green/ssl.py", line 196, in read
      return self._call_trampolining(
             ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/jamespage/src/upstream/eventlet/eventlet/green/ssl.py", line 166, in _call_trampolining
      return func(*a, **kw)
             ^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/ssl.py", line 1105, in read
      return self._sslobj.read(len)
             ^^^^^^^^^^^^^^^^^^^^^^
  ssl.SSLError: [SYS] unknown error (_ssl.c:2570)
  Removing descriptor: 14

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-eventlet/+bug/2091540/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list