Skip to content

Exception ignored in: <function WeakSet.__init__.<locals>._remove #95959

Closed as not planned
@ssergiienko

Description

@ssergiienko

Bug report

Interpreter ignores KeyboardInterrupt sometimes. Code is single threaded, but heavy concurrent with asyncio.

Currently I observed few a bit different tracebacks:

^CException ignored in: <function WeakSet.__init__.<locals>._remove at 0x7f1b88f96560>
Traceback (most recent call last):
  File "/usr/lib/python3.10/_weakrefset.py", line 39, in _remove
    def _remove(item, selfref=ref(self)):
KeyboardInterrupt:

and

^CException ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f9a363b2290>
Traceback (most recent call last):
  File "/usr/lib/python3.10/weakref.py", line 106, in remove
    def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):
KeyboardInterrupt:

and

^CException ignored in: <function WeakKeyDictionary.__init__.<locals>.remove at 0x7f3e4829c3a0>
Traceback (most recent call last):
  File "/usr/lib/python3.10/weakref.py", line 370, in remove
    def remove(k, selfref=ref(self)):
KeyboardInterrupt:

I've seen #86190 but decided not to reopen it because

  • current issue is for a latest python
  • a bit different traceback (at least one of them)
  • not related to Ansible in any way

Your environment

  • CPython versions tested on: Python 3.10.5 (main, Aug 1 2022, 07:53:20) [GCC 12.1.0] on linux
  • Operating system and architecture: Archlinux

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions