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 methane
Recipients methane
Date 2019-07-31.09:35:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1564565728.92.0.202188074199.issue37729@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-07-31 09:35:28methanesetrecipients: + methane
2019-07-31 09:35:28methanesetmessageid: <1564565728.92.0.202188074199.issue37729@roundup.psfhosted.org>
2019-07-31 09:35:28methanelinkissue37729 messages
2019-07-31 09:35:28methanecreate