GNU bug report logs - #40685
28.0.50; eww browser chews up 100% cpu when displaying looping gif animations

Previous Next

Package: emacs;

Reported by: Francis Meetze <francis <at> bridgesense.com>

Date: Fri, 17 Apr 2020 18:46:02 UTC

Severity: normal

Tags: fixed

Merged with 41802

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 40685 in the body.
You can then email your comments to 40685 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#40685; Package emacs. (Fri, 17 Apr 2020 18:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Francis Meetze <francis <at> bridgesense.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 17 Apr 2020 18:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Francis Meetze <francis <at> bridgesense.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; eww browser chews up 100% cpu when displaying looping gif
 animations
Date: Fri, 17 Apr 2020 10:24:41 -0700
When opening a web page in the Emacs browser that contains infinite looping gif animations Emacs starts spinning up 100% CPU even after the emacs browser is closed.  Emacs has to be completely shut down to reduce the CPU usuage.

If the 100% CPU process is allowed to run its course, it eventually stops after several minutes with the message, "Stopping animation; animation possibly too big". 
    

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13, cairo version 1.16.0)
 of 2020-04-16 built on localhost.localdomain
Repository revision: d5a7df8c02f04102d50a5cd2290262f59f2b1415
Repository branch: master
Windowing system distributor 'Fedora Project', version 11.0.12006000
System Description: Fedora 31 (Thirty One)

Recent messages:
ad-handle-definition: ‘vc-revert’ got redefined
BBDB: sendmail insinuation deprecated.  Use mail.
Loading /home/francis/.emacs.d/recentf...done
Cleaning up the recentf list...done (0 removed)
Turning on magit-auto-revert-mode...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Package cl is deprecated
Contacting host: bridgesense.com:443
ad-handle-definition: ‘open-network-stream’ got redefined
uncompressing publicsuffix.txt.gz...done

Configured using:
 'configure --without-makeinfo --with-gnutls=ifavailable
 --with-mailutils'

Configured features:
XPM JPEG TIFF GIF PNG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Dashboard

Minor modes in effect:
  general-override-mode: t
  global-auto-complete-mode: t
  global-magit-file-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  ranger-override-dired-mode: t
  recentf-mode: t
  page-break-lines-mode: t
  fancy-battery-mode: t
  global-git-gutter-mode: t
  which-key-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  csv-field-index-mode: t
  projectile-mode: t
  smooth-scrolling-mode: t
  global-flycheck-mode: t
  autopair-global-mode: t
  show-paren-mode: t
  ivy-mode: t
  helm-mode: t
  async-bytecomp-package-mode: t
  helm--remap-mouse-mode: t
  evil-commentary-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  global-evil-matchit-mode: t
  evil-matchit-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  shell-dirtrack-mode: t
  evil-mode: t
  evil-local-mode: t
  override-global-mode: t
  save-place-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow bbdb-message mail-extr emacsbug sendmail helm-command helm-elisp
