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 jkloth
Recipients eryksun, jkloth, vstinner
Date 2022-02-13.04:29:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644726586.19.0.306762647891.issue46716@roundup.psfhosted.org>
In-reply-to
Content
I've been able locally to reproduce the test_subprocess hang.  The responsible function is subprocess.run().  The test case, test_timeout(), uses a small timeout value (0.0001), which, when given enough load, can cause the run() call to hang.

A judicious use of prints in subprocess.py, reveals that the timeout passed to wait() ends up being negative.  That value, once cast to a DWORD, ultimately causes a very long wait (0xfffffff2, in my testing).

It does seem that only the Windows Popen._wait() cannot handle negative timeout values, so the fix should be as simple as coercing the timeout values to >= 0.
History
Date User Action Args
2022-02-13 04:29:46jklothsetrecipients: + jkloth, vstinner, eryksun
2022-02-13 04:29:46jklothsetmessageid: <1644726586.19.0.306762647891.issue46716@roundup.psfhosted.org>
2022-02-13 04:29:46jklothlinkissue46716 messages
2022-02-13 04:29:46jklothcreate