New submission from Inada Naoki <songofaca...@gmail.com>:
gc used several PySys_WriteStderr() calls to write stats. This caused stats mixed up when stderr is shared by multiple threads or processes. Attached file (t.py) demonstrates it. Sometimes stats from two processes are mixed up like this: ``` gc: collecting generation 0... gc: objects in each generation: 782 0 7759 gc: objects in permanent generation: 0gc: collecting generation 0... gc: objects in each generation: 782 0 7764 gc: objects in permanent generation: 0gc: done, 781 unreachable, 0 uncollectable, 0.0001s elapsed gc: done, 781 unreachable, 0 uncollectable, 0.0000s elapsed ``` Writing one stat by one PySys_WriteStderr() reduces this. ---------- components: Interpreter Core files: t.py messages: 348795 nosy: inada.naoki priority: normal severity: normal status: open title: gc: stats from multi process are mixed up versions: Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48523/t.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37729> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com