coveragepy icon indicating copy to clipboard operation
coveragepy copied to clipboard

COVERAGE_SYSMON_LOG=1 causes a deadlock in test_stdlib[True]

Open nedbat opened this issue 3 weeks ago • 0 comments

Since commit 8b9cecc43a8f2491b3d63f549cc3809a9f2b2b24, the logging in sysmon.py causes a deadlock during the test_stdlib test:

% rm -f /tmp/foo.out; COVERAGE_SYSMON_LOG=1 tox -q -e py314 -- -n 0 -vvv
Skipping tests with Python tracer: Only one core: not running pytrace
ld: warning: duplicate -rpath '/usr/local/pyenv/pyenv/versions/3.14.0/lib' ignored
ld: warning: duplicate -rpath '/opt/homebrew/lib' ignored
Skipping tests with C tracer: Only one core: not running ctrace
=== CPython 3.14.0 (gil) with sys.monitoring (.tox/py314/bin/python) ===
====================================================================== test session starts =======================================================================
platform darwin -- Python 3.14.0, pytest-8.3.5, pluggy-1.6.0 -- /Users/ned/coverage/trunk/.tox/py314/bin/python
cachedir: .tox/py314/.pytest_cache
hypothesis profile 'default'
rootdir: /Users/ned/coverage/trunk
configfile: pyproject.toml
plugins: hypothesis-6.131.18, flaky-3.8.1, xdist-3.6.1
collected 1467 items
run-last-failure: no previously failed tests, not deselecting items.

tests/test_annotate.py::AnnotationGoldTest::test_multi PASSED
tests/test_annotate.py::AnnotationGoldTest::test_annotate_dir PASSED
tests/test_annotate.py::AnnotationGoldTest::test_encoding PASSED
tests/test_annotate.py::AnnotationGoldTest::test_white PASSED
tests/test_annotate.py::AnnotationGoldTest::test_missing_after_else PASSED
tests/test_api.py::ApiTest::test_unexecuted_file PASSED
tests/test_api.py::ApiTest::test_filenames PASSED
tests/test_api.py::ApiTest::test_stdlib[False] PASSED
tests/test_api.py::ApiTest::test_stdlib[True] ^CROOT: [91907] KeyboardInterrupt - teardown started

nedbat avatar Nov 14 '25 13:11 nedbat