helm-eval edebug backtrace helm-info jka-compr gnutls network-stream
url-cache winner whitespace magit-bookmark bookmark pp general
counsel-bbdb ac-html-bootstrap web-completion-data auto-complete-config
ac-php auto-complete ac-php-core popup xcscope f bbdb-vcard vcard
bbdb-mua bbdb-com bbdb bbdb-site timezone evil-magit helm-ls-git vc-git
vc vc-dispatcher magit-submodule magit-obsolete magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
which-func magit-diff smerge-mode diff-mode magit-core magit-autorevert
magit-margin magit-transient magit-process magit-mode git-commit
transient magit-git magit-section magit-utils crm log-edit message
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader pcvs-util with-editor server ranger autorevert filenotify
hl-line dired dired-loaddefs geben dbgp dashboard dashboard-widgets time
recentf tree-widget page-break-lines helm-ag helm-projectile pcase
spaceline-config spaceline-segments spaceline powerline
powerline-separators powerline-themes fancy-battery battery dbus
synosaurus define-word rng-nxml rng-valid rng-loc rng-uri rng-parse
nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode
nxml-outln nxml-rap nxml-util nxml-enc xmltok url-http url-auth
mail-parse rfc2231 url-gw nsm rmc helm-flyspell ace-jump-mode cl
linum-relative linum display-line-numbers helm-tramp helm-swoop
gruvbox-dark-soft-theme gruvbox-theme gruvbox autothemer
git-gutter-fringe git-gutter fringe-helper which-key web-beautify
php-scratch s yasnippet rainbow-mode flycheck-color-mode-line face-remap
json-mode json-reformat json-snatcher csv-mode sort sass-mode haml-mode
js css-mode sgml-mode eww mm-url gnus nnheader gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils wid-edit mm-util
mail-prsvr url-queue url url-proxy url-privacy url-expand url-methods
url-history mailcap shr text-property-search url-cookie url-domsuf
url-util puny svg dom ruby-mode smie coffee-mode php-mode mode-local
imenu speedbar ezimage dframe etags fileloop generator xref project
add-log cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs php-face php php-project projectile
grep ibuf-ext ibuffer ibuffer-loaddefs flymake-proc flymake compile
warnings xah-css-mode ido web-mode aggressive-indent smooth-scrolling
tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat
parse-time iso8601 ls-lisp exec-path-from-shell multi-term term
disp-table ehelp ob-plantuml flycheck-plantuml flycheck plantuml-mode
xml dash org-bullets epa-file epa derived epg epg-config org-crypt org
ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote
org-src ob-comint org-pcomplete org-list org-faces org-entities
time-date noutline outline org-version ob-emacs-lisp ob-core ob-eval
org-table ol org-keys org-compat org-macs org-loaddefs find-func
cal-menu calendar cal-loaddefs autopair paren swiper ivy delsel colir
color ivy-overlay helm-mode helm-files helm-buffers helm-occur helm-tags
helm-locate helm-grep helm-regexp format-spec helm-utils helm-help
helm-types helm-config helm-easymenu async-bytecomp helm helm-source
eieio-compat helm-multi-match helm-lib async evil-commentary
evil-commentary-integration evil-tutor evil-surround evil-matchit
evil-matchit-sdk evil evil-keybindings evil-integration undo-tree diff
evil-maps evil-commands reveal flyspell ispell evil-jumps
evil-command-window evil-types evil-search evil-ex shell pcomplete
comint ansi-color evil-macros evil-repeat evil-states evil-core advice
evil-common windmove thingatpt rect evil-digraphs evil-vars ring
diminish cl-extra help-mode use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode use-package-core finder-inf edmacro kmacro saveplace rx info
package easymenu browse-url url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer 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 composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
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 threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 658790 47463)
 (symbols 48 53176 2)
 (strings 32 212837 9154)
 (string-bytes 1 7430431)
 (vectors 16 83039)
 (vector-slots 8 923611 44954)
 (floats 8 566 1005)
 (intervals 56 2849 206)
 (buffers 992 16))




Forcibly Merged 40685 41802. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 17 Jul 2020 14:05:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40685; Package emacs. (Wed, 29 Jul 2020 06:25:02 GMT) Full text and rfc822 format available.

Message #10 received at 40685 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Francis Meetze <francis <at> bridgesense.com>
Cc: 40685 <at> debbugs.gnu.org
Subject: Re: bug#40685: 28.0.50; eww browser chews up 100% cpu when
 displaying looping gif animations
Date: Wed, 29 Jul 2020 08:24:24 +0200
Francis Meetze <francis <at> bridgesense.com> writes:

> When opening a web page in the Emacs browser that contains infinite looping gif animations Emacs starts spinning up 100% CPU even after the emacs browser is closed.  Emacs has to be completely shut down to reduce the CPU usuage.
>
> If the 100% CPU process is allowed to run its course, it eventually stops after several minutes with the message, "Stopping animation; animation possibly too big". 

Yeah, that triggers when it's taken more than two seconds to get the
next frame.  Emacs can be totally unusable for a long time, though,
because we may get a new frame faster than that, but leave no CPU for
the rest of Emacs.

Lowering the limit seems like an obvious solution, but that will make
many animations stop if Emacs is occasionally busy with something else.

So that simplistic test is error-prone and doesn't really help that much
with the problem.

I wonder whether a different heuristic could be written...  not
something that stops the animation if a single frame arrives too late,
but averaged over several frames.  That is, if frames consistently
arrive (way) too late, then it's probably using all the CPU, and should
stop.  Hm...  it doesn't seem to hard two write something like that, I
think?  I'll give it a go.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40685; Package emacs. (Wed, 29 Jul 2020 06:41:02 GMT) Full text and rfc822 format available.

Message #13 received at 40685 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Francis Meetze <francis <at> bridgesense.com>
Cc: 40685 <at> debbugs.gnu.org
Subject: Re: bug#40685: 28.0.50; eww browser chews up 100% cpu when
 displaying looping gif animations
Date: Wed, 29 Jul 2020 08:39:53 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>  Hm...  it doesn't seem to hard two write something like that, I
> think?  I'll give it a go.

I've now done so in Emacs 28, and it seems to work in my test cases with
huge GIFs.  It'll probably take some tweaking to find a limit that
doesn't stop legitimate animations, though.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 29 Jul 2020 06:41:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 40685 <at> debbugs.gnu.org and Francis Meetze <francis <at> bridgesense.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 29 Jul 2020 06:41: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. (Wed, 26 Aug 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 243 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.