evince and/or evince-thumbnailer stuck with high cpu load on specific dvi file

Bug #1386120 reported by Christopher Mann
118
This bug affects 25 people
Affects Status Importance Assigned to Milestone
Evince
Expired
Medium
evince (Ubuntu)
Triaged
Low
Unassigned

Bug Description

1) lsb_release -rd
Description: Ubuntu Vivid Vervet (development branch)
Release: 15.04

2) apt-cache policy evince libcairo2 libpoppler[0-9]
evince:
  Installed: 3.14.1-0ubuntu1
  Candidate: 3.14.1-0ubuntu1
  Version table:
 *** 3.14.1-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status
libcairo2:
  Installed: 1.13.0~20140204-0ubuntu1
  Candidate: 1.13.0~20140204-0ubuntu1
  Version table:
 *** 1.13.0~20140204-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status
libpoppler47:
  Installed: 0.28.1-1ubuntu1
  Candidate: 0.28.1-1ubuntu1
  Version table:
 *** 0.28.1-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status
apt-cache policy gnome-session-flashback
gnome-session-flashback:
  Installed: 1:3.14.0-3ubuntu6
  Candidate: 1:3.14.0-3ubuntu6
  Version table:
 *** 1:3.14.0-3ubuntu6 0
        500 http://us.archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages
        100 /var/lib/dpkg/status

3) What is expected to happen in either gnome-session-flashback (Metacity) or Unity opening https://bugs.launchpad.net/ubuntu/+source/evince/+bug/1386120/+attachment/4288977/+files/test.dvi opens successfully.

4) What happen instead is Evince notes perpetually "Loading", and either or both of evince and evince-thumbnailer get stuck with higher than expected CPU load (30-50% on two core system), and/or RAM (increasing from ~200MB on a 3GB x64 system). This is a regression from Ubuntu 14.04.1.

WORKAROUND: Use xdvi from texlive-binaries:
apt-cache policy texlive-binaries
texlive-binaries:
  Installed: 2014.20140926.35254-4
  Candidate: 2014.20140926.35254-4
  Version table:
 *** 2014.20140926.35254-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: evince 3.14.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.16.0-23.31-generic 3.16.4
