In 20.04.1 all gtk2 apps starts 25 seconds

Bug #1891245 reported by Gregor Snak
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

I've installed Ubuntu 20.04.1 64bit today (three times as I was testing various different options). All GTK2 apps (for example gmrun, grun, anything compiled from lazarus with gtk2 target which is default) starts for 25 seconds. I ran strace to see what it was and I don't know. The 25s delay is at line containing the "(Timeout)" text.

$strace gmrun
...
fcntl(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(9, {sa_family=AF_UNIX, sun_path="/run/user/1000/bus"}, 110) = 0
getpid() = 1972
geteuid() = 1000
getegid() = 1000
getpid() = 1972
geteuid() = 1000
getegid() = 1000
sendmsg(9, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0", iov_len=1}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=1972, uid=1000, gid=1000}}], msg_controllen=32, msg_flags=0}, MSG_NOSIGNAL) = 1
sendto(9, "AUTH\r\n", 6, MSG_NOSIGNAL, NULL, 0) = 6
recvfrom(9, "REJECTED EXTERNAL\r\n", 4096, 0, NULL, NULL) = 19
sendto(9, "AUTH EXTERNAL 31303030\r\n", 24, MSG_NOSIGNAL, NULL, 0) = 24
recvfrom(9, "OK c0fd5f5eb963750ecf7ea86e5f329"..., 4096, 0, NULL, NULL) = 37
sendto(9, "NEGOTIATE_UNIX_FD\r\n", 19, MSG_NOSIGNAL, NULL, 0) = 19
recvfrom(9, "AGREE_UNIX_FD\r\n", 4096, 0, NULL, NULL) = 15
sendto(9, "BEGIN\r\n", 7, MSG_NOSIGNAL, NULL, 0) = 7
write(13, "\1\0\0\0\0\0\0\0", 8) = 8
eventfd2(0, EFD_CLOEXEC|EFD_NONBLOCK) = 12
write(12, "\1\0\0\0\0\0\0\0", 8) = 8
write(13, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=12, events=POLLIN}], 1, 25000) = 1 ([{fd=12, revents=POLLIN}])
read(12, "\1\0\0\0\0\0\0\0", 16) = 8
poll([{fd=12, events=POLLIN}], 1, 25000) = 0 (Timeout)
write(12, "\1\0\0\0\0\0\0\0", 8) = 8
futex(0x56295f4a8460, FUTEX_WAKE_PRIVATE, 2147483647) = 0
close(12) = 0
write(13, "\1\0\0\0\0\0\0\0", 8) = 8
futex(0x7f252fc59f38, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f252fc59f38, FUTEX_WAKE_PRIVATE, 2147483647) = 0
statfs("/home/desktop", {f_type=EXT2_SUPER_MAGIC, f_bsize=4096, f_blocks=59255762, f_bfree=57420816, f_bavail=54393360, f_files=15122432, f_ffree=14879564, f_fsid={val=[600210708, 1196524894]}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
futex(0x7f252fc59f38, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f252fc59f38, FUTEX_WAKE_PRIVATE, 2147483647) = 0
inotify_init1(IN_CLOEXEC) = 12
fcntl(12, F_GETFL) = 0 (flags O_RDONLY)
fcntl(12, F_SETFL, O_RDONLY|O_NONBLOCK) = 0

I've tried to find what fd 12 is and it seems to be this:

$ cat strace.log | grep -e Timeout -e open | grep -e 12 -e Timeout
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 12
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libproxy.so.1", O_RDONLY|O_CLOEXEC) = 12
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/gio/modules/libgiognomeproxy.so", O_RDONLY|O_CLOEXEC) = 12
poll([{fd=12, events=POLLIN}], 1, 25000) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=7, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=7, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=7, events=POLLIN}], 3, 0) = 0 (Timeout)

So maybe libgiognomeproxy.so? On other forum I got suggestion that maybe hostname is not in /etc/hosts but it is there:

127.0.0.1 localhost
127.0.1.1 desktop
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

This is how I installed ubuntu:

1. iso 20.04.1 amd64 on usb stick, tried bot SSD and normal hard drive
2. install ubntu in english
3. English (US), English (US)
4. Normal installation, Download updates, Install third party sw
5. Erase disk and install Ubuntu, Advanced features: Use LVM, Encrypt
6. 2x same password
7. Choose Bratislava location
8. Your Name: desktop
   Computer name: desktop
   username: desktop
   2x password
   Log in automatically
9. Wait for install to finish, restart, install updates, restart
10. Alt+F2 gnome terminal, sudo apt-get install gmrun
11. gmrun - it takes 20s to appear

Revision history for this message
Thiago F. Pappacena (pappacena) wrote :

Not a bug in Launchpad itself. Moving it to Ubuntu.

affects: launchpad → ubuntu
Revision history for this message
Gregor Snak (gsnak) wrote :

Solved by:

sudo apt-get install appmenu-gtk2-module
sudo apt-get install libcanberra-gtk-module
reboot

Revision history for this message
Gregor Snak (gsnak) wrote :

Also I found out that if I use other wm than unity I must manually run this: /usr/libexec/gsd-xsettings

Revision history for this message
Gregor Snak (gsnak) wrote :

I also had to put:

    export GTK_MODULES=gail:atk-bridge:appmenu-gtk-module

In ~/.profile to fix lazarus apps.

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

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

Changed in ubuntu:
status: New → Confirmed
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.