* bug#25156: 26.0.50; `describe-text-properties' hangs with 100% cpu usage when property is a char-table
@ 2016-12-10 13:59 Peter Wang
2016-12-10 14:22 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Peter Wang @ 2016-12-10 13:59 UTC (permalink / raw)
To: 25156
[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]
I came across the problem when I was using `C-u C-x =' on a SLIME
presentation. After some debugging, I found out the cause of the
problem. Here is it:
In a slime REPL buffer, when the evaluation result is rendered, SLIME
adds text properties using `slime-add-presentation-properties'. One
of the text properties is a syntax-table `slime-presentation-syntax-table'.
`C-u C-x =' calls `(describe-char (point))', which in turn calls
`describe-text-properties', which hangs with 100% cpu usage.
I think a possible fix could be done in `describe-property-list', adding
a case in cond to handle the type of syntax-table, something like:
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 6c7983a177..926103f35e 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -90,6 +90,7 @@ describe-property-list
'type 'help-face 'help-args (list value)))
((widgetp value)
(describe-text-widget value))
+ ((syntax-table-p value) (insert "#<syntax table>"))
(t
(describe-text-sexp value))))
(insert "\n")))
[-- Attachment #2: Type: text/html, Size: 1754 bytes --]
^ permalink raw reply related [flat|nested] 9+ messages in thread
* bug#25156: 26.0.50; `describe-text-properties' hangs with 100% cpu usage when property is a char-table
2016-12-10 13:59 bug#25156: 26.0.50; `describe-text-properties' hangs with 100% cpu usage when property is a char-table Peter Wang
@ 2016-12-10 14:22 ` Eli Zaretskii
2016-12-10 15:03 ` Peter Wang
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2016-12-10 14:22 UTC (permalink / raw)
To: Peter Wang; +Cc: 25156
> From: Peter Wang <ptr.wang@gmail.com>
> Date: Sat, 10 Dec 2016 21:59:32 +0800
>
> I came across the problem when I was using `C-u C-x =' on a SLIME
> presentation. After some debugging, I found out the cause of the
> problem. Here is it:
>
> In a slime REPL buffer, when the evaluation result is rendered, SLIME
> adds text properties using `slime-add-presentation-properties'. One
> of the text properties is a syntax-table `slime-presentation-syntax-table'.
>
> `C-u C-x =' calls `(describe-char (point))', which in turn calls
> `describe-text-properties', which hangs with 100% cpu usage.
>
> I think a possible fix could be done in `describe-property-list', adding
> a case in cond to handle the type of syntax-table, something like:
Thanks. Could you perhaps prepare a small test case for this problem?
It would help understanding the underlying problem, and possibly also
serve as a beginning of a test for our test suite.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#25156: 26.0.50; `describe-text-properties' hangs with 100% cpu usage when property is a char-table
2016-12-10 14:22 ` Eli Zaretskii
@ 2016-12-10 15:03 ` Peter Wang
2016-12-10 15:11 ` Peter Wang
0 siblings, 1 reply; 9+ messages in thread
From: Peter Wang @ 2016-12-10 15:03 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 25156
[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]
A simplest test case is like:
(describe-property-list (list 'syntax-table lisp-mode-syntax-table))
evaluating this Elisp expression will hang with 100% CPU usage.
On Sat, Dec 10, 2016 at 10:22 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Peter Wang <ptr.wang@gmail.com>
> > Date: Sat, 10 Dec 2016 21:59:32 +0800
> >
> > I came across the problem when I was using `C-u C-x =' on a SLIME
> > presentation. After some debugging, I found out the cause of the
> > problem. Here is it:
> >
> > In a slime REPL buffer, when the evaluation result is rendered, SLIME
> > adds text properties using `slime-add-presentation-properties'. One
> > of the text properties is a syntax-table `slime-presentation-syntax-
> table'.
> >
> > `C-u C-x =' calls `(describe-char (point))', which in turn calls
> > `describe-text-properties', which hangs with 100% cpu usage.
> >
> > I think a possible fix could be done in `describe-property-list', adding
> > a case in cond to handle the type of syntax-table, something like:
>
> Thanks. Could you perhaps prepare a small test case for this problem?
> It would help understanding the underlying problem, and possibly also
> serve as a beginning of a test for our test suite.
>
[-- Attachment #2: Type: text/html, Size: 1776 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#25156: 26.0.50; `describe-text-properties' hangs with 100% cpu usage when property is a char-table
2016-12-10 15:03 ` Peter Wang
@ 2016-12-10 15:11 ` Peter Wang
2016-12-10 15:29 ` npostavs
0 siblings, 1 reply; 9+ messages in thread
From: Peter Wang @ 2016-12-10 15:11 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 25156
[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]
BTW, I also found that `describe-variable' has the same problem.
(describe-variable 'lisp-mode-syntax-table)
I have not looked into this yet, it could be the same bug.
On Sat, Dec 10, 2016 at 11:03 PM, Peter Wang <ptr.wang@gmail.com> wrote:
> A simplest test case is like:
>
> (describe-property-list (list 'syntax-table lisp-mode-syntax-table))
>
> evaluating this Elisp expression will hang with 100% CPU usage.
>
>
>
> On Sat, Dec 10, 2016 at 10:22 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> > From: Peter Wang <ptr.wang@gmail.com>
>> > Date: Sat, 10 Dec 2016 21:59:32 +0800
>> >
>> > I came across the problem when I was using `C-u C-x =' on a SLIME
>> > presentation. After some debugging, I found out the cause of the
>> > problem. Here is it:
>> >
>> > In a slime REPL buffer, when the evaluation result is rendered, SLIME
>> > adds text properties using `slime-add-presentation-properties'. One
>> > of the text properties is a syntax-table `slime-presentation-syntax-tab
>> le'.
>> >
>> > `C-u C-x =' calls `(describe-char (point))', which in turn calls
>> > `describe-text-properties', which hangs with 100% cpu usage.
>> >
>> > I think a possible fix could be done in `describe-property-list', adding
>> > a case in cond to handle the type of syntax-table, something like:
>>
>> Thanks. Could you perhaps prepare a small test case for this problem?
>> It would help understanding the underlying problem, and possibly also
>> serve as a beginning of a test for our test suite.
>>
>
>
[-- Attachment #2: Type: text/html, Size: 2438 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#25156: 26.0.50; `describe-text-properties' hangs with 100% cpu usage when property is a char-table
2016-12-10 15:11 ` Peter Wang
@ 2016-12-10 15:29 ` npostavs
2016-12-10 15:38 ` Peter Wang
2016-12-10 16:04 ` Eli Zaretskii
0 siblings, 2 replies; 9+ messages in thread
From: npostavs @ 2016-12-10 15:29 UTC (permalink / raw)
To: Peter Wang; +Cc: 25156
Peter Wang <ptr.wang@gmail.com> writes:
> BTW, I also found that `describe-variable' has the same problem.
>
> (describe-variable 'lisp-mode-syntax-table)
>
> I have not looked into this yet, it could be the same bug.
>
> On Sat, Dec 10, 2016 at 11:03 PM, Peter Wang <ptr.wang@gmail.com> wrote:
>
> A simplest test case is like:
>
> (describe-property-list (list 'syntax-table lisp-mode-syntax-table))
>
> evaluating this Elisp expression will hang with 100% CPU usage.
Neither of these hang for me from emacs -Q, using latest master (fc0fd24c105b)
(benchmark 1 '(describe-variable 'lisp-mode-syntax-table)) ;=> "Elapsed time: 1.272053s (0.161946s in 6 GCs)"
(benchmark 1 '(describe-property-list (list 'syntax-table lisp-mode-syntax-table))) ;=> "Elapsed time: 1.165824s (0.139516s in 5 GCs)"
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#25156: 26.0.50; `describe-text-properties' hangs with 100% cpu usage when property is a char-table
2016-12-10 15:29 ` npostavs
@ 2016-12-10 15:38 ` Peter Wang
2016-12-10 16:04 ` Eli Zaretskii
1 sibling, 0 replies; 9+ messages in thread
From: Peter Wang @ 2016-12-10 15:38 UTC (permalink / raw)
To: npostavs; +Cc: 25156
[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]
Indeed, I got the same result as you did from emacs -Q. I will look into my
configuration and provide more information. Thanks!
On Sat, Dec 10, 2016 at 11:29 PM, <npostavs@users.sourceforge.net> wrote:
> Peter Wang <ptr.wang@gmail.com> writes:
>
> > BTW, I also found that `describe-variable' has the same problem.
> >
> > (describe-variable 'lisp-mode-syntax-table)
> >
> > I have not looked into this yet, it could be the same bug.
> >
> > On Sat, Dec 10, 2016 at 11:03 PM, Peter Wang <ptr.wang@gmail.com> wrote:
> >
> > A simplest test case is like:
> >
> > (describe-property-list (list 'syntax-table lisp-mode-syntax-table))
> >
> > evaluating this Elisp expression will hang with 100% CPU usage.
>
> Neither of these hang for me from emacs -Q, using latest master
> (fc0fd24c105b)
>
> (benchmark 1 '(describe-variable 'lisp-mode-syntax-table)) ;=> "Elapsed
> time: 1.272053s (0.161946s in 6 GCs)"
> (benchmark 1 '(describe-property-list (list 'syntax-table
> lisp-mode-syntax-table))) ;=> "Elapsed time: 1.165824s (0.139516s in 5 GCs)"
>
>
[-- Attachment #2: Type: text/html, Size: 1626 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#25156: 26.0.50; `describe-text-properties' hangs with 100% cpu usage when property is a char-table
2016-12-10 15:29 ` npostavs
2016-12-10 15:38 ` Peter Wang
@ 2016-12-10 16:04 ` Eli Zaretskii
2016-12-10 16:16 ` Peter Wang
1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2016-12-10 16:04 UTC (permalink / raw)
To: npostavs; +Cc: ptr.wang, 25156
> From: npostavs@users.sourceforge.net
> Cc: Eli Zaretskii <eliz@gnu.org>, 25156@debbugs.gnu.org
> Date: Sat, 10 Dec 2016 10:29:44 -0500
>
> Neither of these hang for me from emacs -Q, using latest master (fc0fd24c105b)
>
> (benchmark 1 '(describe-variable 'lisp-mode-syntax-table)) ;=> "Elapsed time: 1.272053s (0.161946s in 6 GCs)"
> (benchmark 1 '(describe-property-list (list 'syntax-table lisp-mode-syntax-table))) ;=> "Elapsed time: 1.165824s (0.139516s in 5 GCs)"
I get similar times here.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#25156: 26.0.50; `describe-text-properties' hangs with 100% cpu usage when property is a char-table
2016-12-10 16:04 ` Eli Zaretskii
@ 2016-12-10 16:16 ` Peter Wang
2016-12-10 16:40 ` npostavs
0 siblings, 1 reply; 9+ messages in thread
From: Peter Wang @ 2016-12-10 16:16 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 25156, npostavs
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
I found the culprit was this line in my configuration:
(setq lisp-indent-function 'common-lisp-indent-function)
and common-lisp-indent-function is provided by
`.emacs.d/elpa/slime-20161109.640/contrib/slime-cl-indent.el'
I think it is a wrong configuration.
something in common-lisp-indent-function cause the huge slowing down.
thanks for your time and sorry for the false bug.
On Sun, Dec 11, 2016 at 12:04 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: npostavs@users.sourceforge.net
> > Cc: Eli Zaretskii <eliz@gnu.org>, 25156@debbugs.gnu.org
> > Date: Sat, 10 Dec 2016 10:29:44 -0500
> >
> > Neither of these hang for me from emacs -Q, using latest master
> (fc0fd24c105b)
> >
> > (benchmark 1 '(describe-variable 'lisp-mode-syntax-table)) ;=> "Elapsed
> time: 1.272053s (0.161946s in 6 GCs)"
> > (benchmark 1 '(describe-property-list (list 'syntax-table
> lisp-mode-syntax-table))) ;=> "Elapsed time: 1.165824s (0.139516s in 5 GCs)"
>
> I get similar times here.
>
[-- Attachment #2: Type: text/html, Size: 1677 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#25156: 26.0.50; `describe-text-properties' hangs with 100% cpu usage when property is a char-table
2016-12-10 16:16 ` Peter Wang
@ 2016-12-10 16:40 ` npostavs
0 siblings, 0 replies; 9+ messages in thread
From: npostavs @ 2016-12-10 16:40 UTC (permalink / raw)
To: Peter Wang; +Cc: 25156
# not an Emacs bug
tags 25156 notabug
close 25156
quit
Peter Wang <ptr.wang@gmail.com> writes:
> I found the culprit was this line in my configuration:
>
> (setq lisp-indent-function 'common-lisp-indent-function)
>
> and common-lisp-indent-function is provided by
>
> `.emacs.d/elpa/slime-20161109.640/contrib/slime-cl-indent.el'
>
> I think it is a wrong configuration.
>
> something in common-lisp-indent-function cause the huge slowing down.
Okay, looks like a problem with slime-cl-indent.el then. Using Emacs'
common-lisp-indent-function (from lisp/emacs-lisp/cl-indent.el) I get
around 4 seconds, so it's slower but not a hang.
> >
> > (benchmark 1 '(describe-variable 'lisp-mode-syntax-table)) ;=> "Elapsed time: 1.272053s (0.161946s in 6 GCs)"
> > (benchmark 1 '(describe-property-list (list 'syntax-table lisp-mode-syntax-table))) ;=> "Elapsed time: 1.165824s (0.139516s in 5 GCs)"
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-12-10 16:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-10 13:59 bug#25156: 26.0.50; `describe-text-properties' hangs with 100% cpu usage when property is a char-table Peter Wang
2016-12-10 14:22 ` Eli Zaretskii
2016-12-10 15:03 ` Peter Wang
2016-12-10 15:11 ` Peter Wang
2016-12-10 15:29 ` npostavs
2016-12-10 15:38 ` Peter Wang
2016-12-10 16:04 ` Eli Zaretskii
2016-12-10 16:16 ` Peter Wang
2016-12-10 16:40 ` npostavs
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.