Avoid starting IOPub background thread after it's been stopped#1137
Merged
Conversation
loop.add_callback(loop.stop) called before the thread starts can get consumed by the run_sync before loop.start, so it won't close the loop.
Contributor
|
Hmm it looks like this failure is related, it happened twice in a row: FAILED ipykernel/inprocess/tests/test_kernelmanager.py::InProcessKernelManagerTestCase::test_interface - pytest.PytestUnhandledThreadExceptionWarning: Exception in thread IOPub
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/home/runner/work/ipykernel/ipykernel/sdist/test/ipykernel/iostream.py", line 98, in _thread_main
self.io_loop.run_sync(_cancel)
File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/tornado/ioloop.py", line 526, in run_sync
raise TimeoutError("Operation timed out after %s seconds" % timeout)
TimeoutError: Operation timed out after None seconds |
This was referenced Sep 2, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
loop.add_callback(loop.stop)called before the thread starts can get consumed by the run_sync before loop.start, so it won't close the loop. This is causing some tests to hang (e.g. ipython downstream tests), but isn't likely to affect any users at runtime.The run_sync was added in #1125