* bug#21629: 25.0.50; python.el freezes up around docstrings.
@ 2015-10-06 4:48 Jacob MacDonald
2015-10-06 14:54 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Jacob MacDonald @ 2015-10-06 4:48 UTC (permalink / raw)
To: 21629
[-- Attachment #1: Type: text/plain, Size: 4245 bytes --]
Begin from a fresh 'emacs -Q'. Create a Python file. Insert a long
docstring which contains a header line and then a long body which
includes a few line breaks and spaces in it. The docstring should look
something like this:
"""test header
lorem ipsum... more text more text more text
x10 lines
...
...
"""
Save the file and close emacs. Start a fresh 'emacs -Q'. Open dired in
the directory which contains the Python file you created. Navigate to
the file and try to open in from dired. Emacs will freeze indefinitely
and eat all the system resources it can. You can break the cycle by
pressing C-q many times, but the freeze happens again on every single
redisplay. If you wait awhile before cancelling the redisplay, you may
see that fontification has frozen somewhere in the middle of the docstring.
In GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.7)
of 2015-10-05
Repository revision: 25b4572073179c8d6dc980ce2df3db4d96cd692f
Windowing system distributor 'The X.Org Foundation', version 11.0.11702000
System Description: Ubuntu Wily Werewolf (development branch)
Configured using:
'configure --prefix=/home/jaccarmac/local/emacs'
Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY LIBXML2 FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Python
Minor modes in effect:
shell-dirtrack-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
Error during redisplay: (jit-lock-function 201) signaled (quit)
Error during redisplay: (jit-lock-function 301) signaled (quit)
Error during redisplay: (jit-lock-function 1) signaled (quit)
Error during redisplay: (jit-lock-function 101) signaled (quit)
Error during redisplay: (jit-lock-function 201) signaled (quit)
Error during redisplay: (jit-lock-function 301) signaled (quit)
QuitError during redisplay: (jit-lock-function 1) signaled (quit)
Error during redisplay: (jit-lock-function 101) signaled (quit)
Error during redisplay: (jit-lock-function 201) signaled (quit)
Error during redisplay: (jit-lock-function 301) signaled (quit)
Quit [2 times]
Load-path shadows:
None found.
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils python tramp-sh tramp
tramp-compat auth-source cl-seq eieio byte-opt bytecomp byte-compile
cl-extra cconv eieio-core cl-macs gv gnus-util mm-util help-fns
help-mode easymenu mail-prsvr password-cache tramp-loaddefs trampver
shell pcomplete format-spec advice json comint ring cl-loaddefs pcase
cl-lib ansi-color dired time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 103996 4041)
(symbols 48 21982 0)
(miscs 40 288 118)
(strings 32 22819 5081)
(string-bytes 1 758868)
(vectors 16 15247)
(vector-slots 8 457945 4629)
(floats 8 185 420)
(intervals 56 237 0)
(buffers 976 14)
(heap 1024 22367 1150))
[-- Attachment #2: Type: text/html, Size: 5577 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21629: 25.0.50; python.el freezes up around docstrings.
2015-10-06 4:48 bug#21629: 25.0.50; python.el freezes up around docstrings Jacob MacDonald
@ 2015-10-06 14:54 ` Eli Zaretskii
2015-10-08 14:27 ` Andreas Röhler
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2015-10-06 14:54 UTC (permalink / raw)
To: Jacob MacDonald; +Cc: 21629
> From: Jacob MacDonald <jaccarmac@gmail.com>
> Date: Tue, 06 Oct 2015 04:48:50 +0000
>
> Begin from a fresh 'emacs -Q'. Create a Python file. Insert a long
> docstring which contains a header line and then a long body which
> includes a few line breaks and spaces in it. The docstring should look
> something like this:
>
> """test header
>
> lorem ipsum... more text more text more text
> x10 lines
> ...
> ...
> """
>
> Save the file and close emacs. Start a fresh 'emacs -Q'. Open dired in
> the directory which contains the Python file you created. Navigate to
> the file and try to open in from dired. Emacs will freeze indefinitely
> and eat all the system resources it can. You can break the cycle by
> pressing C-q many times, but the freeze happens again on every single
> redisplay. If you wait awhile before cancelling the redisplay, you may
> see that fontification has frozen somewhere in the middle of the docstring.
It infloops in python-nav-end-of-statement. The loop there ends up
one position before EOB, then jumps back to string-start, and so on
and so forth, ad nauseam.
I have no idea what causes this, but I hope Python-mode experts and
perhaps Stefan (due to syntax stuff) will be able to figure this out.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21629: 25.0.50; python.el freezes up around docstrings.
2015-10-06 14:54 ` Eli Zaretskii
@ 2015-10-08 14:27 ` Andreas Röhler
2015-10-08 18:22 ` Luke Powers
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Röhler @ 2015-10-08 14:27 UTC (permalink / raw)
To: 21629
Am 06.10.2015 um 16:54 schrieb Eli Zaretskii:
>> From: Jacob MacDonald <jaccarmac@gmail.com>
>> Date: Tue, 06 Oct 2015 04:48:50 +0000
>>
>> Begin from a fresh 'emacs -Q'. Create a Python file. Insert a long
>> docstring which contains a header line and then a long body which
>> includes a few line breaks and spaces in it. The docstring should look
>> something like this:
>>
>> """test header
>>
>> lorem ipsum... more text more text more text
>> x10 lines
>> ...
>> ...
>> """
>>
>> Save the file and close emacs. Start a fresh 'emacs -Q'. Open dired in
>> the directory which contains the Python file you created. Navigate to
>> the file and try to open in from dired. Emacs will freeze indefinitely
>> and eat all the system resources it can. You can break the cycle by
>> pressing C-q many times, but the freeze happens again on every single
>> redisplay. If you wait awhile before cancelling the redisplay, you may
>> see that fontification has frozen somewhere in the middle of the docstring.
> It infloops in python-nav-end-of-statement. The loop there ends up
> one position before EOB, then jumps back to string-start, and so on
> and so forth, ad nauseam.
>
> I have no idea what causes this, but I hope Python-mode experts and
> perhaps Stefan (due to syntax stuff) will be able to figure this out.
>
>
>
>
With a while-loop reading complex conditions IMO there is always an
abstract danger.
python-mode.el uses a heuristic exit:
`py-max-specpdl-size' - default is `max-specpdl-size'
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21629: 25.0.50; python.el freezes up around docstrings.
2015-10-08 14:27 ` Andreas Röhler
@ 2015-10-08 18:22 ` Luke Powers
0 siblings, 0 replies; 4+ messages in thread
From: Luke Powers @ 2015-10-08 18:22 UTC (permalink / raw)
Cc: 21629
[-- Attachment #1: Type: text/plain, Size: 1943 bytes --]
fwiw, I went through the tree with bisect and found
3928ef2dd5b8febf3b1d9c1bfb22af3698d16bea
<https://github.com/emacs-mirror/emacs/commit/3928ef2dd5b8febf3b1d9c1bfb22af3698d16bea>
to be the first commit where the issue pops up.
On Thu, Oct 8, 2015 at 7:27 AM, Andreas Röhler <
andreas.roehler@easy-emacs.de> wrote:
>
> Am 06.10.2015 um 16:54 schrieb Eli Zaretskii:
>
>> From: Jacob MacDonald <jaccarmac@gmail.com>
>>> Date: Tue, 06 Oct 2015 04:48:50 +0000
>>>
>>> Begin from a fresh 'emacs -Q'. Create a Python file. Insert a long
>>> docstring which contains a header line and then a long body which
>>> includes a few line breaks and spaces in it. The docstring should look
>>> something like this:
>>>
>>> """test header
>>>
>>> lorem ipsum... more text more text more text
>>> x10 lines
>>> ...
>>> ...
>>> """
>>>
>>> Save the file and close emacs. Start a fresh 'emacs -Q'. Open dired in
>>> the directory which contains the Python file you created. Navigate to
>>> the file and try to open in from dired. Emacs will freeze indefinitely
>>> and eat all the system resources it can. You can break the cycle by
>>> pressing C-q many times, but the freeze happens again on every single
>>> redisplay. If you wait awhile before cancelling the redisplay, you may
>>> see that fontification has frozen somewhere in the middle of the
>>> docstring.
>>>
>> It infloops in python-nav-end-of-statement. The loop there ends up
>> one position before EOB, then jumps back to string-start, and so on
>> and so forth, ad nauseam.
>>
>> I have no idea what causes this, but I hope Python-mode experts and
>> perhaps Stefan (due to syntax stuff) will be able to figure this out.
>>
>>
>>
>>
>>
> With a while-loop reading complex conditions IMO there is always an
> abstract danger.
>
> python-mode.el uses a heuristic exit:
>
> `py-max-specpdl-size' - default is `max-specpdl-size'
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 2685 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-08 18:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06 4:48 bug#21629: 25.0.50; python.el freezes up around docstrings Jacob MacDonald
2015-10-06 14:54 ` Eli Zaretskii
2015-10-08 14:27 ` Andreas Röhler
2015-10-08 18:22 ` Luke Powers
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).