Gnome programs (eog/gnome-terminal) have a slow start and produce a DBus.Error.NoReply Warning

12,238

Solution 1

Unfortunately, this isn't a solution, but this information might be of help to you.

I think, your problem is that gnome-terminal and eog are attempting to connect to an at-spi D-bus instance socket, which is mis-configured.

How D-bus works in general:

Start-up

There are 2 instances of casual D-bus, running on your machine, per-system and per-user, and a special accessibility-related one - at-spi, started by at-spi-bus-launcher.

Per-system instance is started by init scripts, e.g. on Mint with /etc/init/dbus.

Per-user instance is run, when Xsession starts /etc/X11/Xsession.d/75dbus_dbus-launch.

at-spi instance seems to be started by gnome-session, which reads .desktop files from the system $xdg directory. At-spi is configured by /etc/xdg/autostart/at-spi-dbus-bus.desktop, which starts at-spi instance.

Functioning and configuration

D-bus works as a message broker for gnome applications. They can send messages to each other by calling functions of dbus-glib binding (glib is the general Gnome C library, which is used by most gnome applications).

Moreover, applications can send messages to other applications, that were not started yet. In that case dbus may first start ("activate") the recipient service and then deliver message to it (which is often abused by gnome guys to start new processes).

enter image description here

What services D-bus can activate is determined by configuration files in /usr/share/dbus-1/ folder. system-services subfolder is for per-system dbus instance, services - for per-user one.

Note also, that those d-bus instances create a UNIX-domain socket and listen for messages from applications. Applications connect to those sockets on start-up and exchange data with each other via D-bus. Sockets may be mapped to file system (as for per-system instance of D-bus, whose socket is mapped to /var/run/dbus/system_bus_socket) or not.

