Hang starting some apps

Hi there,

Experiencing this on Tumbleweed and Leap 15.4.

I use xfce as a desktop environment and lightdm as a displaymanager.
Tumbleweed is a AMD Ryzen 7 5800H, 32GB RAM, 500GB NVME SSD
Leap 15.4 is an intel i3-8100, 16GB RAM, 256GB NVME SSD
So neither should be slow…

When I launch several applications e.g. evince and firefox are the two I have found so far, they take approx 30 seconds to appear.

I did an strace on evince, and it seemed to hang for 25 seconds at one point before continuing.

Since it also takes longer to login (to xfce)** than I would expect, again around 30 seconds I suspect that something running during login is also experiencing this problem. This happens for all users so unlikely to be user related.

**Logins on the console are pretty much instant.

Does anyone have any clues as to what be the problem here?
Feel free to prompt for additional information.

Cheers.

Phill.

If you know how to use strace (good!) did you notice where it was waiting for?

Is it always happening or just “occasionally”? In the latter case, if you are you using a BTRFS file system, it may just be doing it’s “homework” i.e. balance, scrub, trim etc. routine. It can be a bit of a nuisance but I didn’t change the settings, I just let it go by.

I’ve shared the strace log here : https://www.dropbox.com/s/d7zdnvwglflw5vq/evince_strace2.txt?dl=0

It looks to be hanging on this poll call :

10:11:24.087009 poll([{fd=11<anon_inode:[eventfd]>, events=POLLIN}], 1, 25000) = 0 (Timeout) <25.016102>

Cheers.

Phill.

Agreed, it is this poll timeout that seems to be the culprit. It is for fd (File Descriptor) 11 and I filtered lines related to that.

10:11:24.086243 openat(AT_FDCWD</tmp>, "/usr/share/locale/en_GB/LC_MESSAGES/libhandy.mo", O_RDONLY) = 11</usr/share/locale/en_GB/LC_MESSAGES/libhandy.mo> <0.000013>
10:11:24.086275 newfstatat(11</usr/share/locale/en_GB/LC_MESSAGES/libhandy.mo>, "", {st_mode=S_IFREG|0644, st_size=23592, ...}, AT_EMPTY_PATH) = 0 <0.000010>
10:11:24.086304 mmap(NULL, 23592, PROT_READ, MAP_PRIVATE, 11</usr/share/locale/en_GB/LC_MESSAGES/libhandy.mo>, 0) = 0x7f8e8c53b000 <0.000015>
10:11:24.086336 close(11</usr/share/locale/en_GB/LC_MESSAGES/libhandy.mo>) = 0 <0.000008>
  1. The file /usr/share/locale/en_GB/LC_MESSAGES/libhandy.mo is opened as read-only.
  2. The stats for that file are queried
  3. contens of the file are mmap-ed
  4. The file descriptor is closed
10:11:24.086838 eventfd2(0, EFD_CLOEXEC|EFD_NONBLOCK) = 11<anon_inode:[eventfd]> <0.000011>
10:11:24.087009 poll([{fd=11<anon_inode:[eventfd]>, events=POLLIN}], 1, 25000) = 0 (Timeout) <25.016102>
  1. An Event notification file descriptor is created reusing the earlier fd 11. It’s counter is initialized to 0
  2. A poll is done and that will only return if that counter (that was initialized to 0) has a value greater than 0.

I think another process should update that counter to indicate something but without a good log it is hard to know what that is.

I think I’ve solved it, apparently it’s a bug in xdg-desktop-portal-gnome detailed here :

https://bbs.archlinux.org/viewtopic.php?id=285590

Long story short : running

systemctl --user mask xdg-desktop-portal-gnome

Seems to have fixed it.

Cheers.

Phill.

2 Likes