syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.69k stars 4.89k forks source link

Hanging during startup #8390

Closed Anntoin closed 7 years ago

Anntoin commented 7 years ago

Description :octocat:

Spacemacs has suddenly started hanging during startup

Reproduction guide :beetle:

Have tried several versions of emacs with clean installs (namely emacs 24.5, 25.1, and snapshot), but still getting this behaviour. Have tried master, develop, and release-0.200 branches. Can get out of it with C-g but it's not in a useable state.

Vanilla emacs starts without issue.

Running ubuntu 16.04. As it's happening with multiple versions of emacs and spacemacs it seems likely it's something in my environment but I can't think of anything that's changed in the last day.

Backtrace :paw_prints:

Debugger entered--Lisp error: (quit)
  call-process("/bin/bash" nil t nil "-l" "-i" "-c" "/usr/bin/printf '__RESULT\\000%s\\000%s' \"${PATH-fc720f1c8507565b0ffec1bd73c059d9}\" \"${MANPATH-fc720f1c8507565b0ffec1bd73c059d9}\"")
  apply(call-process "/bin/bash" nil t nil ("-l" "-i" "-c" "/usr/bin/printf '__RESULT\\000%s\\000%s' \"${PATH-fc720f1c8507565b0ffec1bd73c059d9}\" \"${MANPATH-fc720f1c8507565b0ffec1bd73c059d9}\""))
  exec-path-from-shell-printf("%s\\000%s" ("${PATH-fc720f1c8507565b0ffec1bd73c059d9}" "${MANPATH-fc720f1c8507565b0ffec1bd73c059d9}"))
  exec-path-from-shell-getenvs(("PATH" "MANPATH"))
  exec-path-from-shell-copy-envs(("PATH" "MANPATH"))
  exec-path-from-shell-initialize()
  (progn (exec-path-from-shell-initialize))
  (if (or (spacemacs/system-is-mac) (spacemacs/system-is-linux) (memq window-system (quote (x)))) (progn (exec-path-from-shell-initialize)))
  (condition-case err (if (or (spacemacs/system-is-mac) (spacemacs/system-is-linux) (memq window-system (quote (x)))) (progn (exec-path-from-shell-initialize))) ((debug error) (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" ":init" (error-message-string err)) :error))))
  (condition-case-unless-debug err (if (or (spacemacs/system-is-mac) (spacemacs/system-is-linux) (memq window-system (quote (x)))) (progn (exec-path-from-shell-initialize))) (error (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" ":init" (error-message-string err)) :error))))
  (progn (condition-case-unless-debug err (if (or (spacemacs/system-is-mac) (spacemacs/system-is-linux) (memq window-system (quote (x)))) (progn (exec-path-from-shell-initialize))) (error (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" ":init" (error-message-string err)) :error)))) (condition-case-unless-debug err (run-hooks (quote use-package--exec-path-from-shell--post-init-hook)) (error (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" "post-:init hook" (error-message-string err)) :error)))))
  (if (condition-case-unless-debug err (run-hook-with-args-until-failure (quote use-package--exec-path-from-shell--pre-init-hook)) (error (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" "pre-:init hook" (error-message-string err)) :error)))) (progn (condition-case-unless-debug err (if (or (spacemacs/system-is-mac) (spacemacs/system-is-linux) (memq window-system (quote (x)))) (progn (exec-path-from-shell-initialize))) (error (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" ":init" (error-message-string err)) :error)))) (condition-case-unless-debug err (run-hooks (quote use-package--exec-path-from-shell--post-init-hook)) (error (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" "post-:init hook" (error-message-string err)) :error))))))
  (when (condition-case-unless-debug err (run-hook-with-args-until-failure (quote use-package--exec-path-from-shell--pre-init-hook)) (error (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" "pre-:init hook" (error-message-string err)) :error)))) (condition-case-unless-debug err (if (or (spacemacs/system-is-mac) (spacemacs/system-is-linux) (memq window-system (quote (x)))) (progn (exec-path-from-shell-initialize))) (error (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" ":init" (error-message-string err)) :error)))) (condition-case-unless-debug err (run-hooks (quote use-package--exec-path-from-shell--post-init-hook)) (error (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" "post-:init hook" (error-message-string err)) :error)))))
  (progn (when (condition-case-unless-debug err (run-hook-with-args-until-failure (quote use-package--exec-path-from-shell--pre-init-hook)) (error (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" "pre-:init hook" (error-message-string err)) :error)))) (condition-case-unless-debug err (if (or (spacemacs/system-is-mac) (spacemacs/system-is-linux) (memq window-system (quote (x)))) (progn (exec-path-from-shell-initialize))) (error (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" ":init" (error-message-string err)) :error)))) (condition-case-unless-debug err (run-hooks (quote use-package--exec-path-from-shell--post-init-hook)) (error (ignore (display-warning (quote use-package) (format "%s %s: %s" "exec-path-from-shell" "post-:init hook" (error-message-string err)) :error))))) (if (not (require (quote exec-path-from-shell) nil (quote t))) (ignore (message (format "Cannot load %s" (quote exec-path-from-shell))))))
  (use-package exec-path-from-shell :init (if (or (spacemacs/system-is-mac) (spacemacs/system-is-linux) (memq window-system (quote (x)))) (progn (exec-path-from-shell-initialize))))
  spacemacs-base/init-exec-path-from-shell()
  funcall(spacemacs-base/init-exec-path-from-shell)
  (let* ((pkg-name (eieio-oref pkg (quote :name))) (owner (car (eieio-oref pkg (quote :owners))))) (spacemacs-buffer/message (format "Configuring %S..." pkg-name)) (mapc (function (lambda (layer) (if (configuration-layer/layer-usedp layer) (progn (if (not ...) (spacemacs-buffer/message ...) (spacemacs-buffer/message ...) (condition-case err ... ...)))))) (eieio-oref pkg (quote :pre-layers))) (spacemacs-buffer/message (format "  -> init (%S)..." owner)) (funcall (intern (format "%S/init-%S" owner pkg-name))) (mapc (function (lambda (layer) (if (configuration-layer/layer-usedp layer) (progn (if (not ...) (spacemacs-buffer/message ...) (spacemacs-buffer/message ...) (condition-case err ... ...)))))) (eieio-oref pkg (quote :post-layers))))
  configuration-layer//configure-package([eieio-class-tag--cfgl-package exec-path-from-shell nil (spacemacs-base) nil nil elpa t pre nil nil nil])
  (cond ((eq (quote dotfile) (car (eieio-oref pkg (quote :owners)))) (spacemacs-buffer/message (format "%S is configured in the dotfile." pkg-name))) (t (configuration-layer//configure-package pkg)))
  (cond ((eieio-oref pkg (quote :lazy-install)) (spacemacs-buffer/message (format "%S ignored since it can be lazily installed." pkg-name))) ((and (eieio-oref pkg (quote :excluded)) (not (eieio-oref pkg (quote :protected)))) (spacemacs-buffer/message (format "%S ignored since it has been excluded." pkg-name))) ((null (eieio-oref pkg (quote :owners))) (spacemacs-buffer/message (format "%S ignored since it has no owner layer." pkg-name))) ((not (cfgl-package-enabledp pkg t)) (spacemacs-buffer/message (format "%S is toggled off." pkg-name))) (t (let ((location (eieio-oref pkg (quote :location)))) (cond ((stringp location) (if (file-directory-p location) (setq load-path (cons ... load-path)) (configuration-layer//warning "Location path for package %S does not exists (value: %s)." pkg location))) ((and (eq (quote local) location) (eq (quote dotfile) (car ...))) (setq load-path (cons (file-name-as-directory ...) load-path))) ((eq (quote local) location) (let* ((owner ...) (dir ...)) (setq load-path (cons ... load-path)))))) (if (memq (eieio-oref pkg (quote :location)) (quote (local site built-in))) nil (configuration-layer//activate-package pkg-name)) (cond ((eq (quote dotfile) (car (eieio-oref pkg (quote :owners)))) (spacemacs-buffer/message (format "%S is configured in the dotfile." pkg-name))) (t (configuration-layer//configure-package pkg)))))
  (let ((pkg (configuration-layer/get-package pkg-name))) (cond ((eieio-oref pkg (quote :lazy-install)) (spacemacs-buffer/message (format "%S ignored since it can be lazily installed." pkg-name))) ((and (eieio-oref pkg (quote :excluded)) (not (eieio-oref pkg (quote :protected)))) (spacemacs-buffer/message (format "%S ignored since it has been excluded." pkg-name))) ((null (eieio-oref pkg (quote :owners))) (spacemacs-buffer/message (format "%S ignored since it has no owner layer." pkg-name))) ((not (cfgl-package-enabledp pkg t)) (spacemacs-buffer/message (format "%S is toggled off." pkg-name))) (t (let ((location (eieio-oref pkg (quote :location)))) (cond ((stringp location) (if (file-directory-p location) (setq load-path ...) (configuration-layer//warning "Location path for package %S does not exists (value: %s)." pkg location))) ((and (eq ... location) (eq ... ...)) (setq load-path (cons ... load-path))) ((eq (quote local) location) (let* (... ...) (setq load-path ...))))) (if (memq (eieio-oref pkg (quote :location)) (quote (local site built-in))) nil (configuration-layer//activate-package pkg-name)) (cond ((eq (quote dotfile) (car (eieio-oref pkg ...))) (spacemacs-buffer/message (format "%S is configured in the dotfile." pkg-name))) (t (configuration-layer//configure-package pkg))))))
  (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (spacemacs-buffer/loading-animation) (let ((pkg (configuration-layer/get-package pkg-name))) (cond ((eieio-oref pkg (quote :lazy-install)) (spacemacs-buffer/message (format "%S ignored since it can be lazily installed." pkg-name))) ((and (eieio-oref pkg (quote :excluded)) (not (eieio-oref pkg (quote :protected)))) (spacemacs-buffer/message (format "%S ignored since it has been excluded." pkg-name))) ((null (eieio-oref pkg (quote :owners))) (spacemacs-buffer/message (format "%S ignored since it has no owner layer." pkg-name))) ((not (cfgl-package-enabledp pkg t)) (spacemacs-buffer/message (format "%S is toggled off." pkg-name))) (t (let ((location (eieio-oref pkg ...))) (cond ((stringp location) (if ... ... ...)) ((and ... ...) (setq load-path ...)) ((eq ... location) (let* ... ...)))) (if (memq (eieio-oref pkg (quote :location)) (quote (local site built-in))) nil (configuration-layer//activate-package pkg-name)) (cond ((eq (quote dotfile) (car ...)) (spacemacs-buffer/message (format "%S is configured in the dotfile." pkg-name))) (t (configuration-layer//configure-package pkg)))))) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- packages) pkg-name) (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (spacemacs-buffer/loading-animation) (let ((pkg (configuration-layer/get-package pkg-name))) (cond ((eieio-oref pkg (quote :lazy-install)) (spacemacs-buffer/message (format "%S ignored since it can be lazily installed." pkg-name))) ((and (eieio-oref pkg (quote :excluded)) (not (eieio-oref pkg ...))) (spacemacs-buffer/message (format "%S ignored since it has been excluded." pkg-name))) ((null (eieio-oref pkg (quote :owners))) (spacemacs-buffer/message (format "%S ignored since it has no owner layer." pkg-name))) ((not (cfgl-package-enabledp pkg t)) (spacemacs-buffer/message (format "%S is toggled off." pkg-name))) (t (let ((location ...)) (cond (... ...) (... ...) (... ...))) (if (memq (eieio-oref pkg ...) (quote ...)) nil (configuration-layer//activate-package pkg-name)) (cond ((eq ... ...) (spacemacs-buffer/message ...)) (t (configuration-layer//configure-package pkg)))))) (setq --dolist-tail-- (cdr --dolist-tail--))))
  configuration-layer//configure-packages-2((evil-evilified-state exec-path-from-shell holy-mode hybrid-mode org-plus-contrib))
  configuration-layer//configure-packages((abbrev ac-ispell ace-jump-helm-line ace-link ace-window adaptive-wrap afternoon-theme aggressive-indent alect-themes alert all-the-icons ample-theme ample-zen-theme anaconda-mode ansi-colors anti-zenburn-theme apropospriate-theme archive-mode async auto-compile auto-complete auto-dictionary auto-highlight-symbol auto-yasnippet avy badwolf-theme bind-key bind-map birds-of-paradise-plus-theme bookmark bracketed-paste bubbleberry-theme bundler busybee-theme centered-buffer-mode centered-cursor centered-window-mode cherry-blossom-theme chruby clean-aindent-mode clues-theme coffee-mode col-highlight color-identifiers-mode color-theme-sanityinc-solarized color-theme-sanityinc-tomorrow column-enforce-mode comint company company-anaconda ...))
  configuration-layer/sync()
  (if (not (version<= spacemacs-emacs-min-version emacs-version)) (message (concat "Your version of Emacs (%s) is too old. " "Spacemacs requires Emacs version %s or above.") emacs-version spacemacs-emacs-min-version) (load-file (concat (file-name-directory load-file-name) "core/core-load-paths.el")) (require (quote core-spacemacs)) (spacemacs/init) (spacemacs/maybe-install-dotfile) (configuration-layer/sync) (spacemacs-buffer/display-info-box) (spacemacs/setup-startup-hook) (require (quote server)) (if (server-running-p) nil (server-start)))
  eval-buffer(#<buffer  *load*> nil "/home/.../.emacs.d/init.el" nil t)  ; Reading at buffer position 1302
  load-with-code-conversion("/home/.../.emacs.d/init.el" "/home/.../.emacs.d/init.el" t t)
  load("/home/.../.emacs.d/init" t t)
... Some uncopyable characters
Anntoin commented 7 years ago

Able to get it working with a fresh user account, so something in my normal users environment is causing issues. Any pointers on what it's actually doing and what could be causing this appreciated.

Anntoin commented 7 years ago

Okay, figured this out. I seems like spacemacs sources my ~/.profile and I had been playing around kicking off some background processes there which was causing this hanging behaviour.