Uname: Linux 3.16.0-23-generic x86_64
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Oct 27 11:10:36 2014
InstallationDate: Installed on 2014-04-18 (191 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
ProcEnviron:
 LANGUAGE=de_DE
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: evince
UpgradeStatus: Upgraded to utopic on 2014-10-25 (1 days ago)

Revision history for this message
Christopher Mann (christophermann-r) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in evince (Ubuntu):
status: New → Confirmed
Revision history for this message
ivainsencher (ivainsencher) wrote :
Download full text (6.4 KiB)

affects me too.
couldn't figure out exact circumstances, except that every now and then the machine slows down, I go to
top
and kill the evil-thumbnailer
KiB Mem: 8115116 total, 2468792 used, 5646324 free, 61856 buffers
KiB Swap: 15362856 total, 68 used, 15362788 free. 1488384 cached Mem

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 2760 israel 20 0 663004 35572 27672 S 3,7 0,4 0:02.90 gnome-term+
 1507 root 20 0 357372 66992 53364 S 2,7 0,8 0:27.04 Xorg
 1940 israel 20 0 667820 31668 24744 S 0,7 0,4 0:02.36 metacity
   79 root 20 0 0 0 0 S 0,3 0,0 0:04.49 kworker/3:1
 1614 israel 20 0 633832 24536 18876 S 0,3 0,3 0:00.55 bamfdaemon
 1981 israel 20 0 846464 38048 28032 S 0,3 0,5 0:03.05 gnome-panel
 4070 israel 20 0 1087984 381656 75100 S 0,3 4,7 1:23.58 firefox
 4581 root 20 0 0 0 0 S 0,3 0,0 0:00.02 kworker/1:0
    1 root 20 0 29652 4252 2480 S 0,0 0,1 0:02.65 init
    2 root 20 0 0 0 0 S 0,0 0,0 0:00.00 kthreadd
    3 root 20 0 0 0 0 S 0,0 0,0 0:00.67 ksoftirqd/0
    4 root 20 0 0 0 0 S 0,0 0,0 0:20.33 kworker/0:0
    5 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 kworker/0:+
    7 root 20 0 0 0 0 S 0,0 0,0 0:01.14 rcu_sched
    8 root 20 0 0 0 0 S 0,0 0,0 0:02.89 rcuos/0
    9 root 20 0 0 0 0 S 0,0 0,0 0:01.52 rcuos/1
   10 root 20 0 0 0 0 S 0,0 0,0 0:00.83 rcuos/2
israel@macbookair:~/Is/Presentations$ ps -ef|grep evince
israel 5013 4990 0 20:41 pts/8 00:00:00 grep --color=auto evince
israel@macbookair:~/Is/Presentations$ which evince-thumbnailer
/usr/bin/evince-thumbnailer
israel@macbookair:~/Is/Presentations$ man evince-thumbnailer
israel@macbookair:~/Is/Presentations$ dmesg|grep thumb
[ 399.777763] audit: type=1400 audit(1416347163.207:39): apparmor="DENIED" operation="exec" profile="/usr/bin/evince-thumbnailer//sanitized_helper" name="/usr/share/texlive/texmf-dist/web2c/mktexnam" pid=2864 comm="mktexpk" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
[ 399.779662] audit: type=1400 audit(1416347163.211:40): apparmor="DENIED" operation="exec" profile="/usr/bin/evince-thumbnailer//sanitized_helper" name="/usr/share/texlive/texmf-dist/web2c/mktexupd" pid=2869 comm="mktexpk" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
[ 400.510047] audit: type=1400 audit(1416347163.943:41): apparmor="DENIED" operation="exec" profile="/usr/bin/evince-thumbnailer//sanitized_helper" name="/usr/share/texlive/texmf-dist/web2c/mktexnam" pid=2896 comm="mktexpk" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
[ 400.511794] audit: type=1400 audit(1416347163.943:42): apparmor="DENIED" operation="exec" profile="/usr/bin/evince-thumbnailer//sanitized_helper" name="/usr/share/texlive/texmf-dist/web2c/mktexupd" pid=2901 comm="mktexpk" requested_mask="x" denied_mask="x" fsuid=...

Read more...

Revision history for this message
Christopher Mann (christophermann-r) wrote :

Following workaround disables the evince-thumbnailer for dvi files:
Open the dconf editor, navigate to "org.gnome.desktop.thumbnailers" and set the key "disable" to "['application/x-dvi']".

Changed in evince:
importance: Unknown → Medium
status: Unknown → New
Changed in evince (Ubuntu):
importance: Undecided → High
Revision history for this message
penalvch (penalvch) wrote :

Christopher Mann, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please provide an example document that demonstrates this problem?

Changed in evince (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

I'm seing this with the attached file. The workaround in #4 solves it for me.

Changed in evince (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

Walter Garcia-Fontes, thanks for the response. It would be best if we spun your document into a new bug report you filed via a terminal:
ubuntu-bug evince

so this bug report may focus on the original reporter, and his yet to be attached document.

As well, I tested the document you attached, regarding the scope of this report "Evince getting stuck at high CPU load" this is not reproducible in either Trusty or Vivid. When using compiz based session, it briefly (a handful of seconds) consumes 1/4 cores, then goes right back down while scrolling through the document. When using a metacity based one, it doesn't spike at all.

Changed in evince (Ubuntu):
importance: High → Low
status: Confirmed → Incomplete
Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

I will do. I'm reproducing this 100% in two different Trusty systems with Unity.

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

Sorry, the two systems where I'm reproducing this are Utopic systems, Ubuntu 14.10, like the OP' s system

penalvch (penalvch)
no longer affects: evince (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in evince (Ubuntu):
status: New → Confirmed
penalvch (penalvch)
affects: evince → evince (Ubuntu)
Changed in evince (Ubuntu):
importance: Medium → Undecided
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Christopher Mann (christophermann-r) wrote :

I have created a minimal example which reproduces the problem on my machine. It seems that this has nothing to do with eps images itself. The example does not contain any images. It just uses the cc document class (computational complexity) and the subcaption environment. The file opens without problems in xdvi.

Revision history for this message
penalvch (penalvch) wrote :
penalvch (penalvch)
description: updated
Revision history for this message
penalvch (penalvch) wrote :

Christopher Mann, the issue you are reporting is an upstream one. Could you please report this problem to them following the instructions at https://wiki.ubuntu.com/DebuggingEvince ?

Please provide a direct URL to your upstream report once you have made it so that it may be tracked.

Thank you for your understanding.

Changed in evince (Ubuntu):
status: Incomplete → Triaged
summary: - evince and evince-thumbnailer stuck with high cpu load
+ evince and/or evince-thumbnailer stuck with high cpu load on specific
+ dvi file
Changed in evince:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
madbiologist (me-again) wrote :

On Ubuntu 14.04 evince is not stuck with a high CPU load, but when opening the document with evinve from the command prompt, mulitple errors are printed in the terminal (see attached file) and the window opens and displays a warning:

Unable to open document "file:///home/ubuntu/Documents/test.dvi". DVI document has incorrect format

Revision history for this message
madbiologist (me-again) wrote :
Revision history for this message
Quang (quang) wrote :

This bug affected my computer during the last two weeks or so, likely from an update. There is a .dvi file in my Desktop folder, so it get thumbnailed automatically. During these past days this thumbnailing process for this file stalled. System monitor shows evince-thumbnailer taking almost all resource.

After I moved this .dvi file to another folder the system returned to normal.

Revision history for this message
Tom Goeckel (norak2) wrote :

This bug recently appeared for me on utopic. Causes high CPU and very high memory load!

Revision history for this message
professordes (d-a-johnston-hw) wrote :

Just appeared for me today (Friday 13th!) on utopic, high CPU and memory load as per other posters. #4 provides a fix for me too.

Revision history for this message
Krzysztof Janowicz (janowicz) wrote :

Same here on 14.10; evince-thumbnailer eating up 7.5GB of memory (while I was working with LaTeX beamer).

Revision history for this message
Matthias König (koenigma-qraum) wrote :

Same here on 15.05, extremely annoying because it eats up battery on my laptop...

Revision history for this message
Eildert Groeneveld (eildert-groeneveld) wrote :

Same issue here also with 15.04
Circumstances are not clear. I was running clamscan at that time. Extremely annoying as I had to boot because system was caught
 in swap.
Happened twice.

Revision history for this message
EdouardC (edouard-canot) wrote :

Same problem on my 15.04 amd64 version...

Another ubuntu bug which will be fixed not before long months or long years!

Revision history for this message
arnuschky (abrutschy) wrote :

Still present 3.18.2-1ubuntu4 (16.04 amd64)

Revision history for this message
arnuschky (abrutschy) wrote :

I've got this with a pdf, btw.

Changed in evince:
status: New → Expired
Revision history for this message
Mike Molina (mymolina) wrote :

It still persists in ubuntu 18.04 (18.04.4 LTS), high CPU and memory for a simple
DVI document.

evince 3.28.4-0ubuntu1.2 amd64

Revision history for this message
Mike Molina (mymolina) wrote :

After analyzing the error, I have noticed that the high CPU load is related with an evince-thumbnailer exit error that also involves the execution of some texlive commands. For example:

page: Error: /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr10.tfm: File corrupted, or not a TFM file

also mentioned in:

https://bugs.launchpad.net/ubuntu/+source/evince/+bug/1497727
https://askubuntu.com/questions/1195966/texlive-problems-in-log-file

By following these steps I have managed to reduce the high CPU load:

0. compile a tex document to generate dvi document.

1. run evince-thumbnailer in terminal:
   $ evince-thumbnailer parcial2.dvi out.dvi 2>output-evince-thumbnailer.txt
   the header of the output file mentions that some TeX commands are denied permission,
   $ grep 'kpathsea' output-evince-thumbnailer.txt | cut -b 19-

2. create a script to execute omitted commands:
   $ grep 'kpathsea' output-evince-thumbnailer.txt | cut -b 19- | sed -e '1i #! /bin/sh' > cmd.sh
   $ chmod 775 cmd.sh
   $ ./cmd.sh
   new font files are generated in the $TEXMFVAR directory. How to know its value?
   $ tlmgr conf | grep 'TEXMFVAR'

3. a new run of evince-thumbnailer may reveal other omitted commands by repeating item 1.

A new run of evince-thumbnailer the CPU doesn't show high load:
$ evince-thumbnailer parcial2.dvi out.dvi

I hope the mentioned steps guide the correction of this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.