test_asyncio.test_subprocess fails with "env changed" on "AMD64 Debian root 3.x" buildbot: unclosed file <_io.FileIO name=11 mode='wb' closefd=True>
Open
Nobody has claimed this yet.
tests
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Time to time, test_asyncio.test_subprocess fails with "env changed" on "AMD64 Debian root 3.x" buildbot.
Example: https://buildbot.python.org/#/builders/2019/builds/114
0:15:58 load avg: 1.70 [450/505/1] test.test_asyncio.test_subprocess failed (env changed)
test_cancel_make_subprocess_transport_exec (test.test_asyncio.test_subprocess.SubprocessPidfdWatcherTests.test_cancel_make_subprocess_transport_exec) ... ok
(...)
test_subprocess_repr (test.test_asyncio.test_subprocess.SubprocessTransportTests.test_subprocess_repr) ... ok
----------------------------------------------------------------------
Ran 81 tests in 10.074s
OK
Warning -- Unraisable exception
Exception ignored while finalizing file <_io.FileIO name=11 mode='wb' closefd=True>:
Traceback (most recent call last):
File "/root/buildarea/3.15.angelico-debian-amd64/build/Lib/test/support/__init__.py", line 948, in gc_collect
gc.collect()
~~~~~~~~~~^^
ResourceWarning: unclosed file <_io.FileIO name=11 mode='wb' closefd=True>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with test/test_asyncio/test_subprocess.py and the test_asyncio.test_subprocess failure shown in the AMD64 Debian buildbot log. Run the relevant test and inspect how subprocess resources are finalized around the failing tests. Done means the intermittent "env changed" failure and unclosed FileIO ResourceWarning no longer occur.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100