Issue 30258: [2.7] regrtest: handle child process crash (original) (raw)

Created on 2017-05-03 14:25 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1431 merged vstinner,2017-05-03 14:29
PR 1477 merged vstinner,2017-05-05 08:22
PR 1479 merged vstinner,2017-05-05 09:56
PR 2244 merged vstinner,2017-06-16 11:35
Messages (12)
msg292904 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-03 14:25
In the master branch, regrtest in multiprocess mode handles well crash of child processes. In 2.7, regrtest handles them badly: see issue #30254. Attached PR backports the CHILD_ERROR status from regrtest master and adds code to handle crash (or any non-zero exit code) of the child process (a worker running an unit test).
msg292906 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-05-03 15:07
Victor, you are just incredible!
msg292907 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-03 15:28
New changeset c991eb280e60ed25c68a5332bd8633959e9f7113 by Victor Stinner in branch '2.7': bpo-30258: regrtest handles child process crash (#1431) https://github.com/python/cpython/commit/c991eb280e60ed25c68a5332bd8633959e9f7113
msg292911 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-03 16:05
Ooops, there is a bug in my pushed changed, spotted by Serhiy: > # Strip last refcount output line if it exists, since it # comes from the shutdown of the interpreter in the subcommand. stderr = debug_output_pat.sub("", stderr) + + if retcode != 0: + result = (CHILD_ERROR, "Exit code %s" % retcode) + output.put((test, stdout.rstrip(), stderr.rstrip(), + result)) + Missed return?
msg293078 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-05 08:28
New changeset 228da42961ac9bf2990e6c191ecc9b762ead617c by Victor Stinner in branch '2.7': bpo-30258: Fix handling of child error in regrtest (#1477) https://github.com/python/cpython/commit/228da42961ac9bf2990e6c191ecc9b762ead617c
msg293079 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-05 08:29
@Serhiy: I fixed the bug you found. Don't hesitate to propose directly a PR if I missed something (or open an issue, it's up to you). At least, regrtest of Python 2.7 should now handle correctly crashes when using -jN.
msg293085 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-05-05 09:38
You just pressed the merge button 2 minutes before I finished a review.
msg293086 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-05-05 09:40
Do you mind to port changes to 3.x?
msg293089 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-05 09:56
> You just pressed the merge button 2 minutes before I finished a review. Oh sorry, I didn't expect a review on this small change. > Do you mind to port changes to 3.x? I created https://github.com/python/cpython/pull/1479 for the run_tests_multiprocess() bugfix.
msg293296 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-09 09:34
New changeset 74683fc6247c522ae955a6e7308b8ff51def35d8 by Victor Stinner in branch 'master': bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479) https://github.com/python/cpython/commit/74683fc6247c522ae955a6e7308b8ff51def35d8
msg293829 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-17 00:27
Python 2.7 now has test_regrtest and test_regrtest pass on all 2.7 buildbots, so I close the issue.
msg296190 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-16 12:39
New changeset a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb by Victor Stinner in branch '3.6': Synchronize libregrtest from master to 3.6 (#2244) https://github.com/python/cpython/commit/a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb
History
Date User Action Args
2022-04-11 14:58:46 admin set github: 74444
2017-06-16 12:39:12 vstinner set messages: +
2017-06-16 11:35:58 vstinner set pull_requests: + <pull%5Frequest2291>
2017-05-17 00:27:05 vstinner set status: open -> closedresolution: fixedmessages: +
2017-05-09 09:34:05 vstinner set messages: +
2017-05-05 09:57:03 vstinner set status: closed -> openresolution: fixed -> (no value)
2017-05-05 09:56:57 vstinner set messages: +
2017-05-05 09:56:16 vstinner set pull_requests: + <pull%5Frequest1578>
2017-05-05 09:40:41 serhiy.storchaka set messages: +
2017-05-05 09:38:30 serhiy.storchaka set messages: +
2017-05-05 08:29:56 vstinner set status: open -> closedresolution: fixedmessages: + stage: resolved
2017-05-05 08:28:37 vstinner set messages: +
2017-05-05 08:22:25 vstinner set pull_requests: + <pull%5Frequest1576>
2017-05-03 16:05:48 vstinner set messages: +
2017-05-03 15:28:31 vstinner set messages: +
2017-05-03 15:07:55 serhiy.storchaka set messages: +
2017-05-03 14:29:27 vstinner set pull_requests: + <pull%5Frequest1536>
2017-05-03 14:25:28 vstinner create