-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
A Python background process stays opened after closing Spyder in master #7796
Comments
This is probably related to the fact that the old code completion architecture has not been removed yet. It's in our TODO list: #7724. |
I just want to confirm that without killing these background processes in Windows, introspection stop working. I wish I could help more, but I do not understand enough what is going on. |
@ccordoba12 Note that, this does not occur when running in debug mode. I'm under the impression that the LSP client do not have time to close correctly when Spyder is not run in debug mode. |
@ccordoba12 This is still occurring even after the removal of the old architecture. But when running in debug, it is not. Sometimes, the LSP Client takes a long time to close. Like 15-20 sec. |
This seems a hard bug to solve. @jnsebgosselin, do you think we could leave this for beta3? I mean, it's definitely annoying but not critical. |
@ccordoba12 This problem is not happening if I run Spyder from my Anaconda env with |
Ok, so the problem is with the latest |
With the latest pyls (>0.19), introspection simply doesn't work at all or make Spyder crash, whether in pip or Anaconda.. The problem I've reported here happens on Windows with pyls==0.19, but I think this is an issue that is specific to my pip install. The problem doesn't occur with Anaconda also using pyls==0.19. |
As part of #8153 I believe I likely reproduced the same problem, since I was upgrading and downgrading with |
@dalthviz, are you able to reproduce this with PyLS 0.19? |
I have been able to, although it doesn't always make completion stop working at least in my limited testing. |
Ok, thanks! I'm moving this to beta3 because I think we need to address this in PyLS itself. |
today, I don't see this, using PyLS-0.22.0 and spyder master of 2 days ago. |
I haven't really seen this either recently that I recall over the past few weeks with 0.21. |
Ok, that's good to know. @jnsebgosselin? |
This has stopped to be a problem for me the day I started to use conda instead of pip to setup my Python environments. So, for me, it is not a problem anymore, but I don't know exactly what fixed what. |
Ok, thanks for the confirmation. Let's close this one for the time being. |
For the record, I've used |
All - this still happens. I am using Spyder 4 and after closing had 6 python.exe processes open (that appeared to have each accumulated after separate Spyder instances). |
@pbower Which Spyder 4 beta or dev version are you using? What is your OS and PyLS versions and how did you install them (pip, conda-forge, As of Beta 6 (and consistently in previous betas since this issue was first reported), I indeed have had 3 processes stick around indefinitely each time after Spyder crashes, but I haven't noticed it happen if Spyder exits cleanly. The three are Spyder's LSP transport (I assume the client), the PyLS server, and the Jedi subprocess of the server, and depending on use occupy anywhere from 100 MB to well over half a GB of RAM per triplet. I cannot be 100% sure this occurs on the latest Beta 7 as I'm not sure if it has crashed yet, but next time Spyder crashes I will check. From what I can tell, it looks like the Beta 6 processes are running under the window-mode |
Hi there,
Thanks for looking into this issue.
I am using 4.0.0.b5
Installed via conda
OS is windows 10 and python is 3.7.3
It did appear to be crash related - as screens completely locked up and froze until I closed via the task manager. This is when I noticed it.
If you require any more info please let me know.
Cheers
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: CAM Gerlach <notifications@github.com>
Sent: Thursday, October 24, 2019 11:41:17 AM
To: spyder-ide/spyder <spyder@noreply.github.com>
Cc: Peter <doctor_bower@hotmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [spyder-ide/spyder] A Python background process stays opened after closing Spyder in master (#7796)
@pbower<https://github.com/pbower> Which Spyder 4 beta or dev version are you using? What is your OS and PyLS versions and how did you install them (pip, conda-forge, spyder-ide channel, etc))?
As of Beta 6 (and consistently in previous betas since this issue was first reported), I indeed have had 3 processes stick around indefinitely each time after Spyder crashes, but I haven't noticed it happen if Spyder exits cleanly. The three are Spyder's LSP transport (I assume the client), the PyLS server, and the Jedi subprocess of the server, and depending on use occupy anywhere from 100 MB to well over half a GB of RAM per triplet.
I cannot be 100% sure this occurs on the latest Beta 7 as I'm not sure if it has crashed yet, but next time Spyder crashes I will check. From what I can tell, it looks like the Beta 6 processes are running under the window-mode pythonw while the Beta 7 processes appear to be running under the standard command-line python. I'm running PyLS 0.28.3 with all deps from spyder-ide, no pip installs like before.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#7796?email_source=notifications&email_token=AI27BYT7CPCRQWGFYF2QRMDQQDVK3A5CNFSM4FSVYHIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECDJYXI#issuecomment-545692765>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI27BYWGGSOFF5VFRGP4LXLQQDVK3ANCNFSM4FSVYHIA>.
|
Also I should add even normally python runs Spyder runs with 6 python.exe processes? Is there a reason for this? No ones put a bitcoin miner in there that persists after shutdown have they 😂
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Peter Bower <doctor_bower@hotmail.com>
Sent: Thursday, October 24, 2019 2:08:10 PM
To: spyder-ide/spyder <reply@reply.github.com>; spyder-ide/spyder <spyder@noreply.github.com>
Cc: Mention <mention@noreply.github.com>
Subject: Re: [spyder-ide/spyder] A Python background process stays opened after closing Spyder in master (#7796)
Hi there,
Thanks for looking into this issue.
I am using 4.0.0.b5
Installed via conda
OS is windows 10 and python is 3.7.3
It did appear to be crash related - as screens completely locked up and froze until I closed via the task manager. This is when I noticed it.
If you require any more info please let me know.
Cheers
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: CAM Gerlach <notifications@github.com>
Sent: Thursday, October 24, 2019 11:41:17 AM
To: spyder-ide/spyder <spyder@noreply.github.com>
Cc: Peter <doctor_bower@hotmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [spyder-ide/spyder] A Python background process stays opened after closing Spyder in master (#7796)
@pbower<https://github.com/pbower> Which Spyder 4 beta or dev version are you using? What is your OS and PyLS versions and how did you install them (pip, conda-forge, spyder-ide channel, etc))?
As of Beta 6 (and consistently in previous betas since this issue was first reported), I indeed have had 3 processes stick around indefinitely each time after Spyder crashes, but I haven't noticed it happen if Spyder exits cleanly. The three are Spyder's LSP transport (I assume the client), the PyLS server, and the Jedi subprocess of the server, and depending on use occupy anywhere from 100 MB to well over half a GB of RAM per triplet.
I cannot be 100% sure this occurs on the latest Beta 7 as I'm not sure if it has crashed yet, but next time Spyder crashes I will check. From what I can tell, it looks like the Beta 6 processes are running under the window-mode pythonw while the Beta 7 processes appear to be running under the standard command-line python. I'm running PyLS 0.28.3 with all deps from spyder-ide, no pip installs like before.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#7796?email_source=notifications&email_token=AI27BYT7CPCRQWGFYF2QRMDQQDVK3A5CNFSM4FSVYHIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECDJYXI#issuecomment-545692765>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI27BYWGGSOFF5VFRGP4LXLQQDVK3ANCNFSM4FSVYHIA>.
|
Yes, completely normal, like any modern multiprocess application and this is A Good Thing™. Looking at them in a task manager you can figure out what each is: Python launcher, main Spyder process, LSP server, LSP client, Jedi completion engine, and the IPython kernel that powers the default Console. An additional Python process will be launched for each kernel you start, and there are usually at least a few QtWebEngine processes that render the documentation in the help pane for the Editor and each Console. |
Oh ok great thanks. So it’s just that on crash something isn’t quitting.
Thanks for that.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: CAM Gerlach <notifications@github.com>
Sent: Thursday, October 24, 2019 9:08:32 PM
To: spyder-ide/spyder <spyder@noreply.github.com>
Cc: Peter <doctor_bower@hotmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [spyder-ide/spyder] A Python background process stays opened after closing Spyder in master (#7796)
Yes, completely normal, like any modern multiprocess application and this is A Good Thing™. Looking at them in a task manager you can figure out what each is: Python launcher, main Spyder process, LSP server, LSP client, Jedi completion engine, and the IPython kernel that powers the default Console. An additional Python process will be launched for each kernel you start, and there are usually at least a few QtWebEngine processes that render the documentation in the help pane for the Editor and each Console.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#7796?email_source=notifications&email_token=AI27BYUYYUZ46TLV52OCNFTQQFX2BA5CNFSM4FSVYHIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECEPRXQ#issuecomment-545847518>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI27BYWBEHSH5RHQB2L57CTQQFX2BANCNFSM4FSVYHIA>.
|
For the record, this is being worked on in PR #10111. |
Issue Report Checklist
Problem Description
After opening Spyder in master with the
bootstrap.py
or from the Anaconda navigator and closing it, a Python process remains opened in Windows. Introspection becomes broken by this until I close these background processes and restart Spyder. So this is probably related with the problems I reported in Issue #7726.Note that this is not occurring with the 3.x branch.
What steps reproduce the problem?
What is the expected output? What do you see instead?
All Python processes started by Spyder should be closed
Versions
Dependencies
The text was updated successfully, but these errors were encountered: