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 dorosch
Recipients dorosch, zd nex
Date 2020-06-29.13:05:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1593435904.92.0.662995087387.issue39672@roundup.psfhosted.org>
In-reply-to
Content
Hello zd nex

After a little research, it became clear that this drop is due to vague garbage collection behavior. As you know, method `__del__` is called by the garbage collector and when this happens there is no guarantee that the rest of the objects are not yet cleaned.

    def __del__(self):
        if not hasattr(self, 'writeback'):
            return
        self.close()

But in the `close` method, synchronization with the disk occurred and objects were created for modules that were no longer in memory and, as a result, method `dump` fell with an error, because when trying to get module `pickle` it was already gone (due to the garbage collector).

Modules/_pickle.c
....
4353     PickleState *st = _Pickle_GetGlobalState();
....

But `_Pickle_GetGlobalState` can't return right result because pickle module was gone from memory by garbage collector.

In this case, you encountered a problem when the C code tried to use a module that was no longer in memory since this module deleted the garbage collector.
History
Date User Action Args
2020-06-29 13:05:04doroschsetrecipients: + dorosch, zd nex
2020-06-29 13:05:04doroschsetmessageid: <1593435904.92.0.662995087387.issue39672@roundup.psfhosted.org>
2020-06-29 13:05:04doroschlinkissue39672 messages
2020-06-29 13:05:04doroschcreate