classification
Title: test.regrtest: test marked as failed (env changed), but no warning: test_multiprocessing_forkserver
Type: Stage: resolved
Components: Tests Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner
Priority: normal Keywords: patch

Created on 2020-03-16 22:21 by vstinner, last changed 2020-05-18 15:43 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19683 merged vstinner, 2020-04-23 16:10
PR 19687 merged vstinner, 2020-04-23 21:06
Messages (9)
msg364365 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-03-16 22:21
Tests run with --fail-env-changed. test_multiprocessing_forkserver failed with "env changed", but no warning was logged to explain why :-(

PPC64LE RHEL7 3.8:
https://buildbot.python.org/all/#/builders/401/builds/69

./python  ./Tools/scripts/run_tests.py -j 1 -u all -W --slowest --fail-env-changed --timeout=900 -j2 --junit-xml test-results.xml -j10
msg365471 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-01 14:05
Another example: AMD64 RHEL7 LTO 3.7
"1 test altered the execution environment: test_multiprocessing_spawn"
https://buildbot.python.org/all/#/builders/43/builds/138
msg365951 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-07 21:46
Another example with test_asyncio on s390x RHEL7 3.x:
https://buildbot.python.org/all/#/builders/320/builds/410
msg366819 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-20 12:50
Another example: test_asyncio on AMD64 Fedora Stable Clang 3.x
https://buildbot.python.org/all/#/builders/226/builds/630
msg367130 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-23 17:03
New changeset d663d34685e18588748569468c672763f4c73b3e by Victor Stinner in branch 'master':
bpo-39983: Add test.support.print_warning() (GH-19683)
https://github.com/python/cpython/commit/d663d34685e18588748569468c672763f4c73b3e
msg367151 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-23 21:55
New changeset 3340b2a61b458e7087c8c5fea063b1b45e1a4a07 by Victor Stinner in branch '3.8':
bpo-39983: Add test.support.print_warning() (GH-19683) (GH-19687)
https://github.com/python/cpython/commit/3340b2a61b458e7087c8c5fea063b1b45e1a4a07
msg367166 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-24 00:56
Oh nice, my fix worked as expected: "Warning -- Unraisable exception" was logged! But the unraisable exception itself was not logged.

https://buildbot.python.org/all/#/builders/612/builds/292

0:04:02 load avg: 8.11 [421/423/1] test_concurrent_futures failed (env changed) (3 min 39 sec) -- running: test_peg_generator (2 min 3 sec)
Warning -- Unraisable exception
test_cancel (test.test_concurrent_futures.FutureTests) ... ok
test_cancelled (test.test_concurrent_futures.FutureTests) ... ok
(...)
test_first_exception_some_already_complete (test.test_concurrent_futures.ThreadPoolWaitTests) ... ok
test_pending_calls_race (test.test_concurrent_futures.ThreadPoolWaitTests) ... ok
test_timeout (test.test_concurrent_futures.ThreadPoolWaitTests) ... ok

----------------------------------------------------------------------

Ran 193 tests in 219.248s

OK (skipped=6)
msg367169 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-24 02:27
test_concurrent_futures "unraisable exception" may be bpo-39995.
msg369253 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-05-18 15:43
"Warning -- Unraisable exception" is now logged, but the exceptions is not when sys.stderr is redirected. That's better than nothing, so I close the issue.

Moreover, test_multiprocessing_forkserver has been fixed.
History
Date User Action Args
2020-05-18 15:43:16vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg369253

stage: patch review -> resolved
2020-04-24 02:27:18vstinnersetmessages: + msg367169
2020-04-24 00:56:33vstinnersetmessages: + msg367166
2020-04-23 21:55:13vstinnersetmessages: + msg367151
2020-04-23 21:06:21vstinnersetpull_requests: + pull_request19006
2020-04-23 17:03:59vstinnersetmessages: + msg367130
2020-04-23 16:10:34vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request19003
2020-04-20 12:50:06vstinnersetmessages: + msg366819
2020-04-07 21:46:40vstinnersetmessages: + msg365951
2020-04-01 14:05:20vstinnersetmessages: + msg365471
2020-03-16 22:21:11vstinnercreate