Richard Purdie <richard.pur...@linuxfoundation.org> added the comment:

This is a production backtrace after I inserted code to traceback if tid was 
already in _blocking_on. It is being triggered by a warning about an unclosed 
asyncio event loop and confirms my theory about nested imports, in the 
production case I'd guess being triggered by gc given the __del__.

  File 
"/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/classes/base.bbclass",
 line 26, in oe_import
    import oe.data
  File "<frozen importlib._bootstrap>", line 1024, in _find_and_load
  File "<frozen importlib._bootstrap>", line 171, in __enter__
  File 
"/home/pokybuild/yocto-worker/oe-selftest-fedora/build/bitbake/lib/bb/cooker.py",
 line 168, in acquire
    return orig_acquire(self)
  File "<frozen importlib._bootstrap>", line 110, in acquire
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 685, in __del__
    _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)
  File "/usr/lib64/python3.10/warnings.py", line 112, in _showwarnmsg
    _showwarnmsg_impl(msg)
  File "/usr/lib64/python3.10/warnings.py", line 28, in _showwarnmsg_impl
    text = _formatwarnmsg(msg)
  File "/usr/lib64/python3.10/warnings.py", line 128, in _formatwarnmsg
    return _formatwarnmsg_impl(msg)
  File "/usr/lib64/python3.10/warnings.py", line 56, in _formatwarnmsg_impl
    import tracemalloc
  File "<frozen importlib._bootstrap>", line 1024, in _find_and_load
  File "<frozen importlib._bootstrap>", line 171, in __enter__
  File 
"/home/pokybuild/yocto-worker/oe-selftest-fedora/build/bitbake/lib/bb/cooker.py",
 line 167, in acquire
    bb.warn("\n".join(traceback.format_stack()))

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue47195>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to