The evince application often freezes

Bug #1809685 reported by SYN-2009
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Evince
New
Unknown
evince (Ubuntu)
Triaged
High
Unassigned

Bug Description

Hi!
The evince application (pdf document viewer) often freezes.
Thanks.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: evince 3.28.4-0ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-43.46-generic 4.15.18
Uname: Linux 4.15.0-43-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Tue Dec 25 07:12:13 2018
InstallationDate: Installed on 2018-05-06 (232 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=ru_RU.UTF-8
 SHELL=/bin/bash
SourcePackage: evince
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
SYN-2009 (ra9uek) wrote :
Revision history for this message
madbiologist (me-again) wrote :

Thanks for reporting this bug. Can you please attach a PDF file that causes this issue?

Changed in evince (Ubuntu):
status: New → Incomplete
Changed in evince (Ubuntu):
importance: Undecided → High
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you also add your journalctl log after getting the issue?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for evince (Ubuntu) because there has been no activity for 60 days.]

Changed in evince (Ubuntu):
status: Incomplete → Expired
Revision history for this message
William Smith (wrsmith-y) wrote :

I also see this happen quite often.
The User Manual link posted here will trigger it when you open the link with Document Viewer.
https://www.star-cooperation.com/de/kompetenzen/elektronik/produkte/vernetzungstechnik/hardware/vernetzungszubehoer/flexmedia-100base-t1/

Revision history for this message
Esokrates (esokrarkose) wrote :

@William: I downloaded your pdf and checked: It does not reliably trigger this issue for me. But I experience the freeze issue almost daily, it happens randomly while zooming in documents. Sometimes I open a document and within the first zoom it freezes, sometimes I have to play around for minutes zooming and scrolling to trigger the issue.

Changed in evince (Ubuntu):
status: Expired → Confirmed
Changed in evince:
status: Unknown → New
Revision history for this message
Sebastien Bacher (seb128) wrote :

Is anyone still having this issue in focal?

Revision history for this message
Esokrates (esokrarkose) wrote :

@seb128: Yes, it's really annoying. I have to be really careful not to zoom too much in and out my documents as everytime it could be the last time before evince and all it's child windows freezes indefinitely.

It seems to me like it happens in the rendering code. Reproducing sometimes need patience as there does not seem to be a deterministic way to trigger it but if you sit down scroll and zoom in and out a document for some time it will definitely happen.

Revision history for this message
Esokrates (esokrarkose) wrote :

Also note that this deadlock happens both in wayland and xorg gnome session. The backtrace I generated in https://gitlab.gnome.org/GNOME/evince/-/issues/1222 was in the xorg session though.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank for confirming it's still an issue, setting as triaged

