-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Spyder continuously spawns bash processes, hanging the system #23455
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
Comments
Hey @pvir, thanks for reporting. You said:
I don't know why this is happening in your system. I also use Linux (Ubuntu 22.04) and I'm no seeing anything like that, so my guess is that it's related to something in your setup (plus, it hasn't been reported by other Linux users). A workaround for this is to start Spyder from the command line. Let us know if that solves the problem for you. |
The problem likely is coming from spyder/spyder/utils/environ.py Line 106 in 34fc0dd
I'm not really looking for workarounds here (I can just edit out that problematic code for this installation), this bug report is mainly for you to be aware of that on some cases this code seems to cause problems. |
Thanks to the OP for reporting and thanks to all responders. When I start Spyder or just (re-)start a kernel inside the spyder console, this results in hundreds of bash instances that seem to multiply themselves. I tried all steps from the troubleshooting guide apart from installing spyder in a virtual environment. Resetting the configuration or complete fresh install of spyder and the entire python toolchain did not help. |
As a workaround, I've made the following edit to the Spyder installation, and the problem seems to have disappeared: --- spyder/utils/environ.py 2025-01-28 14:01:10.553385181 +0200
+++ spyder/utils/environ.py 2025-01-14 14:33:18.411784314 +0200
@@ -103,7 +110,10 @@
env_var = dict(
[winreg.EnumValue(key, k)[:2] for k in range(num_values)]
)
- elif os.name == 'posix':
+ elif os.name == 'posix' and False: Haven't yet managed to find out what exactly is calling this in a loop on this machine. I've also been using Spyder on another machine with current Fedora 41 without any edits to the installation, but on that machine I do not see the issue for some reason. |
I tried the proposed patch by @pvir and it works on my machine.
However, I do not understand why. |
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
Sometimes Spyder starts spawning an unlimited amount of processes like this, apparently in a busy loop:
which almost completely hangs the system.
To resolve the situation, I have to
pkill -9 spyder
andpkill -9 -f python3.12
, to kill hundreds of spawned bash processes and prevent more from spawning. The python3.12 is that from the same condaforge install as Spyder.What steps reproduce the problem?
This is unclear, but it happens sporadically on one specific system:
Spyder from current condaforge, on RHEL 9.4.
When it occurred, I had started Spyder from gnome-shell, not from terminal. This has now happened not every time I use Spyder on this setup, but relatively often.
Now that I tried it again, Spyder did this after being idle for a few minutes.
What is the expected output? What do you see instead?
Spyder should not be able to get in a state where it spawns bash processes in a busy loop.
Versions
Dependencies
The text was updated successfully, but these errors were encountered: