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.

Author lukasz.langa
Recipients lukasz.langa, pitrou
Date 2017-02-10.04:35:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486701306.85.0.363188055849.issue29519@psf.upfronthosting.co.za>
In-reply-to
Content
Antoine, #28427 introduces a regression. When used with multiprocessing, the WeakValueDictionary in `multiprocessing.util._afterfork_registry` causes the `remove()` to be invoked during `atexit` and then `sys.meta_path` is None, lots of things is None, including the global `_remove_dead_weakref`.

In effect, I'm getting spew like this:

Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7fb2b905e2f0>
Traceback (most recent call last):
  File "/usr/local/fbcode/gcc-4.9-glibc-2.20-fb/lib/python3.6/weakref.py", line 112, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7fb2b905e2f0>
Traceback (most recent call last):
  File "/usr/local/fbcode/gcc-4.9-glibc-2.20-fb/lib/python3.6/weakref.py", line 112, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7fb2b905e2f0>
Traceback (most recent call last):
  File "/usr/local/fbcode/gcc-4.9-glibc-2.20-fb/lib/python3.6/weakref.py", line 112, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7fb2b905e2f0>
Traceback (most recent call last):
  File "/usr/local/fbcode/gcc-4.9-glibc-2.20-fb/lib/python3.6/weakref.py", line 112, in remove
TypeError: 'NoneType' object is not callable

When debugged, this 'NoneType' is `_remove_dead_weakref` (weakref.py:117).

I'm working on a smaller repro, unfortunately this happens as part of a rather large multiprocessing app so this might take a while. Just wanted to let you know, maybe you'll know right away what the problem is.
History
Date User Action Args
2017-02-10 04:35:06lukasz.langasetrecipients: + lukasz.langa, pitrou
2017-02-10 04:35:06lukasz.langasetmessageid: <1486701306.85.0.363188055849.issue29519@psf.upfronthosting.co.za>
2017-02-10 04:35:06lukasz.langalinkissue29519 messages
2017-02-10 04:35:05lukasz.langacreate