dgutov / robe

Code navigation, documentation lookup and completion for Ruby
584 stars 37 forks source link

Robe hangs attempting tls connection to server? #113

Closed ddoherty03 closed 6 years ago

ddoherty03 commented 6 years ago

I am running Emacs 25.1.1 (using spacemacs) and a melpa robe version robe-20171116.1249.

When I attempt to do a (robe-jump), emacs hangs. If I set toggle-debug-on-quit, I get this stack trace:

Debugger entered--Lisp error: (quit)
  gnutls-boot(#<process 127.0.0.1> gnutls-x509pki (:priority "NORMAL" :hostname "127.0.0.1" :loglevel 0 :min-prime-bits 256 :trustfiles ("/etc/ssl/certs/ca-certificates.crt") :crlfiles nil :keylist nil :verify-flags nil :verify-error nil :callbacks nil))
  gnutls-negotiate(:process #<process 127.0.0.1> :type gnutls-x509pki :hostname "127.0.0.1")
  open-gnutls-stream("127.0.0.1" #<buffer  *url-http-temp*-983125> "127.0.0.1" 32888)
  network-stream-open-tls("127.0.0.1" #<buffer  *url-http-temp*-983125> "127.0.0.1" 32888 (:type tls :nowait t))
  open-network-stream("127.0.0.1" #<buffer  *url-http-temp*-983125> "127.0.0.1" 32888 :type tls :nowait t)
  url-open-stream("127.0.0.1" #<buffer  *url-http-temp*-983125> "127.0.0.1" 32888 nil)
  url-http-find-free-connection("127.0.0.1" 32888 nil)
  url-http([cl-struct-url "http" nil nil "127.0.0.1" 32888 "//ping/" nil nil t t t] #[128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)"] (nil))
  url-retrieve-internal("http://127.0.0.1:32888//ping/" #[128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)"] (nil) t nil)
  url-retrieve("http://127.0.0.1:32888//ping/" #[128 "\302\303\304p#\210\300\305\240\210\301p\240\207" [(nil) (nil) url-debug retrieval "Synchronous fetching done (%S)" t] 5 "\n\n(fn &rest IGNORED)"] nil t nil)
  url-retrieve-synchronously("http://127.0.0.1:32888//ping/" t)
  robe-retrieve("http://127.0.0.1:32888//ping/")
  robe-request("ping")
  robe-start()
  robe-jump(nil)
  funcall-interactively(robe-jump nil)
  call-interactively(robe-jump)
  (progn (call-interactively handler))
  (condition-case nil (progn (call-interactively handler)) (error nil))
  (let ((handler (if (listp -handler) (car -handler) -handler)) (async (if (listp -handler) (progn (plist-get (cdr -handler) :async))))) (condition-case nil (progn (call-interactively handler)) (error nil)) (if (or (eq async t) (and (fboundp async) (funcall async)) (not (eq old-point (point))) (not (equal old-buffer (current-buffer)))) (progn (throw (quote done) t))))
  (while --dolist-tail-- (setq -handler (car --dolist-tail--)) (let ((handler (if (listp -handler) (car -handler) -handler)) (async (if (listp -handler) (progn (plist-get (cdr -handler) :async))))) (condition-case nil (progn (call-interactively handler)) (error nil)) (if (or (eq async t) (and (fboundp async) (funcall async)) (not (eq old-point (point))) (not (equal old-buffer (current-buffer)))) (progn (throw (quote done) t)))) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- spacemacs-jump-handlers) -handler) (while --dolist-tail-- (setq -handler (car --dolist-tail--)) (let ((handler (if (listp -handler) (car -handler) -handler)) (async (if (listp -handler) (progn (plist-get ... :async))))) (condition-case nil (progn (call-interactively handler)) (error nil)) (if (or (eq async t) (and (fboundp async) (funcall async)) (not (eq old-point (point))) (not (equal old-buffer (current-buffer)))) (progn (throw (quote done) t)))) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (let ((old-buffer (current-buffer)) (old-point (point))) (let ((--dolist-tail-- spacemacs-jump-handlers) -handler) (while --dolist-tail-- (setq -handler (car --dolist-tail--)) (let ((handler (if (listp -handler) (car -handler) -handler)) (async (if (listp -handler) (progn ...)))) (condition-case nil (progn (call-interactively handler)) (error nil)) (if (or (eq async t) (and (fboundp async) (funcall async)) (not (eq old-point ...)) (not (equal old-buffer ...))) (progn (throw (quote done) t)))) (setq --dolist-tail-- (cdr --dolist-tail--)))))
  (catch (quote done) (let ((old-buffer (current-buffer)) (old-point (point))) (let ((--dolist-tail-- spacemacs-jump-handlers) -handler) (while --dolist-tail-- (setq -handler (car --dolist-tail--)) (let ((handler (if ... ... -handler)) (async (if ... ...))) (condition-case nil (progn (call-interactively handler)) (error nil)) (if (or (eq async t) (and ... ...) (not ...) (not ...)) (progn (throw ... t)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (message "No jump handler was able to find this symbol."))
  spacemacs/jump-to-definition()
  funcall-interactively(spacemacs/jump-to-definition)
  call-interactively(spacemacs/jump-to-definition nil nil)
  command-execute(spacemacs/jump-to-definition)

Looks like its trying to negotiate a TLS-secured connection to the robe server, and the server is hanging.

Can you see anything I'm doing wrong?

dgutov commented 6 years ago

Hi!

Any chance you can try reproducing this with base Emacs?

dgutov commented 6 years ago

Do you have any proxy set up, maybe?

ddoherty03 commented 6 years ago

Dmitry,

I have been unable to reproduce the error booting to a pretty bare emacs. Must be something deep.

ddoherty03 commented 6 years ago

Oh, and I have no proxy set up.

dgutov commented 6 years ago

Try asking on Spacemacs's gittter channel, then. And/or bisecting your config.

ddoherty03 commented 6 years ago

Thanks, Dmitry. I'll report back if I figure it out.

Cheers.

ddoherty03 commented 6 years ago

Hmm. After emacs restart, suddenly not hanging. Close this. Must have been cosmic rays.

dgutov commented 6 years ago

OK. You could close it yourself, actually.