Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spacemacs freezes on startup when running in GUI on FreeBSD #3887

Closed
cubranic opened this issue Nov 20, 2015 · 6 comments
Closed

Spacemacs freezes on startup when running in GUI on FreeBSD #3887

cubranic opened this issue Nov 20, 2015 · 6 comments
Labels
FreeBSD Reported upstream stale marked as a stale issue/pr (usually by a bot) updated This issue has been updated since becoming stale

Comments

@cubranic
Copy link

Running the PC-BSD distribution of FreeBSD (v10.2), when I start Spacemacs GUI (emacs from xterm), it seems to get stuck part way through the startup. The window does not refresh, but when I press C-g in Spacemacs, it displays the message "waiting for process to die... (type C-g to kill it instantly)"; pressing C-g again gets the UI to respond again, but the initialization doesn't seem to be complete, as many key bindings (e.g., SPC f f) aren't recognized. Most visibly, neither helm nor which-key seem to be active.

Spacemacs config is just a fresh checkout from github, no customization of my own. It happens with both the full and minimal installation.

This does not happen when running a text UI (emacs -nw), or daemonized Emacs with GUI emacsclient frames.

In top, when Emacs is stuck in the initialization, I can see a bash process running at 100% CPU. With ps, I can see the following entry for that process:

16722  -  Rs   0:11.06 /usr/local/bin/bash -l -i -c /usr/bin/printf '__RESULT\\000%s\\000%s' "${PATH-b9168ac2b328329c18cfb441f9af2938}" "${MANPATH-b9168ac2b328329c18cfb441f9af2938}"

This is almost certainly the process that Emacs is stuck waiting on, because the process disappears after C-g C-g. The only place where I can find anything resembling this in the source code is in ./elpa/exec-path-from-shell-20151006.2253/exec-path-from-shell.el. Adding exec-path-from-shell to dotspacemacs-excluded-packages in ~/.spacemacs seems to let the Emacs startup complete with no problems.

@cubranic
Copy link
Author

The state of the UI when its stops responding:

spacemacs

@purcell
Copy link
Contributor

purcell commented Nov 20, 2015

This is almost certainly due to something odd in your .bashrc or other shell startup file which causes it to wait for input. Try temporarily removing those files to see if that helps.

@cubranic
Copy link
Author

I recorded the results of my debugging in purcell/exec-path-from-shell#33, but the long story short: using exec-path-from-shell doesn't seem to work on FreeBSD and Bash because of some interaction of how Emacs runs Bash and Bash's interactive mode.

I'm not sure if Spacemacs might want to have a workaround in this case. Does it even need to run exec-path-from-shell when in X Windows? I thought the package is mainly for OS X (and use it there myself) because of how Mac restricts PATH for applications started from the GUI -- is there an X desktop environment that plays similar games with the environment variables?

@purcell
Copy link
Contributor

purcell commented Nov 20, 2015

I had a user report that it was necessary for them under X Windows. Not much info to go on, admittedly.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
@cubranic
Copy link
Author

cubranic commented Mar 1, 2020 via email

@JAremko JAremko added updated This issue has been updated since becoming stale FreeBSD labels May 26, 2020
@JAremko JAremko closed this as completed May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FreeBSD Reported upstream stale marked as a stale issue/pr (usually by a bot) updated This issue has been updated since becoming stale
Projects
Upstream bugs
Reported, waiting
Development

No branches or pull requests

4 participants