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

Kernel fails to send config sometimes #13164

Closed
10 tasks
impact27 opened this issue Jul 2, 2020 · 6 comments · Fixed by #13166
Closed
10 tasks

Kernel fails to send config sometimes #13164

impact27 opened this issue Jul 2, 2020 · 6 comments · Fixed by #13166
Projects
Milestone

Comments

@impact27
Copy link
Contributor

impact27 commented Jul 2, 2020

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

The kernel is supposed to send the config when opening:

https://github.com/spyder-ide/spyder-kernels/blob/05476b35cf9e55787521c43f91dd5eedcb56c7a2/spyder_kernels/comms/frontendcomm.py#L183

But sometimes it doesn't! And it is known because I added this line:

https://github.com/spyder-ide/spyder-kernels/blob/05476b35cf9e55787521c43f91dd5eedcb56c7a2/spyder_kernels/comms/frontendcomm.py#L163

Which solves this exact problem.

I found a workaround in #12134 that I could include in a standalone PR. But the problem remains: it should not be needed.

What steps reproduce the problem?

  1. The kernel connects to the comm but fails to send the configuration
  2. The kernel sends a blocking request to the frontend (debugging / runfile / ...)
  3. The frontend doesn't know the port to which the reply should be sent and the kernel is not listening to the shell channel (because it is waiting for a reply)

What is the expected output? What do you see instead?

This causes a comm timeout error. I have no idea why the kernel fails to send the config.

Solutions

1 - Figure out why the config is not sent
2 - Always send the config with every message

Versions

  • Spyder version:
  • Python version:
  • Qt version:
  • PyQt version:
  • Operating System name/version:

Dependencies

PASTE DEPENDENCIES HERE
@ccordoba12
Copy link
Member

ccordoba12 commented Jul 2, 2020

I found a workaround in #12134 that I could include in a standalone PR

Please do, so I can include it for 4.1.4.

But the problem remains: it should not be needed.

Perhaps things could be solved if we moved to use the control channel instead of our own (dedicated) commsn channel? I say it because that channel is present by default (which could be part of the issue, since we have to create our comms channel).

@impact27
Copy link
Contributor Author

impact27 commented Jul 2, 2020

@ccordoba12
Copy link
Member

Thanks a lot @impact27!

@impact27
Copy link
Contributor Author

impact27 commented Jul 2, 2020

#13166

@impact27
Copy link
Contributor Author

impact27 commented Jul 4, 2020

I think #13174 is a more reliable way of fixing this issue

@ccordoba12 ccordoba12 reopened this Jul 5, 2020
@ccordoba12
Copy link
Member

Ok, thanks for your work on this. I'll review it and try to include it for 4.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v4.1.4
Release
Development

Successfully merging a pull request may close this issue.

2 participants