Skip to content

CPU intensive python process sometimes launched when atom is closed if this package is installed #310

Closed

Description

@jjmark15

When atom is closed after using autocomplete, a python process launches in the background. This process is CPU intensive and doesn't end, has to be force closed. I am using the Jedi system on Windows 10.

I've been using this as a workaround:

import psutil
from time import sleep

PROCNAME = "python.exe"

for proc in psutil.process_iter():
# check whether the process name matches
if proc.name() == PROCNAME and proc.cpu_percent(interval=0.2) > 20:
cpu = proc.cpu_percent(interval=0.2)
proc.kill()
print(proc.name(), 'stopped ({}%)'.format(cpu))
break
sleep(1)

Activity

  1. warmar commented on May 28, 2017

    @warmar

    +1. This bug has been causing me a lot of problems. FYI I am on Windows 10.

  2. rlam3 commented on May 30, 2017

    @rlam3

    +1

  3. vuki commented on May 30, 2017

    @vuki

    Same problem, Windows 10. Atom was closed hours ago and suddenly I hear fan spinning in my laptop. I'm checking running processes - completion.py from autocomplete-python, 25% of CPU usage. Please fix this.

  4. KappaLambda commented on Jun 21, 2017

    @KappaLambda

    +1
    After closing Atom, there is a Python process with a CPU usage of 15-20%. This makes my PC really slow. Even performing simple tasks, PC lags. The process never stops unless I manually stop it. Reappears when I open again Atom.
    The process is there while working with atom but has no CPU usage(0%). Goes to mentioned usage after exiting atom.
    I am on Windows 10 Creator's Edition.

  5. rlam3 commented on Jun 26, 2017

    @rlam3

    +1000

  6. luxlurer commented on Jul 29, 2017

    @luxlurer

    +1

  7. hodossy commented on Sep 18, 2017

    @hodossy

    +1
    For me closing Atom is not even necessary, however I could not figure out what is triggering the high load.
    I am on Windows 10 too.

  8. christophra commented on Sep 27, 2017

    @christophra

    +1
    Atom : 1.13.1
    Electron: 1.3.13
    Chrome : 52.0.2743.82
    Node : 6.5.0

  9. rlam3 commented on Sep 27, 2017

    @rlam3

    @sadovnychyi We totally love this atom package. But as a community would love your feedback on this. Thanks!

  10. christophra commented on Sep 28, 2017

    @christophra

    How does it work, do I report a separate issue for Linux?

  11. sadovnychyi commented on Sep 28, 2017

    @sadovnychyi
    Member
  12. mattbaker-digital commented on Jan 15, 2018

    @mattbaker-digital

    Also having problems with this, but only on one of my machines. Closing causes the python shell to go into a high CPU state with Atom owning the process and failing to close.

    On some occasions the shell process has become detached from Atom and starts running as a parent process when viewed in the Windows Task Manager, even before I have invoked a close on Atom.

    Python 3.6.4, Windows 10 1709

  13. micahjsmith commented on Apr 29, 2018

    @micahjsmith

    experiencing this as well on python 3.6, macos 10.13.4, atom 1.26.1, autocomplete-python 1.10.5

    even after closing atom, a python3.6 process spawned by autocomplete-python continues to use 100% cpu.

    thanks!

  14. mattbaker-digital commented on Dec 12, 2018

    @mattbaker-digital

    Video of the issue showing command line parameters (Jedi auto-complete):
    https://drive.google.com/file/d/1ll1MIs8MLQuXuTgtUGneFUuwj8FIGfJ3/view

  15. BigIskander commented on Dec 16, 2018

    @BigIskander

    I just edited the file autocompletion.py
    Changed this text:

        def watch(self):
            while True:
                try:
                    sys.stdout, sys.stderr = self.devnull, self.devnull
                    self._process_request(self._input.readline())
                except Exception:
                    ys.stderr = self.stderr
                    sys.stderr.write(traceback.format_exc() + '\n')
                    sys.stderr.flush()
    

    to, this:

        def watch(self):
            while True:
                try:
                    sys.stdout, sys.stderr = self.devnull, self.devnull
                    self._process_request(self._input.readline())
                except Exception:
                    #sys.stderr = self.stderr
                    #sys.stderr.write(traceback.format_exc() + '\n')
                    #sys.stderr.flush()
                    sys.exit(1)
    
    
  16. segevfiner commented on Dec 16, 2018

    @segevfiner
  17. brgsstm commented on Feb 15, 2019

    @brgsstm

    +1 Windows 10 and autocomplete-python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions