Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipykernel InProcessKernel regression (tests hang) from 6.1.6 -> 6.1.8 #601

Closed
chronitis opened this issue Jan 11, 2021 · 3 comments · Fixed by ipython/ipykernel#578
Closed

Comments

@chronitis
Copy link

chronitis commented Jan 11, 2021

Between 6.1.6 and 6.1.8, there appears to be a regression which causes the ipykernel test suite (specifically, test_kernel::InProcessKernelTests) to hang indefinitely.

# ipykernel 5.4.2, jupyter_client 6.1.8 (same result with 6.1.11)
python3 -m pytest -v

=============================================== test session starts ================================================
platform linux -- Python 3.8.5, pytest-6.2.1, py-1.10.0, pluggy-0.13.1 -- /tmp/venv/lib/python3.8/site-packages/ipykernel/../../../../bin/python
cachedir: .pytest_cache
rootdir: /tmp/venv/lib/python3.8/site-packages/ipykernel
plugins: cov-2.10.1, flaky-3.7.0
collected 112 items                                                                                                

inprocess/tests/test_kernel.py::InProcessKernelTestCase::test_getpass_stream

# hangs here

The testsuite runs normally with jupyter_client pinned to 6.1.6.

(Found by debian autopkgtests while trying to update 6.1.6 -> 6.1.11)

@chronitis
Copy link
Author

chronitis commented Jan 11, 2021

It looks like the relevant change is 06a32c4

In jupyter_client/client.py:start_kernel()

if shell:	
            self.shell_channel.start()	
            self.kernel_info()

was changed to

if shell:
            self.shell_channel.start()

Restoring the self.kernel_info() seems to make the test above work again (although given the commit message describing reworking, I don't know whether this is ultimately a regression in jupyter_client or a bug in ipykernel)

@davidbrochart
Copy link
Member

And in ipykernel it's hanging in https://github.com/ipython/ipykernel/blob/a19319ed86568f321ae97faec9b291a2f205865a/ipykernel/inprocess/blocking.py#L79.
Since this seems to be caused by the new nudging logic, maybe @SylvainCorlay has some ideas?

@davidbrochart
Copy link
Member

I sent a PR in ipykernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants