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

Freeze in term with latest emacs sources #198

Closed
antoine-levitt opened this Issue Feb 11, 2017 · 12 comments

Comments

Projects
None yet
9 participants
@antoine-levitt

antoine-levitt commented Feb 11, 2017

Hi,

With emacs from latest git, running sml/setup and then M-x term freezes emacs. Might be related to https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-10/msg00703.html.

@peterwvj

This comment has been minimized.

Show comment
Hide comment
@peterwvj

peterwvj Feb 18, 2017

I'm experiencing the same if I run M-x ansi-term.

Info:
smart-mode-line 20160818.508
GNU Emacs 26.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-02-18

peterwvj commented Feb 18, 2017

I'm experiencing the same if I run M-x ansi-term.

Info:
smart-mode-line 20160818.508
GNU Emacs 26.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-02-18

@Mihara

This comment has been minimized.

Show comment
Hide comment
@Mihara

Mihara Mar 12, 2017

Same here.

For what it's worth, interrupting the frozen emacs with SIGUSR2 produces this debug output:

Debugger entered--entering a function:
* sml/-this-buffer-changed(1 5 0)
  file-accessible-directory-p("/home/mihara/.emacs.d/lisp/")
  cd-absolute("/home/mihara/.emacs.d/lisp")
  cd("/home/mihara/.emacs.d/lisp")
  #[(string) "�\306\232\203��\307\207�\310H\311U\2031�\312\313�\314#�\312\313�	T#��\314	O�\315�	T\nO!��\fB\211�,\207�\310H\316U\203@�\317�\314\320O!\207\307\207" [string first-colon second-colon filename fileline term-pending-frame "" t 0 26 string-match ":" 1 string-to-number 47 cd nil] 4]("//home/mihara/.emacs.d/lisp")
  ad-Advice-term-command-hook(#[(string) "�\306\232\203��\307\207�\310H\311U\2031�\312\313�\314#�\312\313�	T#��\314	O�\315�	T\nO!��\fB\211�,\207�\310H\316U\203@�\317�\314\320O!\207\307\207" [string first-colon second-colon filename fileline term-pending-frame "" t 0 26 string-match ":" 1 string-to-number 47 cd nil] 4] "//home/mihara/.emacs.d/lisp")
  apply(ad-Advice-term-command-hook #[(string) "�\306\232\203��\307\207�\310H\311U\2031�\312\313�\314#�\312\313�	T#��\314	O�\315�	T\nO!��\fB\211�,\207�\310H\316U\203@�\317�\314\320O!\207\307\207" [string first-colon second-colon filename fileline term-pending-frame "" t 0 26 string-match ":" 1 string-to-number 47 cd nil] 4] "//home/mihara/.emacs.d/lisp")
  #[128 "\300\301\302�#\207" [apply ad-Advice-term-command-hook #[(string) "�\306\232\203��\307\207�\310H\311U\2031�\312\313�\314#�\312\313�	T#��\314	O�\315�	T\nO!��\fB\211�,\207�\310H\316U\203@�\317�\314\320O!\207\307\207" [string first-colon second-colon filename fileline term-pending-frame "" t 0 26 string-match ":" 1 string-to-number 47 cd nil] 4] nil] 5 nil]("//home/mihara/.emacs.d/lisp")
  term-emulate-terminal(#<process *ansi-term*> "�//home/mihara/.emacs.d/lisp
\n")

Is there any hope someone more knowledgeable can get this sorted out? This is a real pain.

Mihara commented Mar 12, 2017

Same here.

For what it's worth, interrupting the frozen emacs with SIGUSR2 produces this debug output:

Debugger entered--entering a function:
* sml/-this-buffer-changed(1 5 0)
  file-accessible-directory-p("/home/mihara/.emacs.d/lisp/")
  cd-absolute("/home/mihara/.emacs.d/lisp")
  cd("/home/mihara/.emacs.d/lisp")
  #[(string) "�\306\232\203��\307\207�\310H\311U\2031�\312\313�\314#�\312\313�	T#��\314	O�\315�	T\nO!��\fB\211�,\207�\310H\316U\203@�\317�\314\320O!\207\307\207" [string first-colon second-colon filename fileline term-pending-frame "" t 0 26 string-match ":" 1 string-to-number 47 cd nil] 4]("//home/mihara/.emacs.d/lisp")
  ad-Advice-term-command-hook(#[(string) "�\306\232\203��\307\207�\310H\311U\2031�\312\313�\314#�\312\313�	T#��\314	O�\315�	T\nO!��\fB\211�,\207�\310H\316U\203@�\317�\314\320O!\207\307\207" [string first-colon second-colon filename fileline term-pending-frame "" t 0 26 string-match ":" 1 string-to-number 47 cd nil] 4] "//home/mihara/.emacs.d/lisp")
  apply(ad-Advice-term-command-hook #[(string) "�\306\232\203��\307\207�\310H\311U\2031�\312\313�\314#�\312\313�	T#��\314	O�\315�	T\nO!��\fB\211�,\207�\310H\316U\203@�\317�\314\320O!\207\307\207" [string first-colon second-colon filename fileline term-pending-frame "" t 0 26 string-match ":" 1 string-to-number 47 cd nil] 4] "//home/mihara/.emacs.d/lisp")
  #[128 "\300\301\302�#\207" [apply ad-Advice-term-command-hook #[(string) "�\306\232\203��\307\207�\310H\311U\2031�\312\313�\314#�\312\313�	T#��\314	O�\315�	T\nO!��\fB\211�,\207�\310H\316U\203@�\317�\314\320O!\207\307\207" [string first-colon second-colon filename fileline term-pending-frame "" t 0 26 string-match ":" 1 string-to-number 47 cd nil] 4] nil] 5 nil]("//home/mihara/.emacs.d/lisp")
  term-emulate-terminal(#<process *ansi-term*> "�//home/mihara/.emacs.d/lisp
\n")

Is there any hope someone more knowledgeable can get this sorted out? This is a real pain.

@Malabarba

This comment has been minimized.

Show comment
Hide comment
@Malabarba

Malabarba Mar 13, 2017

Owner

Sorry for the silence. I'll try to have a look at it this week. It's weird that file-accessible-directory-p is triggering sml hooks.

Owner

Malabarba commented Mar 13, 2017

Sorry for the silence. I'll try to have a look at it this week. It's weird that file-accessible-directory-p is triggering sml hooks.

@antoine-levitt

This comment has been minimized.

Show comment
Hide comment
@antoine-levitt

antoine-levitt Mar 14, 2017

For what it's worth, temporary workaround:

(ad-deactivate 'term-command-hook)
(ad-deactivate 'term-handle-ansi-terminal-messages)

antoine-levitt commented Mar 14, 2017

For what it's worth, temporary workaround:

(ad-deactivate 'term-command-hook)
(ad-deactivate 'term-handle-ansi-terminal-messages)

@erreina

This comment has been minimized.

Show comment
Hide comment
@erreina

erreina May 7, 2017

Any further progress on this?

erreina commented May 7, 2017

Any further progress on this?

@Malabarba

This comment has been minimized.

Show comment
Hide comment
@Malabarba

Malabarba Oct 12, 2017

Owner

No progress. The term advices used by sml are just meant to keep track of the shell's CWD. If it's causing hangs then I'm not opposed to simply disabling this feature.
Is this still a problem with latest Emacs?

Owner

Malabarba commented Oct 12, 2017

No progress. The term advices used by sml are just meant to keep track of the shell's CWD. If it's causing hangs then I'm not opposed to simply disabling this feature.
Is this still a problem with latest Emacs?

@apauzies

This comment has been minimized.

Show comment
Hide comment
@apauzies

apauzies Oct 14, 2017

Yes, I have the issue with:

GNU Emacs 26.0.90 (build 1, x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911)) of 2017-10-11

Debugger entered--returning value: nil
  sml/-this-buffer-changed(1 5 0)
  cd-absolute("/Users/alex")
  cd("/Users/alex")
  #f(compiled-function (string) #<bytecode 0x40551ba3>)("//Users/alex")
  ad-Advice-term-command-hook(#f(compiled-function (string) #<bytecode 0x40551ba3>) "//Users/alex")
  apply(ad-Advice-term-command-hook #f(compiled-function (string) #<bytecode 0x40551ba3>) "//Users/alex")
  #f(advice-wrapper :around #f(compiled-function (string) #<bytecode 0x40551ba3>) ad-Advice-term-command-hook)("//Users/alex")
  term-emulate-terminal(#<process *ansi-term*> "\032//Users/alex\015\n\033[?1034h\033[01;35malex@imac\033[01;36m:~ $\033[00m ")

apauzies commented Oct 14, 2017

Yes, I have the issue with:

GNU Emacs 26.0.90 (build 1, x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911)) of 2017-10-11

Debugger entered--returning value: nil
  sml/-this-buffer-changed(1 5 0)
  cd-absolute("/Users/alex")
  cd("/Users/alex")
  #f(compiled-function (string) #<bytecode 0x40551ba3>)("//Users/alex")
  ad-Advice-term-command-hook(#f(compiled-function (string) #<bytecode 0x40551ba3>) "//Users/alex")
  apply(ad-Advice-term-command-hook #f(compiled-function (string) #<bytecode 0x40551ba3>) "//Users/alex")
  #f(advice-wrapper :around #f(compiled-function (string) #<bytecode 0x40551ba3>) ad-Advice-term-command-hook)("//Users/alex")
  term-emulate-terminal(#<process *ansi-term*> "\032//Users/alex\015\n\033[?1034h\033[01;35malex@imac\033[01;36m:~ $\033[00m ")
@Malabarba

This comment has been minimized.

Show comment
Hide comment
@Malabarba

Malabarba Jan 29, 2018

Owner

Thanks for all the info.
I haven't been able to spend as much time as I'd like on package maintenance, so I welcome anyone who'd like to take a crack at this.
Meanwhile, I'll keep trying to find some time for it, and apologising for the delays.

Owner

Malabarba commented Jan 29, 2018

Thanks for all the info.
I haven't been able to spend as much time as I'd like on package maintenance, so I welcome anyone who'd like to take a crack at this.
Meanwhile, I'll keep trying to find some time for it, and apologising for the delays.

daviderestivo added a commit to daviderestivo/emacs-config that referenced this issue May 21, 2018

@a-schaefers

This comment has been minimized.

Show comment
Hide comment
@a-schaefers

a-schaefers Jul 27, 2018

The workaround causes an annoying init warning message to pop up, I hope we can resolve this better

a-schaefers commented Jul 27, 2018

The workaround causes an annoying init warning message to pop up, I hope we can resolve this better

@phil-s

This comment has been minimized.

Show comment
Hide comment
@phil-s

phil-s Jul 30, 2018

Edit: I missed that the commit was to a completely different repository, so the following isn't entirely applicable.


You shouldn't be deactivating all advice for these functions if you know that there are specific pieces of advice which are responsible -- who knows what else you've disabled.

Use ad-remove-advice for the specific advice, and then ad-activate to make it take effect.

(Of course, if the advice in question is added by this same library -- which I presume it is, given the lack of eval-after-load -- then the more sensible workaround would be to not define/activate that advice in the first place.)

phil-s commented Jul 30, 2018

Edit: I missed that the commit was to a completely different repository, so the following isn't entirely applicable.


You shouldn't be deactivating all advice for these functions if you know that there are specific pieces of advice which are responsible -- who knows what else you've disabled.

Use ad-remove-advice for the specific advice, and then ad-activate to make it take effect.

(Of course, if the advice in question is added by this same library -- which I presume it is, given the lack of eval-after-load -- then the more sensible workaround would be to not define/activate that advice in the first place.)

@Malabarba

This comment has been minimized.

Show comment
Hide comment
@Malabarba

Malabarba Aug 1, 2018

Owner

Hi everyone.
I've removed both advices now. Let me know if it solves the issue as soon as Melpa rebuilds (I tried reproducing the issue here but it didn't happen for me).

Owner

Malabarba commented Aug 1, 2018

Hi everyone.
I've removed both advices now. Let me know if it solves the issue as soon as Melpa rebuilds (I tried reproducing the issue here but it didn't happen for me).

daviderestivo added a commit to daviderestivo/emacs-config that referenced this issue Aug 3, 2018

@daviderestivo

This comment has been minimized.

Show comment
Hide comment
@daviderestivo

daviderestivo Aug 4, 2018

Hi Artur,

it works for me now.

Thanks and regards,
Davide

daviderestivo commented Aug 4, 2018

Hi Artur,

it works for me now.

Thanks and regards,
Davide

@Malabarba Malabarba closed this Aug 5, 2018

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