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 andrei.avk
Recipients andrei.avk, kj, lukasz.langa, vstinner
Date 2021-11-13.00:49:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1636764560.24.0.782879041917.issue44887@roundup.psfhosted.org>
In-reply-to
Content
I've looked into this and the hang happens on this line:

https://github.com/python/cpython/blob/de3db1448b1b983eeb9f4498d07e3d2f1fb6d29d/Lib/test/test_builtin.py#L2030

So the issue is that on the second run, there's nothing to read on that fd. I've tried using os.stat to check if there's data on the fd, but it returned 0 data in both 1st and 2nd runs.

However, if a small sleep is added before running os.stat, it does return size of data on 1st run and returns 0 on 2nd run, meaning it's possible to avoid the hang and error out instead (is that an improvement?)

This is on MacOS 11.4 Big Sur by the way.

This is my test debug branch:

https://github.com/python/cpython/compare/main...akulakov:Test-check_input_tty-FIX?expand=1
History
Date User Action Args
2021-11-13 00:49:20andrei.avksetrecipients: + andrei.avk, vstinner, lukasz.langa, kj
2021-11-13 00:49:20andrei.avksetmessageid: <1636764560.24.0.782879041917.issue44887@roundup.psfhosted.org>
2021-11-13 00:49:20andrei.avklinkissue44887 messages
2021-11-13 00:49:20andrei.avkcreate