STINNER Victor <vstin...@redhat.com> added the comment:
Here is a concrete example of ResourceWarning when debugging/stressing multiprocessing code, I interrupt (CTRL+c) test_resource_tracker while it's running: vstinner@apu$ ./python -m test test_multiprocessing_spawn --fail-env-changed -v -m test_resource_tracker == CPython 3.9.0a0 (heads/master:689830ee62, Jun 26 2019, 23:07:31) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] == Linux-5.1.11-300.fc30.x86_64-x86_64-with-glibc2.29 little-endian == cwd: /home/vstinner/prog/python/master/build/test_python_18573 == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 Run tests sequentially 0:00:00 load avg: 0.32 [1/1] test_multiprocessing_spawn test_resource_tracker (test.test_multiprocessing_spawn.TestResourceTracker) ... ^C /home/vstinner/prog/python/master/Lib/subprocess.py:917: ResourceWarning: subprocess 18576 is still running _warn("subprocess %s is still running" % self.pid, ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/vstinner/prog/python/master/Lib/test/libregrtest/runtest.py:283: ResourceWarning: unclosed file <_io.BufferedReader name=6> return INTERRUPTED ResourceWarning: Enable tracemalloc to get the object allocation traceback == Tests result: INTERRUPTED == Test suite interrupted by signal SIGINT. 1 test omitted: test_multiprocessing_spawn Total duration: 304 ms Tests result: INTERRUPTED ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37380> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com