You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running ./python -E -m test --timeout=2700 -R3:3 -u-cpu -j40 test_free_threading.test_monitoring -F, I get a failure every ~50-100 test runs:
0:00:36 load avg: 122.12 [ 55/1] test_free_threading.test_monitoring failed (reference leak)
beginning 6 repetitions. Showing number of leaks (. for 0 or less, X for 10 or more)
123:456
XX. 243
test_free_threading.test_monitoring leaked [2, 4, 3] memory blocks, sum=9
I think the issue is that we rely on Thread.is_alive() instead of joining the threads. I think there are still some objects that may not be freed until the thread is joined (like the handle):
Bug report
When running
./python -E -m test --timeout=2700 -R3:3 -u-cpu -j40 test_free_threading.test_monitoring -F, I get a failure every ~50-100 test runs:I think the issue is that we rely on
Thread.is_alive()instead of joining the threads. I think there are still some objects that may not be freed until the thread is joined (like the handle):cpython/Lib/test/test_free_threading/test_monitoring.py
Lines 65 to 77 in cb59eae
Linked PRs