roddhjav / apparmor.d

Full set of AppArmor profiles (~ 1500 profiles)
https://apparmor.pujol.io
GNU General Public License v2.0
468 stars 47 forks source link

Long delay in starting gtk applications #80

Closed bcmertz closed 1 year ago

bcmertz commented 2 years ago

Nothing appears in aa-log unfortunately, however we can see some errors when starting a gtk application

Firefox errors:

[1336000, Main Thread] WARNING: Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.Daemon: Timeout was reached (g-io-error-quark, 24)
: 'glib warning', file /build/firefox/src/firefox-105.0.1/toolkit/xre/nsSigHandlers.cpp:167

(firefox:1336000): GVFS-WARNING **: 22:34:42.204: Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.Daemon: Timeout was reached (g-io-error-quark, 24)

Pcmanfm:

(pcmanfm:1485805): GVFS-WARNING **: 22:51:15.444: Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.Daemon: Timeout was reached (g-io-error-quark, 24)

Emacs (regular toolkit, not pgtk):

(emacs:1506491): GVFS-WARNING **: 22:53:45.774: Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.Daemon: Timeout was reached (g-io-error-quark, 24)

(emacs:1494791): dbind-WARNING **: 22:52:45.724: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

I'm not positive these are due to the apparmor profiles, however these delays don't occur without them enabled

System info (arch):

core/linux 5.19.12.arch1-1 [installed]
aur/apparmor.d-git 0.794-1 (+3 2.28) (Installed: 0.814-1)
extra/apparmor 3.1.1-1 (1.1 MiB 3.9 MiB) (Installed)
core/dbus 1.14.2-1 [installed]
extra/gvfs 1.50.2-1 (gnome) [installed]

Thank you for this excellent library! Please let me know if there's any additional information I can provide

roddhjav commented 2 years ago

Thanks for your issue. So I a have similar issue. It is similar to https://unix.stackexchange.com/questions/145167/gnome-programs-eog-gnome-terminal-have-a-slow-start-and-produce-a-dbus-error-n The complexity is that:

  1. It works fine without AppArmor
  2. It works fine on most system (including test VM)
  3. It seems to be dbus related
  4. On archlinux, the dbus mediation is not enabled. So there is nothing special to allow.

I am testing some stuff and will post update here.

bcmertz commented 2 years ago

That sounds great, thank you very much for looking it!