Evince only reliably opens PDFs if Evince is started first, hung Evince instance causes system freeze if clicked on
1
vote
0
answers
87
views
On my machine (see details below) Evince does not open documents as expected, but this depends on the method used. The two methods I mean are:
- (A) starting Evince by giving a document as a target (e.g. clicking on the document and using "open with" and "Evince" *or* running
evince
from the terminal);
- (B) starting Evince first, without a document, and then clicking on "open..." in the Evince window *or* dragging a document on top of an already open Evince window (this opens another Evince window with the new document).
Method A (mostly) does not work. This results in a hung process, which I can see with pgrep
and via an icon in the dock. htop
shows that these processes use nearly no CPU and nearly no memory. I can kill these processes normally. However, if I click on the icons for these Evince instances in the dock, my system immediately and completely freezes (I cannot open a tty
), and the solution is a forced restart via the power button.
The exceptions: Method A sometimes works. I found it (mostly but *maybe* not always? I am unsure now) works on a small (0.5 MB) PDF which *has only images and no text*. I found it would *sometimes* also work on a medium sized (4 MB) PDF with both image and text. In this case, a window would sometimes also appear with the UI for viewing PDFs, but the PDF would not appear. Other times, the process would hang or the PDF would open normally. I found it would not work on a larger PDF (6 MB) with both images and text, and I never got it to work on a small (0.2 MB) PDF with only text and no images. I also tried a small (0.2 MB) .ps image, and could not open it with method A.
Method B (mostly) functions normally.
The exception: Method B sometimes does not work if a hung process is already running. That is, if a hung process is running, I can get an empty Evince window open, but using "open..." or dragging a document onto the window sometimes opened the document and sometimes not.
My machine:
- Ubuntu 20.04.6, 64 bit
- Windowing system: Wayland
- 64 GiB of memory
- 11th gen Intel processor
- Some onboard graphics: Mesa Intel XE (TGL GT2)
- 2 TB SSD space, nowhere near full
Additionally, I'll add that this was not always a problem. I used to be able to use Evince totally normally. However, at some point in time in the past, this behavior started, and I simply avoided using Evince because I couldn't identify what might have changed.
Some more diagnostics:
I tried running strace
on a hung Evince process. I read this could be helpful, but I don't understand any of the output:
strace: Process 12102 attached
restart_syscall() = 1
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
recvmsg(11, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\4\1\1\21\0\0\0\373\5\0\0\205\0\0\0\1\1o\0\30\0\0\0/org/a11"..., iov_len=2048}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 169
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
recvmsg(11, {msg_namelen=0}, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}], 3, 0) = 1 ([{fd=5, revents=POLLIN}])
read(5, "\3\0\0\0\0\0\0\0", 16) = 8
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}], 3, -1) = 1 ([{fd=11, revents=POLLIN}])
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
recvmsg(11, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\4\1\1\21\0\0\0\375\5\0\0\205\0\0\0\1\1o\0\30\0\0\0/org/a11"..., iov_len=2048}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 169
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
recvmsg(11, {msg_namelen=0}, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
write(5, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}], 3, 0) = 1 ([{fd=5, revents=POLLIN}])
read(5, "\3\0\0\0\0\0\0\0", 16) = 8
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}], 3, -1
I waited some minutes, and no additional output was written. I also ran netstat
because read that could be helpful, but again I don't understand the output.
$ netstat -p | grep 12102
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
unix 3 [ ] STREAM CONNECTED 150817 12102/evince
unix 3 [ ] STREAM CONNECTED 149214 12102/evince
unix 3 [ ] STREAM CONNECTED 149075 12102/evince
unix 3 [ ] STREAM CONNECTED 149074 12102/evince
unix 3 [ ] STREAM CONNECTED 149213 12102/evince
unix 3 [ ] STREAM CONNECTED 151902 12102/evince
I ran ls -l /proc//fd
, again, because I read it could help. On a hung process (12102) and then, after killing this process and using method B on the same PDF (process 15795):
@:~$ ls -l /proc/12102/fd
total 0
lr-x------ 1 64 Okt 11 18:37 0 -> /dev/null
lrwx------ 1 64 Okt 11 18:37 1 -> 'socket:'
lrwx------ 1 64 Okt 11 18:37 10 -> 'socket:'
lrwx------ 1 64 Okt 11 18:37 11 -> 'socket:'
lrwx------ 1 64 Okt 11 18:37 12 -> 'anon_inode:[eventfd]'
lr-x------ 1 64 Okt 11 18:37 13 -> anon_inode:inotify
lr-x------ 1 64 Okt 11 18:37 14 -> '/home//.local/share/gvfs-metadata/home (deleted)'
lr-x------ 1 64 Okt 11 18:37 15 -> '/home//.local/share/gvfs-metadata/home-a9b0a1cb.log (deleted)'
lr-x------ 1 64 Okt 11 18:37 16 -> /home//Downloads/.pdf
lrwx------ 1 64 Okt 11 18:37 2 -> 'socket:'
lrwx------ 1 64 Okt 11 18:37 3 -> 'socket:'
lrwx------ 1 64 Okt 11 18:37 4 -> 'anon_inode:[eventfd]'
lrwx------ 1 64 Okt 11 18:37 5 -> 'anon_inode:[eventfd]'
lrwx------ 1 64 Okt 11 18:37 6 -> 'anon_inode:[eventfd]'
lrwx------ 1 64 Okt 11 18:37 7 -> '/memfd:wayland-cursor (deleted)'
lrwx------ 1 64 Okt 11 18:37 8 -> 'socket:'
lrwx------ 1 64 Okt 11 18:37 9 -> 'anon_inode:[eventfd]'
@:~$ ls -l /proc/15795/fd
total 0
lr-x------ 1 64 Okt 11 18:58 0 -> /dev/null
lrwx------ 1 64 Okt 11 18:58 1 -> 'socket:'
lrwx------ 1 64 Okt 11 18:58 10 -> 'socket:'
lr-x------ 1 64 Okt 11 18:58 102 -> '/home//.local/share/gvfs-metadata/root-5357d137.log (deleted)'
lrwx------ 1 64 Okt 11 18:58 11 -> 'socket:'
lrwx------ 1 64 Okt 11 18:58 12 -> 'anon_inode:[eventfd]'
lr-x------ 1 64 Okt 11 18:58 13 -> anon_inode:inotify
lr-x------ 1 64 Okt 11 18:58 14 -> '/home//.local/share/gvfs-metadata/home (deleted)'
lrwx------ 1 64 Okt 11 18:58 15 -> '/memfd:wayland-cursor (deleted)'
lr-x------ 1 64 Okt 11 18:58 16 -> '/home//.local/share/gvfs-metadata/home-41fe52fb.log (deleted)'
lr-x------ 1 64 Okt 11 18:58 17 -> /home//Downloads/.pdf
lrwx------ 1 64 Okt 11 18:58 2 -> 'socket:'
lrwx------ 1 64 Okt 11 18:58 3 -> 'socket:'
lrwx------ 1 64 Okt 11 18:58 4 -> 'anon_inode:[eventfd]'
lrwx------ 1 64 Okt 11 18:58 5 -> 'anon_inode:[eventfd]'
lrwx------ 1 64 Okt 11 18:58 6 -> 'socket:'
lr-x------ 1 64 Okt 11 18:58 60 -> '/home//.local/share/gvfs-metadata/root (deleted)'
lrwx------ 1 64 Okt 11 18:58 7 -> 'anon_inode:[eventfd]'
lrwx------ 1 64 Okt 11 18:58 8 -> 'anon_inode:[eventfd]'
lrwx------ 1 64 Okt 11 18:58 9 -> '/memfd:wayland-cursor (deleted)'
This looks the same to me, except that the latter process has two "wayland cursor" lines.
I would appreciate all your suggestions about how to diagnose this. I typically would use Okular for PDFs, but I found Evince tended to work better with PDFs that have large images, and I am starting to view more PDFs of that kind. Also, this problem just utterly perplexes me and I'd like to solve it.
Asked by ed-eddy-edward
(11 rep)
Oct 11, 2023, 05:15 PM
Last activity: Oct 14, 2023, 01:51 PM
Last activity: Oct 14, 2023, 01:51 PM