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_asyncio: test_create_server_ssl_match_failed() failed on s390x SLES 3.x and logged an unraisable exception
Type: Stage: resolved
Components: asyncio, Tests Versions: Python 3.10
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, kumaraditya, nascheme, vstinner, yselivanov
Priority: normal Keywords:

Created on 2019-06-21 21:08 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (6)
msg346249 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-06-21 21:08
https://buildbot.python.org/all/#/builders/16/builds/3290

test_create_server_ssl_match_failed (test.test_asyncio.test_events.PollEventLoopTests) ...

/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py:321: ResourceWarning: unclosed transport <asyncio.sslproto._SSLProtocolTransport object at 0x3ff9c5d8cd0>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Warning -- Unraisable exception
Exception ignored in: <function _SSLProtocolTransport.__del__ at 0x3ff9e45e5f0>
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py", line 322, in __del__
    self.close()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py", line 317, in close
    self._ssl_protocol._start_shutdown()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py", line 591, in _start_shutdown
    self._abort()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py", line 732, in _abort
    self._transport.abort()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/selector_events.py", line 660, in abort
    self._force_close(None)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/selector_events.py", line 711, in _force_close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/base_events.py", line 711, in call_soon
    self._check_closed()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/base_events.py", line 504, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/selector_events.py:684: ResourceWarning: unclosed transport <_SelectorSocketTransport closing fd=7>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Task was destroyed but it is pending!
task: <Task pending name='Task-443' coro=<BaseSelectorEventLoop._accept_connection2() done, defined at /home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/selector_events.py:191> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x3ff9c54ac90>()]>>

ok
msg361573 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-02-07 10:52
I didn't see the failure recently, I close it.
msg389785 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2021-03-30 03:25
Seems this failure might be back.  At least, the traceback looks quite similar to me.

The buildbot failed with this:

heads/master:85b6b70589, Mar 29 2021, 22:53:15

0:05:26 load avg: 3.95 [426/427] test_tokenize passed (56.0 sec) -- running: test_asyncio (44.8 sec)
0:05:35 load avg: 3.34 [427/427/1] test_asyncio failed (env changed) (54.1 sec)
Warning -- Unraisable exception
Exception ignored in: <function _SSLProtocolTransport.__del__ at 0x3ffa8ecedb0>
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/sslproto.py", line 321, in __del__
    self.close()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/sslproto.py", line 316, in close
    self._ssl_protocol._start_shutdown()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/sslproto.py", line 590, in _start_shutdown
    self._abort()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/sslproto.py", line 731, in _abort
    self._transport.abort()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/selector_events.py", line 680, in abort
    self._force_close(None)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/selector_events.py", line 731, in _force_close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/base_events.py", line 745, in call_soon
    self._check_closed()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
msg389850 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2021-03-30 20:27
It seems to not be specific to S390, same kind of failure on the PPC64LE RHEL8 LTO + PGE 3.x tester:

Exception ignored in: <function _SSLProtocolTransport.__del__ at 0x7fff83777520>
Traceback (most recent call last):                                              
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/sslproto.py", line 321, in __del__
    self.close()                                                                
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/sslproto.py", line 316, in close
    self._ssl_protocol._start_shutdown()                                        
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/sslproto.py", line 590, in _start_shutdown
    self._abort()                                                               
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/sslproto.py", line 731, in _abort
    self._transport.abort()                                                     
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/selector_events.py", line 680, in abort
    self._force_close(None)                                                     
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/selector_events.py", line 731, in _force_close
    self._loop.call_soon(self._call_connection_lost, exc)                       
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/base_events.py", line 745, in call_soon
    self._check_closed()                                                        
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/asyncio/base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')                                  
RuntimeError: Event loop is closed
msg414432 - (view) Author: Kumar Aditya (kumaraditya) * (Python triager) Date: 2022-03-03 11:31
This is outdated as the last failure was almost a year ago. This should be closed or at least marked pending @vstinner.
msg414433 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-03-03 11:57
I failed to reproduce the issue with:

"./python -m test test_asyncio -m test_create_server_ssl_match_failed -F -j50 --fail-env-changed"

It ran 1000 iterations in 5 minutes with a load average of 50 (my laptop has 4 CPU cores: 8 threads).
History
Date User Action Args
2022-04-11 14:59:17adminsetgithub: 81549
2022-03-03 11:57:05vstinnersetstatus: open -> closed
resolution: out of date
messages: + msg414433

stage: resolved
2022-03-03 11:31:26kumaradityasetnosy: + kumaraditya
messages: + msg414432
2021-03-30 20:27:22naschemesetmessages: + msg389850
2021-03-30 03:25:05naschemesetstatus: closed -> open

versions: + Python 3.10, - Python 3.9
nosy: + nascheme

messages: + msg389785
resolution: out of date -> (no value)
stage: resolved -> (no value)
2020-02-07 10:52:28vstinnersetstatus: open -> closed
resolution: out of date
messages: + msg361573

stage: resolved
2019-06-21 21:08:50vstinnercreate