Changed in evince (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Togo28 (togo28) wrote :

Evince also stops while trying to print in Ubuntu 21.04

Revision history for this message
Ken Ryan (linuxryan) wrote :

I can confirm it happens to me also in 21.04. The PDF opens fine for me but the instant I hit print the evince process pegs the CPU and stays there indefinitely. Files are on the local disk. x86_64 architecture.

The most recent PDF that did this to me is here: https://www.lcps.org/site/handlers/filedownload.ashx?moduleinstanceid=305856&dataid=381294&FileName=New%20Health%20form%20MCH-213G-032014.pdf

Printing worked fine with 20.04, then I upgraded to 21.04 about a month ago and have not been able to print a PDF ever since.

One possibly interesting bit:

ryan@khym:/var/log$ sudo dmesg | tail
[947533.329921] audit: type=1400 audit(1629163613.332:388): apparmor="DENIED" operation="connect" profile="/usr/bin/evince" name="/run/user/1000/gvfsd/socket-DTLIeIXr" pid=77344 comm="pool-evince" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
[947538.329943] audit: type=1400 audit(1629163618.332:389): apparmor="DENIED" operation="connect" profile="/usr/bin/evince" name="/run/user/1000/gvfsd/socket-2diq9E0F" pid=77344 comm="pool-evince" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
[947543.329859] audit: type=1400 audit(1629163623.332:390): apparmor="DENIED" operation="connect" profile="/usr/bin/evince" name="/run/user/1000/gvfsd/socket-n0LaY8dp" pid=77344 comm="pool-evince" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
[947548.329836] audit: type=1400 audit(1629163628.332:391): apparmor="DENIED" operation="connect" profile="/usr/bin/evince" name="/run/user/1000/gvfsd/socket-GuW4c7UX" pid=77344 comm="pool-evince" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
[947553.330670] audit: type=1400 audit(1629163633.332:392): apparmor="DENIED" operation="connect" profile="/usr/bin/evince" name="/run/user/1000/gvfsd/socket-lW4MWUNt" pid=77344 comm="pool-evince" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
[947558.329769] audit: type=1400 audit(1629163638.332:393): apparmor="DENIED" operation="connect" profile="/usr/bin/evince" name="/run/user/1000/gvfsd/socket-jFM9PdLI" pid=77344 comm="pool-evince" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
[947563.331063] audit: type=1400 audit(1629163643.336:394): apparmor="DENIED" operation="connect" profile="/usr/bin/evince" name="/run/user/1000/gvfsd/socket-jt0kRZuk" pid=77344 comm="pool-evince" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
[947568.328371] audit: type=1400 audit(1629163648.332:395): apparmor="DENIED" operation="connect" profile="/usr/bin/evince" name="/run/user/1000/gvfsd/socket-9dOXwErT" pid=77344 comm="pool-evince" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
[947573.326570] audit: type=1400 audit(1629163653.328:396): apparmor="DENIED" operation="connect" profile="/usr/bin/evince" name="/run/user/1000/gvfsd/socket-tz4r2Rco" pid=77344 comm="pool-evince" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000
[947975.225424] audit: type=1400 audit(1629164055.230:397): apparmor="DENIED" operation="exec" profile="/usr/bin/evince" name="/usr/lib/x86_64-linux-gnu/libproxy/0.4.17/pxgsettings" pid=78607 comm="sh" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0

Revision history for this message
jbfoley (jbfoley1) wrote (last edit ):
Download full text (3.4 KiB)

Edit: I found the fix that worked for me previously. Credit to the original place I found it here: https://groups.google.com/g/linux.debian.bugs.dist/c/aKVjxvue8JY?pli=1

Basically, you have to add a line to /etc/apparmor.d/usr.bin.evince Under the section labeled "# 'Show Containing Folder' (LP: #1022962)"
Existing (as of 22.04):
  /usr/bin/nautilus Cx -> sanitized_helper, # Gnome
  /usr/bin/pcmanfm Cx -> sanitized_helper, # LXDE
  /usr/bin/krusader Cx -> sanitized_helper, # KDE
  /usr/bin/thunar Cx -> sanitized_helper, # XFCE

Add at the end of the list:
    /usr/lib/x86_64-linux-gnu/libproxy/0.4.17/pxgsettings Cx -> sanitized_helper, # Print Dialog

Then reboot or restart apparmor, and it works again. At least for me.

I'm posting it here because for whatever reason this solution is very hard to find.

Not sure I fully understand, but it kind of looks like Evince has decided to disown Unity and some other desktop environments? Or maybe just an oversight. Either way, this might not be the optimal way to fix this problem and I'm sure many like myself would appreciate it if the package maintainers would look into allowing pxgsettings to work again in the default install.

My original reply:

I'm also getting the issue where Evince freezes when I open the print dialog. I have two networked printers which work fine from any other program.

More background I can offer: I had this problem once before on this machine and I solved it by adding/changing some user permissions, but it came back after a do-release-upgrade to 22.04 and I can't seem to find the original instructions for the solution again. It was something like adding a particular user permission to a particular config file in apparmor. The first time I found the fix I was grasping at straws and found it in an odd way, maybe from a much older version of Ubuntu.

I'm using Ubuntu Unity 22.04 with Evince/Document Viewer 42.3 Here's my very similar relevant output from dmesg | tail showing apparmor denying something to evince:

[ 7408.546706] audit: type=1400 audit(1658690699.607:33): apparmor="DENIED" operation="exec" profile="/usr/bin/evince" name="/usr/lib/x86_64-linux-gnu/libproxy/0.4.17/pxgsettings" pid=10089 comm="sh" requested_mask="x" denied_mask="x" fsuid=1001 ouid=0
[ 7708.987550] audit: type=1400 audit(1658691000.048:34): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/bin/evince" pid=10802 comm="apparmor_parser"
[ 7709.009396] audit: type=1400 audit(1658691000.072:35): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/bin/evince//sanitized_helper" pid=10802 comm="apparmor_parser"
[ 7709.019154] audit: type=1400 audit(1658691000.080:36): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/bin/evince-previewer" pid=10802 comm="apparmor_parser"
[ 7709.049178] audit: type=1400 audit(1658691000.112:37): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/bin/evince-previewer//sanitized_helper" pid=10802 comm="apparmor_parser"
[ 7709.054590] audit: type=1400 audit(1658691000.116:38): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="...

Read more...

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.