Author vstinner
Recipients eryksun, jeremy.kloth, jkloth, nanjekyejoannah, vstinner
Date 2019-09-18.14:26:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568816761.35.0.97078611446.issue37531@roundup.psfhosted.org>
In-reply-to
Content
It seems like the new regrtest design doesn't work as I expected.

Calling popen.kill() + popen.stdout.close() + popen.stderr.close() from a thread B does not always interrupt popen.communicate() in thread A.

See https://bugs.python.org/issue38207#msg352729 for an example on Linux where communicate() still blocks until all child processes complete.

I see different options:

* Revert changes to restore regrtest old design which didn't have these new issues

* Find a way to fix bpo-38207 on all platforms: be able to interrupt communicate() as soon as the process is killed and/or when all pipes are closed.

* Call communicate() with shorter timeout to workaround the blocking communicate() issue (bpo-38207).

* Maybe experiment asyncio which supports asynchronous subprocess.

asyncio subprocess uses overlapped operations which can be cancelled. So maybe it isn't affected by bpo-38207.
History
Date User Action Args
2019-09-18 14:26:01vstinnersetrecipients: + vstinner, jkloth, jeremy.kloth, eryksun, nanjekyejoannah
2019-09-18 14:26:01vstinnersetmessageid: <1568816761.35.0.97078611446.issue37531@roundup.psfhosted.org>
2019-09-18 14:26:01vstinnerlinkissue37531 messages
2019-09-18 14:26:01vstinnercreate