Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Hangs caching JVM class names #25

Open
mjwillson opened this Issue Jan 23, 2013 · 8 comments

Comments

Projects
None yet
3 participants

I've noticed lengthy slowdowns before while ac-nrepl is 'caching JVM class names', but recently found a show-stopper where this hangs indefinitely (I just left it overnight) after adding "(use 'clj-stacktrace.repl)" to :repl-options :init in my .lein/profiles.clj.

Not sure whether this is ac-nrepl's fault or clj-stacktraces (so I opened mmcgrana/clj-stacktrace#18 too), but in general it might be good to put some kind of timeout or limits on this caching business, or do it in a separate thread (no idea if this is possible!) since it seems to block the emacs UI pretty severely with a killall emacs24 being the only way I found to interrupt it.

(If it's doing something recursive, perhaps it needs some recursion depth limit or cycle avoidance logic?)

Owner

purcell commented Jan 23, 2013

Strange indeed. There's no recursion going on, and this step usually completes in just a few seconds, even with a pretty full classpath. When I get chance, I'll see if I can duplicate this, but I'm a bit snowed under right now. :-/

Huh, strange. Cheers for the input anyway. Let me know if there's anything I can do to instrument the code and see what's going on -- at present I have to restart emacs though.

Owner

purcell commented Jan 24, 2013

Okay, so I added the clj-stacktrace snippet to my profiles.clj, and I still can't reproduce the error. Are you using the snippet currently described at https://github.com/mmcgrana/clj-stacktrace ? The version of that snippet for Lein 2.x doesn't include (use 'clj-stacktrace.repl), so maybe you need to update that in your profiles.clj?

-Steve

Owner

purcell commented Jan 28, 2013

@mjwillson Can you confirm if that was the issue?

I'm using the injections snippet from those docs but also (use 'clj-stacktrace.repl), because I wanted to have the modified pst/print-stack-trace etc available from the REPL, but their snippet just re-binds it within the clojure.stracktrace namespace.

Apologies if this is a fiddly one to track down, I've disabled the snippet for now to get some work done, but if I get time I'll poke around a bit more. Perhaps it's a bug in complete.core, in fact, since it seems you're just calling through to that.

vemv commented Mar 28, 2013

So I'm experiencing this issue too - emacs freezes when ac-nrepl tries to cache JVM names. I should note that I just upgraded from an old version emacs24 snapshot (the last one available for ubuntu 10.10) to a very recent one (that included with ubuntu 13.04 beta).

It only happens when using my complete emacs setup which uses a fair amount of plugins, config etc. With this absolute minimal setup for Clojure, the issue disappears.

@mjwillson, perhaps you'd be interested in trying to reproduce the issue using the minimal setup I provided (or an equivalent one) + your profiles.clj.

vemv commented Mar 28, 2013

Using an emacs snapshot rather than the version provided by ubuntu 13.04 solved the issue for me.

Owner

purcell commented Apr 19, 2013

I wanted to note here that it seems there was an auto-complete issue (auto-complete/auto-complete#153) which caused similar hanging issues with EDTS (an Erlang helper mode with a similar socket-based backend process): the related comments at the end of the EDTS README sound very familiar...

-Steve

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