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 asvetlov
Recipients asvetlov, cjrh, dontbugme, terry.reedy, yselivanov
Date 2020-02-24.15:37:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582558669.58.0.105246171809.issue38988@roundup.psfhosted.org>
In-reply-to
Content
asyncio doesn't kill subprocess by timeout, that's why test1() doesn't work.
The kill is done by signal sending which is asynchronous. That's why test2 may fail at "FAIL(3)" point sometimes. 
1-second sleep is enough to stop this case, but maybe not enough, say, under high load and for much more complex program than "sleep".

That's how OS works, there is nothing specific for asyncio itself.
You can observe the same using an old good sync approach, written with any programming language. 
Nothing to fix here.
History
Date User Action Args
2020-02-24 15:37:49asvetlovsetrecipients: + asvetlov, terry.reedy, dontbugme, cjrh, yselivanov
2020-02-24 15:37:49asvetlovsetmessageid: <1582558669.58.0.105246171809.issue38988@roundup.psfhosted.org>
2020-02-24 15:37:49asvetlovlinkissue38988 messages
2020-02-24 15:37:49asvetlovcreate