bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59408: Emacs infinitely load when opening .py file


From: Rodrigo Morales
Subject: bug#59408: Emacs infinitely load when opening .py file
Date: Sun, 20 Nov 2022 05:35:34 -0500

# 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.
```

Attachment: profiler-report-cpu.txt
Description: Text document

Attachment: main.py
Description: Text Data

Attachment: profiler-report-memory.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]