How to solve your problem (I don't know, actually)

I guess that you messed up the configuration of at-pci instance: either its start-up by gnome-session (/etc/xdg/autostart/at-spi-dbus-bus.desktop) or its socket location.

Unfortunately, I don't have any more concrete ideas of what to do. Could you supply your ps or pstree information, regarding at-pci and gnome-terminal?

Update

I tried to find out the source of your error message:

I've tried grepping the source code of gnome-terminal. grep -r "spi" gnome-terminal/ doesn't give any results; grep -r "dbus" gnome-terminal/ gives some, but they seem to be related to the normal dbus, not at-pci one. So, I believe, gnome-terminal doesn't access at-spi2 directly.

Instead, just some gtk widgets are implicitly calling gail or atk functions, which in turn try to interact with at-spi subsystem and fail to do so, cause you've killed it:

enter image description here enter image description here

So, I think the solution for you is to restore the following files of at-spi2-core package ( based on dpkg -L at-spi2-core) or just to re-install the whole package:

/usr/lib/at-spi2-core/at-spi-bus-launcher
/usr/lib/at-spi2-core/at-spi2-registryd
/usr/share/upstart/xdg/autostart/at-spi-dbus-bus.desktop
/usr/share/upstart/sessions/at-spi2-registryd.conf
/usr/share/doc/at-spi2-core/README
/usr/share/doc/at-spi2-core/copyright
/usr/share/doc/at-spi2-core/NEWS.gz
/usr/share/dbus-1/services/org.a11y.atspi.Registry.service
/usr/share/dbus-1/services/org.a11y.Bus.service
/etc/at-spi2/accessibility.conf
/etc/xdg/autostart/at-spi-dbus-bus.desktop
/etc/X11/Xsession.d/90qt-a11y
/usr/share/doc/at-spi2-core/changelog.Debian.gz

ALTERNATIVELY, you could try to disable the accessibility by inverting the actions, described here to enable it. (Basically, you'll have to tweak some flags in gconftool-2 as described in "Setting up the accessible application development and test environment" section).

Useless, but interesting info

I've done some more digging in source code of at-spi2-core

README at master/bus/at-spi-bus-launcher.c folder tells that at-spi-bus-launcher is started by per-session instance of dbus as expected. Interestingly, there's also an X windows root window property AT_SPI_BUS, you can find its value via xprop --root command and for me it equals

AT_SPI_BUS(STRING) = "unix:abstract=/tmp/dbus-vGwJEbWTQL,guid=76b894a309e380de6265479c53e8b537"

I don't know, what it is, I expected it to be a socket location, but there's no such file in /tmp for me. :(

Update 2

I think the precise reason of your problem might be that the ordinary per-system dbus sees your /usr/share/dbus-1/services/org.a11y.Bus.service file and is trying to activate it in response to atk calls from gnome-terminal (because your gconf or dconf settings have accessibility enabled and this tells gtk widgets to deliver messages to at-spi). This fails, cause you've removed the at-spi-bus-launcher binary.

What makes me think so is my own experience with Caribou Antler. Caribou is a shitty virtual keyboard, installed with Debian. I've got a Debian 7 tablet, where I installed another virtual keyboard from Ubuntu repository - the awesome OnBoard. The thing is that both keyboards are turned on/off by the same accessibility key in dconf. So if the key is on, both are activated by a click on GtkEntry or GtkTextView so that the shitty Caribou doesn't let my OnBoard work properly. And if I disable accessibility in gconf/dconf, OnBoard is disabled, too. :(

So I did a crude hack and just commented out the contents of my /usr/share/dbus-1/services/org.gnome.Caribou.Antler.service file. Now when dbus is trying to activate Caribou, it fails, while OnBoard is activated ok.

But when I start some graphical app from terminal, such as sublime_text, I receive an error message, which is formatted in a very similar way to yours:

(sublime_text:4797): CARIBOU-CRITICAL **: file caribou-gtk-module.c: line1041: unexpected error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Caribou.Keyboard was not provided by any .service files (g-dbus-error-quark, 2)

Solution 2

This solves it for me

export NO_AT_BRIDGE=1

alias open='xdg-open '

then to trigger appropriate app to open arbitrary file issue (for example) :

open some-cool-image.jpg
Share:
12,238

Related videos on Youtube

polym
Author by

polym

[email protected]

Updated on September 18, 2022

Comments

  • polym
    polym over 1 year

    For some time, eog and gnome-terminal are starting very slowly on my (X)Ubuntu 13.10. I think other Gnome tools are affected too, but I don't use any others.

    Now I get a org.freedesktop.DBus.Error.NoReply error every time gnome-terminal starts:

    ** (gnome-terminal:5516): WARNING **: 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.

    and every time eog starts:

    ** (eog:4996): WARNING **: 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.

    (eog:4996): EOG-WARNING **: Couldn't load icon: Icon 'image-loading' not present in theme

    I think it has something to do with me removing some programs that were starting by default, including at-spi2-registryd, which I think belongs to Gnome's Accessibility Project.

    According to dpkg --getselections | grep spi, at-spi2-core is still installed on my system.

    I remember doing something very hacky/stupid like exchanging some config files or binaries with empty echo programs to stop the daemon from starting.

    • How can I fix this error?
    • What causes this error?

    Google produces some at-spi... related links:

    This might have to do with a freedesktop related issue I have with nmcli, so please have a look at it: nmcli freedesktop DBus warnings and errors.


    ltrace -r eog:

    0.000000 __libc_start_main(0x41e210, 2, 0x7fff41235b18, 0x45c020, 0x45c0b0 <unfinished ...>
    0.000734 bindtextdomain("eog", "/usr/share/locale") = "/usr/share/locale"
    0.001297 bind_textdomain_codeset(0x463fff, 0x45c0f6, 1, 0, 65535) = 0x1d59750
    0.000863 textdomain("eog")                     = "eog"
    0.000759 dcgettext(0, 0x45c0fc, 5, 0x676f65, 65535) = 0x45c0fc
    0.000718 g_option_context_new(0x45c0fc, 1, 2, 3, 0) = 0x1d598e0
    0.000711 g_option_context_add_main_entries(0x1d598e0, 0x45c300, 0x463fff, 0x1d59940, 88) = 0
    0.000668 gtk_get_option_group(1, 0x7f161670f2e0, 0x1d59960, 0x7f161670bec0, 0) = 0x1d5ccd0
    0.003283 g_option_context_add_group(0x1d598e0, 0x1d5ccd0, 0x1d5cf60, 0x7f161670bec0, 3) = 0x1d5d000
    0.000711 g_irepository_get_option_group(0, 0, 0x1d5d000, 0x1d50670, 0) = 0x1d5cf80
    0.000845 g_option_context_add_group(0x1d598e0, 0x1d5cf80, 0x1d5d830, 3, 3) = 0x1d5d000
    0.000613 g_option_context_parse(0x1d598e0, 0x7fff41235a0c, 0x7fff41235a00, 0x7fff41235a18, 0
    ** (eog:2797): WARNING **: 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.
    ) = 1
    25.069454 g_option_context_free(0x1d598e0, 0x7fff41235b18, 0x7fff41235b20, 0x7fff412373c4, 2) = 0
    0.000330 xmp_init(0x7f1616281740, 0xffffffff, 0, 0x7f1616281768, 0) = 1
    0.001356 g_getenv(0x45c905, 0x1dbb610, 0x1dbb5c0, 1, 3) = 0
    
    [...]
    
    0.000509 g_object_ref(0x204f240, 3, 1, 51, 0x7f16080008e0) = 0x204f240
    0.000681 g_queue_push_tail(0x1d5d780, 0x204f240, 2, 51, 0x204d270) = 0x1ff5ce0
    0.000793 g_cond_broadcast(0x67b7d0, 0x1ff5ce0, 0, 16, 0) = 0
    0.000797 g_mutex_unlock(0x67b7c0, 132, 1, -1, 0x7f16080008e0) = 0
    0.000716 g_object_unref(0x204f240, 0, 0x7f16080008e0, -1, 0x7f16080008e0) = 2
    
    (eog:2797): EOG-WARNING **: Couldn't load icon: Icon 'image-loading' not present in theme
    0.048019 gtk_icon_view_get_type(0x1fb23b0, 0x450510, 0x1fb23b0, 0x7f1616703450, 0x1d50a60) = 0x2015420
    0.000800 g_type_check_instance_cast(0x1fb23b0, 0x2015420, 0x1fb23b0, 0x7f1616703450, 0x1d50a60) = 0x1fb23b0
    0.000743 gtk_icon_view_get_visible_range(0x1fb23b0, 0x7fff41235820, 0x7fff41235828, 0x2015420, 0x2015420) = 0
    0.000588 gtk_icon_view_get_type(0x1fb23b0, 0x450510, 0x1fb23b0, 0x7f1616703450, 0x1d50a60) = 0x2015420
    
    [...]
    

    ltrace -r gnome-terminal:

    [...]
    
    0.000543 g_str_hash(0x7f1ba08d1617, 0x7f1ba08d1617, 0x21cd180, 0, 0x219d050) = 0x6e8257f7
    0.000714 g_str_hash(0x7f1ba08d194c, 0x7f1ba08d194c, 0, 0x7f1ba08d194c, 0) = 0x24119b48
    0.000490 g_str_hash(0x7f1ba08d194c, 0x7f1ba08d194c, 0x21bcaa0, 0, 0x219d050) = 0x24119b48
    0.000655 g_str_hash(0x7f1ba12f72c7, 0x7f1ba12f72c7, 0, 0x7f1ba12f72c7, 40) = 0xac0d625f
    0.000596 g_str_hash(0x7f1ba12f72c7, 0x7f1ba12f72c7, 0x21bcc20, 0, 0x219d050) = 0xac0d625f
    
    [...]
    
    ** (gnome-terminal:5758): WARNING **: 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.
    25.036838 g_str_hash(0x7f1ba0b4452a, 0x7f1ba0b4452a, 0, 0x7f1ba0b4452a, 508) = 0xa59bb851
    0.000696 g_str_hash(0x21b18bc, 0x21b18bc, 0x21d7080, 0, 509) = 0xa59bb851
    0.000501 g_str_hash(0x7f1ba13cf396, 0x7f1ba13cf396, 0, 0x7f1ba13cf396, 24) = 0x22c79e89
    0.000550 g_str_hash(0x7f1ba13cf396, 0x7f1ba13cf396, 0x21d7150, 0, 0x219d050) = 0x22c79e89
    0.003683 g_str_hash(0x7f1ba0dc076b, 0x7f1ba0dc076b, 0, 0x7f1ba0dc076b, 384) = 0xa4fa89ab
    

    strace -r eog:

    [...]
    0.000268 poll([{fd=3, events=POLLIN}], 1, 25000) = 1 ([{fd=3, revents=POLLIN}])
    0.000723 recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"l\2\1\1\v\0\0\0\1\0\0\0=\0\0\0\6\1s\0\6\0\0\0:1.307\0\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 262
    0.000351 recvmsg(3, 0x7ffff251a080, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
    0.000339 sendmsg(3, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1\0\0\0\0\2\0\0\0[\0\0\0\1\1o\0\r\0\0\0/org/a11"..., 112}, {"", 0}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 112
    0.000354 poll([{fd=3, events=POLLIN}], 1, 25000) = 0 (Timeout)
    25.025550 open("/usr/lib/x86_64-linux-gnu/charset.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
    0.000410 write(2, "\n** (eog:2786): WARNING **: Erro"..., 319
    ** (eog:2786): WARNING **: 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.
    ) = 319
    0.000660 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4
    0.000305 connect(4, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, 20) = 0
    0.000243 getpeername(4, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, [20]) = 0
    
    [...]
    
    0.000054 poll([{fd=4, events=POLLIN}], 1, 4294967295) = 1 ([{fd=4, revents=POLLIN}])
    0.000029 recvfrom(4, "\1\0\213\0\0\0\0\0\240\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
    0.000027 recvfrom(4, 0x1709c34, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
    0.000026 recvfrom(4, 0x1709c34, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
    0.000027 poll([{fd=4, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=4, revents=POLLOUT}])
    
    (eog:2786): EOG-WARNING **: Couldn't load icon: Icon 'image-loading' not present in theme
    ) = 16
    0.000056 poll([{fd=4, events=POLLIN}], 1, 4294967295) = 1 ([{fd=4, revents=POLLIN}])
    0.000029 recvfrom(4, "\1\0\214\0\0\0\0\0\241\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
    0.000028 recvfrom(4, 0x1709c34, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
    0.000026 recvfrom(4, 0x1709c34, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
    0.000032 poll([{fd=4, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=4, revents=POLLOUT}])
    

    strace -r gnome-terminal:

    [...]
    
    0.000406 recvmsg(3, 0x7fffb9bbc6e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
    0.000434 sendmsg(3, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1\0\0\0\0\2\0\0\0[\0\0\0\1\1o\0\r\0\0\0/org/a11"..., 112}, {"", 0}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 112
    0.000328 poll([{fd=3, events=POLLIN}], 1, 25000) = 0 (Timeout)
    25.006307 open("/usr/lib/x86_64-linux-gnu/charset.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
    0.000486 write(2, "\n** (gnome-terminal:5885): WARNI"..., 330
    ** (gnome-terminal:5885): WARNING **: 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.
    ) = 330
    0.000519 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4
    0.000118 connect(4, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, 20) = 0
    0.000125 getpeername(4, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, [20]) = 0
    
    [...]
    
    • Admin
      Admin almost 10 years
      Do this happens with all users or just yours?
    • Admin
      Admin almost 10 years
      @Braiam Yes. I just tested it with user root by using su -, then eog.
    • Admin
      Admin almost 10 years
      Perhaps strace (e.g. strace -r) or ltrace (e.g. ltrace -r) could shed some light.
    • Admin
      Admin almost 10 years
      @CristianCiupitu I've added the relevant data. There are 2 calls that are taking about 25 seconds (!).
    • Admin
      Admin almost 10 years
      Great! What about other GTK+/GNOME programs, e.g. gedit or gnome-disks? Are their traces similar?
    • Admin
      Admin almost 10 years
      @CristianCiupitu I've added the similar output of gnome-terminal. It is missing the second "loading icon" warning, though.
    • Admin
      Admin almost 10 years
      The delay is caused by the poll function which has a very long timeout of 25000 miliseconds. All that remains is to find out what it's waiting for. Could you pastebin the whole traces or add the parts that show what file descriptor (fd) 3 represents? poll polls it ({fd=3, events=POLLIN}), so we need to find out what file or network address it represents. Look for open, socket, etc. calls.
    • Admin
      Admin almost 10 years
      Could you add another user and login with it graphically (no su or sudo stuff) and verify that it has the same problem?
    • Admin
      Admin almost 10 years
      @CristianCiupitu Will do, tomorrow at the latest. If the bounty is gone by then, I'll just renew the bounty.
    • Admin
      Admin over 9 years
      Could you uninstall, remove any configuration files left over and reinstall at-spi2?
    • Admin
      Admin over 9 years
      polym, see update to my answer :)
    • Admin
      Admin over 9 years
      @Bob cool answer :). I'll test and try to provide more info. Currently I don't have much time though :). Thank you for spending your time with my problem! :D
    • Admin
      Admin over 9 years
      @Bob you are just awesome :). Ill take a deeper look at your suggwstions in the coming days :). Thanks man