[issue40327] list(sys.modules.items()) can throw RuntimeError: dictionary changed size during iteration

Nir Soffer report at bugs.python.org
Thu Jul 9 08:40:24 EDT 2020


Nir Soffer <nirsof at gmail.com> added the comment:

Does this really affect only python 3.7?

We see this in RHEL 8.2, using python 3.6.8:
https://bugzilla.redhat.com/show_bug.cgi?id=1837199#c69

Likely caused by:

    lvs = dict(self._lvs)

Without locking. self._lvs is a dict that may contain 1000's of items.

I'm not sure if this is relvant now for upstream, but backport to 3.6 would be useful.

----------
nosy: +nirs

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40327>
_______________________________________


More information about the Python-bugs-list mailing list