GNU bug report logs -
#59408
Emacs infinitely load when opening .py file
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59408 in the body.
You can then email your comments to 59408 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#59408
; Package
emacs
.
(Sun, 20 Nov 2022 10:40:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 20 Nov 2022 10:40: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)]
# Description of the bug
I've attached a file named "main.py". I've tried opening it with
"emacs -Q main.py" in a tty and Emacs infinitely loads.
# Reproducing the bug
1. Open the file I've attached in this message with "emacs -Q main.py".
At this point, Emacs will infinitely load (at least that's what I can
infer since I waited 30 seconds and then decided to kill the process)
# Additional information
I noticed a sudden increase in the usage of my CPU (because of the
sound that my computer produced), so I executed the following command
to see which processes were using more CPU resources.
```
$ watch -n 0.5 -d "ps -e -o tname,pid,%cpu,args | sort -nk3 | tail"
```
The following are the three last lines of the command that is being watched.
```
pts/0 15153 6.9 /usr/lib/firefox/firefox
? 14687 8.4 emacs --daemon -f exwm-enable
tty4 39122 98.5 emacs -Q main.py
```
As you can see above, the Emacs process that is opening that file is
using the most of the CPU.
It's worth mentioning that the attached file is a simplified version
of the file that I was editing. When I first found this bug, I was
editing a .py file with more lines and I found this infinite loading
when I executed M-x occur and searched for any string. Fortunately, I
was able to cancel the infinite loading with C-g, so I used the
profiler-* functions to see what was causing this unexpected behavior.
The attached files named profiler-report-cpu.txt and
profiler-report-memory.txt contain the output of profiler-report. As
you can see in the output of those reports, syntax-ppss is the last
function that is shown as a function that is using more than 80% of
memory and CPU. Recall that I mentioned that I pressed C-g to cancel
the infinite loading, that's the reason why other functions are shown
below with 0% usage of cpu and memory.
# System information
I'm using Emacs 28.2 in Arch Linux (see proof below).
```
$ emacs --version
GNU Emacs 28.2
Copyright (C) 2022 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
```
[profiler-report-cpu.txt (text/plain, attachment)]
[main.py (text/x-python, attachment)]
[profiler-report-memory.txt (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59408
; Package
emacs
.
(Sun, 20 Nov 2022 10:53:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 59408 <at> debbugs.gnu.org (full text, mbox):
> From: Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>
> Date: Sun, 20 Nov 2022 05:35:34 -0500
>
> I've attached a file named "main.py". I've tried opening it with
> "emacs -Q main.py" in a tty and Emacs infinitely loads.
>
> # Reproducing the bug
>
> 1. Open the file I've attached in this message with "emacs -Q main.py".
>
> At this point, Emacs will infinitely load (at least that's what I can
> infer since I waited 30 seconds and then decided to kill the process)
Thanks. I can reproduce this in Emacs 28, but not in Emacs 29. So I think
this bug was already fixed for the upcoming Emacs 29 release.
> It's worth mentioning that the attached file is a simplified version
> of the file that I was editing. When I first found this bug, I was
> editing a .py file with more lines and I found this infinite loading
> when I executed M-x occur and searched for any string.
Can you try the master branch of the Emacs Git repository, and see if your
actual Python file loads reasonably fast with Emacs 29?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59408
; Package
emacs
.
(Sun, 20 Nov 2022 16:53:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 59408 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> Can you try the master branch of the Emacs Git repository, and see if
> your actual Python file loads reasonably fast with Emacs 29?
Done. I compiled Emacs from master branch, and I didn't find that
issue when opening my actual Python file, so, as you said, it seems
that the problem has been fixed in Emacs 29.
For the record, I compiled Emacs from the commit shown below (last
commit in master branch as of the time of this writing)
```
$ git log -n 1
commit 8874cd908c0ea0e2200f6f4f596bf645e76a0c0c (HEAD -> master,
origin/master, origin/HEAD)
Author: Po Lu <luangruo <at> yahoo.com>
Date: Sun Nov 20 21:01:10 2022 +0800
Coalesce duplicate scroll valuator handling code
Also, write more commentary.
* src/xterm.c (xi_populate_scroll_valuator): New function.
Describe the meaning of each field in xi_scroll_valuator_t.
(xi_populate_device_from_info, xi_handle_new_classes): Factor
out duplicate code to that function.
```
On Sun, Nov 20, 2022 at 5:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>
> > Date: Sun, 20 Nov 2022 05:35:34 -0500
> >
> > I've attached a file named "main.py". I've tried opening it with
> > "emacs -Q main.py" in a tty and Emacs infinitely loads.
> >
> > # Reproducing the bug
> >
> > 1. Open the file I've attached in this message with "emacs -Q main.py".
> >
> > At this point, Emacs will infinitely load (at least that's what I can
> > infer since I waited 30 seconds and then decided to kill the process)
>
> Thanks. I can reproduce this in Emacs 28, but not in Emacs 29. So I think
> this bug was already fixed for the upcoming Emacs 29 release.
>
> > It's worth mentioning that the attached file is a simplified version
> > of the file that I was editing. When I first found this bug, I was
> > editing a .py file with more lines and I found this infinite loading
> > when I executed M-x occur and searched for any string.
>
> Can you try the master branch of the Emacs Git repository, and see if your
> actual Python file loads reasonably fast with Emacs 29?
>
[Message part 2 (text/html, inline)]
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sun, 20 Nov 2022 17:18:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>
:
bug acknowledged by developer.
(Sun, 20 Nov 2022 17:18:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 59408-done <at> debbugs.gnu.org (full text, mbox):
> From: Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>
> Date: Sun, 20 Nov 2022 11:49:15 -0500
> Cc: 59408 <at> debbugs.gnu.org
>
> > Can you try the master branch of the Emacs Git repository, and see if
> > your actual Python file loads reasonably fast with Emacs 29?
>
> Done. I compiled Emacs from master branch, and I didn't find that
> issue when opening my actual Python file, so, as you said, it seems
> that the problem has been fixed in Emacs 29.
>
> For the record, I compiled Emacs from the commit shown below (last
> commit in master branch as of the time of this writing)
>
> ```
> $ git log -n 1
> commit 8874cd908c0ea0e2200f6f4f596bf645e76a0c0c (HEAD -> master, origin/master, origin/HEAD)
> Author: Po Lu <luangruo <at> yahoo.com>
> Date: Sun Nov 20 21:01:10 2022 +0800
Great, thanks for testing. I'm therefore closing this bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 19 Dec 2022 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.