Closed georgevreilly closed 10 years ago
Just like good old usenet! :-D Thank you for the bug report.
The traceback says that Elpy is trying to get a calltip, and then the backend hangs.
Which backend are you using? (Rope, Jedi, native) Also, which version of Python? (2.x, 3.x)
I have
jedi==0.5b5
rope==0.9.4
elpy==1.0.1
according to pip freeze
. I have no explicit elpy initialization in ~/.emacs.d/init.el
beyond (package-initialize)
and (elpy-enable)
I'm running Python 2.7.4, as installed by brew
Ok, if you haven't changed anything, then M-: (elpy-rpc-get-backend)
should return "rope"
.
What's your project root set to (M-: (elpy-project-root)
)? Is the the root directory of the git repository of pip2pi
? Or are there other files/directories/anything in there?
I tried to reproduce this problem, but it seems to simply work for me.
"rope"
"~/src/pip2pi"
Now I can't reproduce it either, though it repro'd several times last night. I even restarted Emacs a couple of times last night, since I thought at first it might be Evil but I disabled that, and it continued to happen. I reverted commands.py
to the version that caused me problems last night, but it still doesn't repro.
If it happens again, I'll report it. If it does happen, is there other data that I should gather?
Do check the project root again to make sure it didn't get confused about that.
You can check with ps xar
or top
which process it is that causes CPU consumption (should be the python process).
You can use strace -p <pid>
to see what the python process is doing (most likely, nothing, as that only shows syscalls and it will probably be in an infinite loop in Rope somewhere; but maybe it got confused about the project root and is indexing your home directory for possible Python files …)
If it's not doing anything in that trace, you can also use strace -p <pid> -o foo.txt
before reproducing the bug, and then post the trace output here. That might give some hint on what it was doing.
That's all very much stabbing in the dark, though. I wish there was a simple way to hook into a running Python process to get some idea on what it was doing when it did hang. :-|
It repro'd a couple of times in the last half hour. https://gist.github.com/georgevreilly/5745407 has samples from both Emacs.app and the child Python process.
That's strace output on OS X? Fascinating :-D
As Python is stuck in PyEval_EvalFrameEx, I suspect it's indeed stuck evaluating some Rope code.
Any idea what you are doing to reproduce this?
Actually, that's the output from the built-in Activity Monitor. There's no strace, but there is DTrace. Maybe I'll finally learn how to use it.
Every time this has happened, I've been doing something innocuous like moving up and down lines. Obviously, moving around in buffers is something I do thousands of times a day. This CPU utilization problem only started in the last few days. I can't think of anything's that's changed.
My current idea would be that it's a bug in Rope that we can't reproduce, so difficult to debug or report upstream. :-|
As a workaround, you can use the Jedi backend (M-x elpy-set-backend RET jedi RET
). If that also causes those hangs, something else is seriously broken, but I do not know what.
Sorry I can't be of more help here. :-(
If there's a possibility to upgrade to Python 3.3, then you could use the faulthandler module to get a (Python level) stack trace by sending a signal to the Python process when the freeze occurs. That would tell you where exactly it is hanging.
Any new ideas on what has been causing this?
I had forgotten about this, as I have not noticed it for several weeks.
On Fri, Jul 19, 2013 at 11:21 AM, Jorgen Schäfer notifications@github.comwrote:
Any new ideas on what has been causing this?
— Reply to this email directly or view it on GitHubhttps://github.com/jorgenschaefer/elpy/issues/96#issuecomment-21267696 .
I'll close this, then – if it shows up again, do not hesitate to re-open the issue! And thanks for the extensive reports.
Hi, I've seen this issue as well. Emacs is definitely the process that spikes the CPU. I can't definitively assert that it's due to elpy, but I thought I'd keep you informed. The "proximate cause" that causes the CPU to spike is usually cursor movement or hitting C-x C-f (I use ido). The emacs stack traces tend to just show "redisplay_internal" as the top stack frame. I have my machine set up to use the jedi backend by default, but I've explicitly changed it to Rope; I feel like that works sometimes, but eventually I end up back in a slow state. I'm mostly working on the codebase for my job, which is about 6000 lines of Python (so not that big), but pulls in some thirty or forty packages in a virtualenv. I've tried both using and not using virtualenv-workon to specify the virtualenv. Another quirk of our codebase is that we append the project root to PYTHONPATH, which I have had to do manually when working with virtualenv.
Here's the base64-encoded profiler-report of doing C-x C-f and then aborting with C-g a few times.
Cltwcm9maWxlci1wcm9maWxlICIyNC4zIiBjcHUgI3MoaGFzaC10YWJsZSBzaXplIDk3IHRlc3Qg
ZXF1YWwgcmVoYXNoLXNpemUgMS41IHJlaGFzaC10aHJlc2hvbGQgMC44IGRhdGEgKFtuaWwgbmls
IG5pbCBuaWwgbmlsIG5pbCBuaWwgbmlsIG5pbCBuaWwgbmlsIG5pbCBuaWwgbmlsIG5pbCBuaWxd
IDE3NiBbdGltZXItLWFjdGl2YXRlIHRpbWVyLWFjdGl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cgcmVhZC1mcm9tLW1pbmlidWZmZXIgYnl0ZS1jb2RlIGlkby1yZWFkLWlu
dGVybmFsIGlkby1maWxlLWludGVybmFsIGlkby1maW5kLWZpbGUgY2FsbC1pbnRlcmFjdGl2ZWx5
IG5pbCBuaWwgbmlsIG5pbCBuaWxdIDQgW2J5dGUtY29kZSB0aW1lci1ldmVudC1oYW5kbGVyIHJl
YWQtZnJvbS1taW5pYnVmZmVyIGJ5dGUtY29kZSBpZG8tcmVhZC1pbnRlcm5hbCBpZG8tZmlsZS1p
bnRlcm5hbCBpZG8tZmluZC1maWxlIGNhbGwtaW50ZXJhY3RpdmVseSBuaWwgbmlsIG5pbCBuaWwg
bmlsIG5pbCBuaWwgbmlsXSA0IFtieXRlLWNvZGUgdGltZXItZXZlbnQtaGFuZGxlciByZWN1cnNp
dmUtZWRpdCBkZWJ1ZyByZWFkLWZyb20tbWluaWJ1ZmZlciBieXRlLWNvZGUgaWRvLXJlYWQtaW50
ZXJuYWwgaWRvLWZpbGUtaW50ZXJuYWwgaWRvLWZpbmQtZmlsZSBjYWxsLWludGVyYWN0aXZlbHkg
bmlsIG5pbCBuaWwgbmlsIG5pbCBuaWxdIDYgW3Byb2ZpbGVyLWNwdS1sb2cgcHJvZmlsZXItY3B1
LXByb2ZpbGUgcHJvZmlsZXItcmVwb3J0LWNwdSBwcm9maWxlci1yZXBvcnQgY2FsbC1pbnRlcmFj
dGl2ZWx5IGNvbW1hbmQtZXhlY3V0ZSBleGVjdXRlLWV4dGVuZGVkLWNvbW1hbmQgY2FsbC1pbnRl
cmFjdGl2ZWx5IG5pbCBuaWwgbmlsIG5pbCBuaWwgbmlsIG5pbCBuaWxdIDQgW0F1dG9tYXRpY1wg
R0NdIDM3ODgpKSAoMjExNTIgNDY4MjkgNTYyMTY5IDcwNDAwMCkgbmlsXQo=
I have python3.3 on my machine so I could try to run elpy using it (even though our codebase is definitely not py3k safe). Is there an environment variable I could change?
Thank you!
Which version of Emacs are you using?
I'm running:
Pity. They recently broke something in Emacs trunk that might be causing this. But 24.3 should unaffected.
I'm pretty much at a loss here. The profile output doesn't contain any elpy code. Hanging in redisplay should be a C problem, too. I'd love to say "can't reproduce, unlikely to be elpy's fault", but that would be cheating a bit. I'll keep the issue open in case someone can find more information here.
Is there some elpy-minor-mode that is suspect? Somethiing I could try in order to rule something out?
The only thing I can imagine would be the RPC interface doing something really weird. Disabling both auto-complete and eldoc-mode would mean Elpy does not use RPC while moving in a buffer. If you can semi-reliably reproduce this, disabling both of those would be an idea.
Hmm. I haven't hit the problem since disabling those two minor modes. Is there some way to narrow down a cause, or maybe get a log or something?
Hm. I have a suspicion.
I added one (remotely) possible bugfix and some debug output to the issue-96 branch. Could you use that? (It'll be a bit slower and spam your message log, though; might make more sense to log to a separate buffer)
If it still hangs, the debug output should show whether it's running some kind of endless loop with the backend there somehow.
Hmm, took me a little while to figure out how to co-opt package to install elpy@issue-96, but I think I've done it -- I moved elpy-1.2.1 out of the way, symlinked both elpy-1.2.1 and elpy-1.2.50 to elpy-issue96, and copied elpy-autoloads.el from elpy-1.2.1 to elpy-issue96. I'll let you know how it goes!
Oh. You should be able to just add the elpy repository to your load-path
and do a (require 'elpy)
(and add2virtualenv
for the repository to get the python module, too).
Hmm. I've been using it all day and at least it hasn't spiked the CPU. But I just got "Flymake: Configuration error has occurred while running (flake8 /home/ethan/..../filename_flymake.py). Flymake will be switched OFF." I get it every time I open a Python file (i.e. C-x C-f to a file that I haven't already C-x C-f'd to in this session).
From having looked at the changes you introduced, I can't imagine that it's related. Just for fun, I checked *Messages*
and didn't see anything from Flymake (though I do see the elpy-rpc--call messages).
Sorry, this is even weirder than that -- it only shows up in files in certain directories. It looks like the _flymake files are being created correctly with the correct contents, too. It's almost certainly unrelated.
Ah, this is definitely unrelated, it's something to do with my codebase (I have a file called stat.py, which seems to conflict somehow with the stdlib's stat.py).
Actually, just to clarify a little more in case this turns out to be related in some way to the larger problem -- for some reason I have PYTHONPATH=:/home/ethan/some-directory, and flake8 is getting run from the directory with stat.py. flake8, when run in exactly this way, imports os, which imports posixpath, which imports stat, which finds stat because it's first on PYTHONPATH.
That's a different bug definitely. I'm currently on vacation and won't be able look any closer at the moment, could you open a separate issue so I won't forget?
Well, I kind of having the same problem, however it occurs randomly and I just can't reproduce it. Basically emacs would work most of the time, especially when it just started. Then after a while, when it tries to auto-complete, it eats up 100% CPU, you'll have to wait a long time before it becomes responsive to key stroke, and you'll end up with this cycle until emacs crashes.
I have tried to elliminate some minor modes, such as eldoc-mode, flymake-mode, auto-complete-mode, etc, no help. I've set toggle-debug-on-error, or toggle-debug-on-quit, but emacs quits and creates a dumps, I can't see logs.
Here's my environment: Python 2.7.5 (default, Oct 2 2013, 22:34:09) [GCC 4.8.1] on cygwin
dot emacs (I have a very simple setup) (add-to-list 'load-path "~/.emacs.d")
;; Python mode in elpa is not the newest (add-to-list 'load-path "~/.emacs.d/python-mode.el-6.1.2") (load-theme 'wombat t)
(require 'package) (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") ("marmalade" . "http://marmalade-repo.org/packages/") ("melpa" . "http://melpa.milkbox.net/packages/"))) (package-initialize)
(require 'python-mode) (add-hook 'python-mode-hook 'show-paren-mode) (add-hook 'python-mode-hook 'electric-pair-mode)
(when (require 'elpy nil t) (elpy-enable) (elpy-clean-modeline)) (elpy-use-ipython)
Django==1.6.1 Scrapy==0.20.2 Twisted==13.2.0 beautifulsoup4==4.3.2 cssselect==0.9.1 django-debug-toolbar==1.0 elpy==1.2.1 epc==0.0.5 flake8==2.1.0 ipython==1.1.0 jedi==0.7.0 lxml==3.2.4 mccabe==0.2.1 pep8==1.4.6 pyOpenSSL==0.13.1 pyflakes==0.7.3 queuelib==1.1.1 requests==2.1.0 sexpdata==0.0.3 simplejson==3.3.1 six==1.4.1 sqlparse==0.1.10 w3lib==1.5 wsgiref==0.1.2 zope.interface==4.0.5
Sample emacs dump
Stack trace: Frame Function Args 00000427030 0018006F943 (001802DFEA0, 001802DFEA0, 00000427368, 001802E4D28) 00000000006 00180070E0A (00100004000, 00000000000, 00000000234, 00000000000) 00000427210 00180119138 (5E86A32000000006, 00000000000, 00100935481, 0060002D568) 000000000C1 001801161EE (00000427780, 00000000000, 00000000000, 00100488200) 001004881A0 001801166BB (00000000000, 00000000000, 00000000000, 00000000006) 001004881A0 0018011688C (00000000079, 0000042D440, 001801750AB, 001004881A0) 001004881A0 0018011227B (0000042D440, 001801750AB, 001004881A0, 00000000020) 001004881A0 000004275DC (001801750AB, 001004881A0, 00000000020, 00100488200) 001004881A0 00000000079 (001004881A0, 00000000020, 00100488200, 001008C49E0) 001004881A0 0000042D440 (00000000020, 00100488200, 001008C49E0, 00000000001) 001004881A0 001801750AB (00000000001, 000004275DC, 00180137010, 00600E3A400) 001004881A0 0010048819A (00000006D3F, 1FFFFFFFFFFFFFFF, 0000000000C, 001008FB5E6) 001004881A0 0010049FFB3 (001004DE720, 00600BDE460, 0010083A640, 00100FAEE58) 00000000002 00180070E0A (001008DD432, 001008C2AA9, 001004F72A3, 00000000000) 00000427A00 00180112391 (001008C49E0, 001008C49E0, 00600C9ADD8, 00100D92612) 00100C818F2 00000427A48 (001008C49E0, 00600C9ADD8, 00100D92612, 00600F648A6) End of stack trace (more stack frames may be present)
(require 'python-mode)
Hm. Elpy doesn't work with python-mode.el (and actually should throw an error when used in this configuration). Could you re-try without?
Also, which version of Emacs is that?
Yes, I've tried to switch to built-in python.el, it didn't help either. Here a screen shot of the cpu usage. http://imgur.com/zqtsEIB
(However I've never received complaints from using python-mode.el)
My emacs version: GNU Emacs 24.3.1 (x86_64-unknown-cygwin) of 2013-08-20 on moufang Copyright (C) 2013 Free Software Foundation, Inc.
I have no idea why Emacs would hang. elpy doesn't do anything to make it hang to my knowledge. It even breaks out of the busy-lock after a few seconds if it uses that, and for auto-complete/eldoc, it doesn't even busy-block. :-(
Well, let me chime in -- using the "hacked" version of elpy with the minor fix and the logging turned on, I haven't seen elpy hang, so I think that the fix at least helps a lot. I do have one remaining complaint, but it doesn't cause emacs to hang or CPU to spike. Hmm, I think I better open another bug report for that, actually.
The original issue might be related to #154 and #182 – though the user was reporting to have rope installed, which would by default mean they used rope, not jedi. The ticket was reopened, but that user reports the problem solved for now. So closing this.
If this resurfaces with rope, please do not hesitate to re-open this ticket.
FWIW I ran into this problem (Emacs hanging at 100% CPU w/ elpy on cursor up/down) today after I renamed a module called 'stat.py' to 'stats.py' (and was working in this module). Following the hints in this thread I renamed that module to a more innocuous name 'describe.py'. That seems to have solved the problem (for me). Using elpy with rope and flycheck.
I cannot reproduce the problem though by re-creating stat.py and/or stats.py.
@gyst, which versions of Emacs and Elpy are you using?
On 04/05/14 12:08, Jorgen Schäfer wrote:
@gyst https://github.com/gyst, which versions of Emacs and Elpy are you using?
GNU Emacs 24.3.1 elpy-1.3.0
gyst@thor:~$ ls .emacs.d/elpa/ archives/ highlight-indentation-0.5.0/ auto-complete-1.4/ idomenu-0.1/ autofit-frame-readme.txt iedit-0.97/ color-theme-20080305.34/ less-css-mode-20140205.250/ color-theme-solarized-20140401.957/ nose-0.1.1/ dash-20140327.116/ pkg-info-20140313.513/ elpy-1.3.0/ popup-0.5/ epl-20140316.544/ pyvenv-1.1/ f-20140220.21/ s-20131223.944/ find-file-in-project-3.2/ sr-speedbar-20131207.2049/ flycheck-20140328.743/ web-mode-20140325.1631/ flycheck-color-mode-line-20131125.2138/ yasnippet-0.8.0/ fuzzy-0.1/
Guido Stevens | +31.43.3618933 | http://cosent.nl
s o c i a l k n o w l e d g e t e c h n o l o g y
Thank you. Really strange. And it's Emacs that is consuming CPU?
I hate these bugs being so difficult to analyze :-)
On 04/05/14 18:54, Jorgen Schäfer wrote:
Thank you. Really strange. And it's Emacs that is consuming CPU?
Yes it was. Stopped responding, basically, so I looked at top.
I hate these bugs being so difficult to analyze :-)
I felt really bad about submitting a report when I couldn't even reproduce it myself. But then I thought, the other guy had stat problems, moving that module worked for me, it might work for the next guy who's hit by this.
Guido Stevens | +31.43.3618933 | http://cosent.nl
s o c i a l k n o w l e d g e t e c h n o l o g y
Never feel bad about submitting bug reports. Thank you!
On 04/05/14 19:44, Jorgen Schäfer wrote:
Never feel bad about submitting bug reports. Thank you!
Well, thank you! Elpy is a major upgrade of my dev environment :-)
Guido Stevens | +31.43.3618933 | http://cosent.nl
s o c i a l k n o w l e d g e t e c h n o l o g y
I am still experiencing the cpu problem with my new Ubuntu LTS 14.04 box, it's a minimal installation, absolutely only necessary packages are installed.
GNU Emacs 24.3.1, Python 2.7.6, iPython 2.0.0,
;; (autoload 'jedi:setup "jedi" nil t) ;; (setq jedi:setup-keys t) ;; (add-hook 'python-mode-hook 'jedi:setup) ;; (setq jedi:complete-on-dot t)
(when (require 'elpy nil t) (elpy-enable) (elpy-clean-modeline)) (elpy-use-ipython)
(add-hook 'python-mode-hook 'show-paren-mode) (add-hook 'python-mode-hook 'electric-pair-mode)
backports.ssl-match-hostname==3.4.0.2 beautifulsoup4==4.3.2 cffi==0.8.2 cryptography==0.4 cssselect==0.9.1 Django==1.6.4 elpy==1.4.0 epc==0.0.5 filemagic==1.6 flake8==2.1.0 ipython==2.0.0 jedi==0.8.0-final0 log-colorizer==1.6 lxml==3.3.5 mccabe==0.2.1 pep8==1.5.6 pip-tools==0.3.4 psutil==2.1.1 psycopg2==2.5.2 pycparser==2.10 pyflakes==0.8.1 pyOpenSSL==0.14 queuelib==1.1.1 Scrapy==0.22.2 sexpdata==0.0.3 six==1.6.1 South==0.8.4 tornado==3.2.1 Twisted==14.0.0 uWSGI==2.0.4 w3lib==1.5 wdb.server==2.0.0 wdb==2.0.0 zope.interface==4.1.1
archives auto-complete-20140414.2324 autopair-20140311.1211 concurrent-20140303.1635 ctable-20140304.1659 deferred-20140303.1634 elpy-20140501.744 epc-20140323.2054 ess-20140507.2352 find-file-in-project-20140221.557 flymake-cursor-20130822.1032 fuzzy-20131025.2343 highlight-indentation-20131207.835 idomenu-20111122.1048 iedit-20131021.116 jedi-20140321.1323 nginx-mode-20140321.2028 nose-20140501.1740 pastebin-20101125.1955 php-mode-20140502.1051 pony-mode-20140127.846 popup-20140207.1702 python-environment-20140321.1116 pyvenv-20140411.1319 web-mode-20140511.1206 yasnippet-20140511.947
The CPU spike is totally not predictable, I can sometimes use emacs for a while not seeing anything, yet sometimes it's just start hanging no matter what you type. The picture below shows when I was in a parenthesis.
@eN-Joy, could you enable M-x toggle-debug-on-quit
, hit C-g
(possibly a few times) when Emacs hangs like this, and post the resulting backtrace? If that does not produce a backtrace, could you run strace -o foo.txt -f -p 20744
(the PID of the Emacs process), let that run for a few seconds, abort it with C-c
, and post the resulting foo.txt
?
@jorgenschaefer sorry it took me some time to get back. M-x toggle-debug-on-quit
does not always spit messages, so i've tried the strace
way, the dumped file is about 500k, i don't think it can be pasted here. http://ix.io/dbU please let me know what else i can provide. (i promise i'll respond quicker;-)
Thanks for the trace! That looks really weird.
The start of the trace is the normal loop of Emacs that I know: pselect/clock_gettime/rt_sigprocmask. Then it somehow looks like it simply forgets to call pselect, which is what it would need to do to notice input is pending.
This really looks like a bug in Emacs. What version are you using?
You probably should report this using M-x report-emacs-bug
I am using GNU Emacs 24.3.1 on Ubuntu 14.04. Will try report bug later. Thanks!
On 29/06/14 18:09, eN-Joy wrote:
I am using GNU Emacs 24.3.1 on Ubuntu 14.04.
That is exactly the version I'm using as well. Hardly a coincidence.
| This is GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) | of 2014-03-07 on lamiak, modified by Debian
Guido Stevens | +31.43.3618933 | http://cosent.nl
s o c i a l k n o w l e d g e t e c h n o l o g y
Testing the latest pre-release might be an idea if you have the time. This looks a bit like a bug we traced down in Emacs a few weeks ago. Though the behavior was a bit different (only minor hiccups, no real lock-ups).
On 30/06/14 15:56, Jorgen Schäfer wrote:
Testing the latest pre-release might be an idea if you have the time.
Prerelease of elpy, or of emacs?
Guido Stevens | +31.43.3618933 | http://cosent.nl
s o c i a l k n o w l e d g e t e c h n o l o g y
@gyst, oops, sorry for being unclear, I meant the Emacs pre-test.
When I move around in the
dir2pi()
function inlibpip2pi/commands.py
of pip2pi, I reliably get 100% CPU utilization. Elpy 1.0 on Emacs 24.3.1 on OS X 10.7I set
debug-on-quit
and got the traceback below. It's gzipped, then base64-encoded. Sorry, but when I pasted the raw text in, Github Issues failed to save it—undoubtedly because of the 29,000-character lines. And there's no way to attach an arbitrary file.