GNU bug report logs -
#25156
26.0.50; `describe-text-properties' hangs with 100% cpu usage when property is a char-table
Previous Next
Reported by: Peter Wang <ptr.wang <at> gmail.com>
Date: Sat, 10 Dec 2016 14:02:02 UTC
Severity: normal
Tags: notabug
Found in version 26.0.50
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25156 in the body.
You can then email your comments to 25156 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25156
; Package
emacs
.
(Sat, 10 Dec 2016 14:02:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Peter Wang <ptr.wang <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 10 Dec 2016 14:02:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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")))
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25156
; Package
emacs
.
(Sat, 10 Dec 2016 14:22:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 25156 <at> debbugs.gnu.org (full text, mbox):
> From: Peter Wang <ptr.wang <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25156
; Package
emacs
.
(Sat, 10 Dec 2016 15:04:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 25156 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> gnu.org> wrote:
> > From: Peter Wang <ptr.wang <at> 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.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25156
; Package
emacs
.
(Sat, 10 Dec 2016 15:12:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 25156 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> 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 <at> gnu.org> wrote:
>
>> > From: Peter Wang <ptr.wang <at> 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.
>>
>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25156
; Package
emacs
.
(Sat, 10 Dec 2016 15:29:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 25156 <at> debbugs.gnu.org (full text, mbox):
Peter Wang <ptr.wang <at> 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 <at> 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)"
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25156
; Package
emacs
.
(Sat, 10 Dec 2016 15:39:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 25156 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> users.sourceforge.net> wrote:
> Peter Wang <ptr.wang <at> 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 <at> 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)"
>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25156
; Package
emacs
.
(Sat, 10 Dec 2016 16:05:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 25156 <at> debbugs.gnu.org (full text, mbox):
> From: npostavs <at> users.sourceforge.net
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 25156 <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25156
; Package
emacs
.
(Sat, 10 Dec 2016 16:17:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 25156 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> gnu.org> wrote:
> > From: npostavs <at> users.sourceforge.net
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, 25156 <at> 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.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25156
; Package
emacs
.
(Sat, 10 Dec 2016 16:40:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 25156 <at> debbugs.gnu.org (full text, mbox):
# not an Emacs bug
tags 25156 notabug
close 25156
quit
Peter Wang <ptr.wang <at> 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)"
Added tag(s) notabug.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Sat, 10 Dec 2016 16:40:03 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
25156 <at> debbugs.gnu.org and Peter Wang <ptr.wang <at> gmail.com>
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Sat, 10 Dec 2016 16:40:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 08 Jan 2017 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 221 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.