Skip to content

Shut down leaked executors in test_interpreter_pool#153780

Open
StanFromIreland wants to merge 1 commit into
python:mainfrom
StanFromIreland:inter-shutdown
Open

Shut down leaked executors in test_interpreter_pool#153780
StanFromIreland wants to merge 1 commit into
python:mainfrom
StanFromIreland:inter-shutdown

Conversation

@StanFromIreland

Copy link
Copy Markdown
Member

Several tests created an InterpreterPoolExecutor and never shut it down, so their worker threads were only cleaned up whenever the garbage collector happened to destroy the abandoned executor. On the slow buildbot that took longer than the 1-second limit threading_cleanup() allows in tearDown, for example in this run:

test_submit_func_globals (test.test_concurrent_futures.test_interpreter_pool.InterpreterPoolExecutorTest.test_submit_func_globals) ... Warning -- threading_cleanup() failed to clean up threads in 1.0 seconds
Warning --   before: thread count=0, dangling=1
Warning --   after: thread count=1, dangling=2
Warning -- Dangling thread: <Thread(InterpreterPoolExecutor-57_0, stopped 273622737248)>
Warning -- Dangling thread: <_MainThread(MainThread, started 273774698528)>
test_submit_local_instance (test.test_concurrent_futures.test_interpreter_pool.InterpreterPoolExecutorTest.test_submit_local_instance) ... Warning -- threading_cleanup() failed to clean up threads in 1.0 seconds
Warning --   before: thread count=0, dangling=1
Warning --   after: thread count=1, dangling=2
Warning -- Dangling thread: <Thread(InterpreterPoolExecutor-62_0, stopped 273622737248)>
Warning -- Dangling thread: <_MainThread(MainThread, started 273774698528)>
Re-running test.test_concurrent_futures.test_interpreter_pool in verbose mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant