[issue47077] test_asyncio ignores exception in _ProactorBasePipeTransport.__del__: RuntimeError('Event loop is closed')

2022-03-24 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Perhaps the proactor should just silently skip protocol events if the event 
loop is closed.
Selector-based event loops do it implicitly already.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue47077] test_asyncio ignores exception in _ProactorBasePipeTransport.__del__: RuntimeError('Event loop is closed')

2022-03-20 Thread STINNER Victor


New submission from STINNER Victor :

AMD64 Windows8.1 Refleaks 3.x:
https://buildbot.python.org/all/#/builders/511/builds/274

Logs (reformatted manually):
---
0:52:04 load avg: 4.31 [147/433/1] test_asyncio failed (env changed) (41 min 6 
sec) -- running: test_io (3 min 8 sec)
beginning 6 repetitions
123456
.

Executing 
 cb=[_run_until_complete_cb() at 
D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\asyncio\base_events.py:180]
 created at 
D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\unittest\async_case.py:89>
 took 0.125 seconds

Executing 
 took 0.141 seconds

..

Executing 
 took 0.110 seconds

D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\inspect.py:3030: 
ResourceWarning: unclosed 
  arg_val = next(arg_vals)

ResourceWarning: Enable tracemalloc to get the object allocation traceback
D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\asyncio\proactor_events.py:115:
 ResourceWarning: unclosed transport <_ProactorSocketTransport fd=-1 
read=<_OverlappedFuture cancelled>>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)

ResourceWarning: Enable tracemalloc to get the object allocation traceback

Warning -- Unraisable exception
Exception ignored in: 
Traceback (most recent call last):
  File 
"D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\asyncio\proactor_events.py",
 line 116, in __del__
self.close()

  File 
"D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\asyncio\proactor_events.py",
 line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
^^
  File 
"D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\asyncio\base_events.py", 
line 758, in call_soon
self._check_closed()

  File 
"D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\asyncio\base_events.py", 
line 519, in _check_closed
raise RuntimeError('Event loop is closed')
^^
RuntimeError: Event loop is closed

.

Executing .foo() running at 
D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\test\test_asyncio\test_waitfor.py:133>
 wait_for=
 cb=[_release_waiter()() at 
D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\asyncio\tasks.py:421] 
created at 
D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\asyncio\tasks.py:374> 
took 0.109 seconds

.

Executing 
 cb=[_run_until_complete_cb() at 
D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\asyncio\base_events.py:180]
 created at 
D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\unittest\async_case.py:89>
 took 0.125 seconds

Executing 
 wait_for=
 cb=[_run_until_complete_cb() at 
D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\asyncio\base_events.py:180]
 created at 
D:\buildarea\3.x.ware-win81-release.refleak\build\Lib\unittest\async_case.py:89>
 took 0.141 seconds

.
---

--
components: Tests, asyncio
messages: 415657
nosy: asvetlov, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: test_asyncio ignores exception in _ProactorBasePipeTransport.__del__: 
RuntimeError('Event loop is closed')
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com