[gutsy] gconfd starts with session, but apps say that gconfd can't be contacted and user settings are not loaded

Bug #139368 reported by Vincenzo Ciancia
10
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)
New
Medium
Unassigned
Declined for Gutsy by Sebastien Bacher
gconf2 (Ubuntu)
New
Undecided
Unassigned
Declined for Gutsy by Sebastien Bacher

Bug Description

I halted my system normally, but when I booted it again and logged in, a window popped up saying that gconfd can't be contacted. This happened to me a couple of times. In feisty and previous releases, this could happen because of logging out by pressing ctrl+alt+backspace (there are bugs opened) but I suspect this bug is different. Actually, in many cases, gconfd deadlocks when pressing ctrl+alt+backspace, but the case I am reporting is different since I just booted my system. It seems like gconfd was just too slow to be reached on time for the start of the session, but that might be just an impression.

In any case, I have a strangely looking gtk theme and all settings are gnome defaults I suppose. However, compiz settings have been loaded normally, even if I am using the gconf-backend, which seems to confirm the "too slow to get session startup in time" thesis, since compiz is really slow to start, and might be the last process in the session to attempt to contact gconfd. This is all I can say by looking at the problem "externally". I attach my .xsession-errors and syslog, if you need more information tell me, when it happens again I will try to provide that.

Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :
Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :
Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :
Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

I can add that, just logging out and then back in, everything works fine. Notice that at bootup system is really slowed down because gdm autologin happens while other daemons are starting in background, so there is high disk load at my first login.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.According to the xsession-errors it seems that you don't have a dbus service running or it's broken, may you check if it's running?

Changed in gconf2:
assignee: nobody → desktop-bugs
status: New → Incomplete
Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

It happened again now. I attach a new .xsession-errors, and output from "ps aux"

Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :
Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

Rebooting didn't help, I am not able to restore my settings anymore. If I open the gnome theme manager, I can see that settings are correct there, just they aren't being used.

Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

I had to remove files in /tmp to recover my settings.

Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

See also this question, which seems to state that the bug also happens on livecd:

https://answers.edge.launchpad.net/ubuntu/+question/4499

Revision history for this message
Sebastien Bacher (seb128) wrote :

looks rather a local issue with dbus than a bug, closing since that's not really a gconf bug and is working now, feel free to reopen if you disagree though

Changed in gconf2:
importance: Undecided → Medium
status: Incomplete → Invalid
Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

It is not working now, just it happens every now and then. And I've seen this happen on other people's computers. It's not a local issue. I recognize this when I see a little "man" and a door in place of the red "exit" button in the upper right corner of the gnome desktop. Usually, logging out and in makes it work, but it will not make new users feel all right.

Once, it also happened that logging out and in or rebooting didn't help. Then, I had to remove files in /tmp. But the bug I am reporting is about something happening at log in, so that gnome says there is no gconfd, even though gconfd, dbus and friends are running (I reported output of "ps aux").

Hope this clarifies the issue.

Changed in gconf2:
status: Invalid → New
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you describe an easy way to trigger the issue?

Changed in gconf2:
status: New → Incomplete
Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

I boot my system normally, but have auto-login enabled in gdm, and some application that increases disk-load a lot, loaded with the session. I think this can cause delays starting gconfd, or creating sockets, so that nautilus does not find the socket at login, and gconf starts later. However, I don't have any means to certainly reproduce.

Revision history for this message
Sebastien Bacher (seb128) wrote :

looks like a dbus issue

Changed in gconf2:
assignee: desktop-bugs → nobody
status: Incomplete → New
Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

I appreciate you removed the "embarrassing" tag and won't tag it back. This tags is a proposal to give users a way to suggest bugs that they think seriously affects ubuntu usability, or will move away newcomers who will not understand the reason of certain evident problems. I understand the name can be offending, but please don't feel offended. It's just a name, if developers don't like that we can change it to something else, but again, the idea is to give users a way to signal serious problems which maybe do not affect stability, but affect ubuntu overall quality.

Revision history for this message
dschneller (dannyschneller) wrote :

I see this problem occurring sporadically, too. Symptoms as described above, but no autologin configured. Logging off and on again usually solves the problem, however this is really annoying.

Revision history for this message
swift99 (johnson-d) wrote :

I saw this start just after I installed the sound suite.

The workaround I have is that I added the line "sleep 10s" to /etc/init.d/dbus, as follows:

start_it_up()
{
  if [ ! -d $PIDDIR ]; then
    mkdir -p $PIDDIR
    chown $DAEMONUSER $PIDDIR
    chgrp $DAEMONUSER $PIDDIR
  fi
  if [ -e $PIDFILE ]; then
    PIDDIR=/proc/$(cat $PIDFILE)
    if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
      log_success_msg "$DESC already started; not starting."
      return
    else
      log_success_msg "Removing stale PID file $PIDFILE."
      rm -f $PIDFILE
    fi
  fi
  create_machineid

  log_daemon_msg "Starting $DESC" "$NAME"
  start-stop-daemon --start --quiet --pidfile $PIDFILE \
    --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
  log_end_msg $?
  if [ -d $EVENTDIR ]; then
      run-parts --arg=start $EVENTDIR || true
  fi
  dependent_services start

# Added to work around gnome startup inability to talk
# Wait long enough before moving forward that everything has stabilized a bit
# so the system is not so busy when gnome startup tries to talk to gdm.
  sleep 10s
# End addition
}

Revision history for this message
oskar (oskar669) wrote :

I seem to have exactly the same problem. It used to occur sporadically, now I get it on almost every log-in. Logging out and in again sometimes fixes it. This also effects the keyboard layout settings, and they can't be changed back. By now I know where all the keys are on the US layout, but it's still mildly annoying.

I see this is a 'new' bug, but I've already had this on Edgy. It only recently started to happen frequently.
Adding the sleep section to dbus seems to help. I will report back if it happens again.

The error message in Gnome is:

"There was an error starting the GNOME Settings Daemon.

Some things, such as themes, sounds, or background settings may not work correctly.

The last error message was:

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.

GNOME will still try to restart the Settings Daemon next time you log in."

Revision history for this message
Ray (rtlewandowski) wrote :

The same thing just happened to me. Gutsy has been running without a hitch since updating in October. Running on a dual-boot machine.
Today's scenario:
   Ubuntu running without any problems
   Restarted computer using icon in upper right-hand corner
   Started XP-Pro SP2 through Grub
   Logged into XP
   Updated window$ using toolbar icon
   Restarted computer
   Logged into XP
   Installed Google Sketchup
   Ran & played with Sketchup (they need to port this to Linux ASAP)
   Rebooted computer
   Started Ubuntu via Grub
   Logged into Ubuntu
   Error box: "There was an error starting the GNOME Settings Daemon....last error message was: Did not receive a reply..."
   Restarted computer
   Same thing happened.

Revision history for this message
Nick Fishman (bsdlogical) wrote :

Sebastian, please see my comment on bug #146946. After applying the fix proposed by Henriël Veldtmann (installing dbus-X11), the problem so far hasn't reappeared. Perhaps it is, indeed, a dbus issue?

Revision history for this message
Sebastien Bacher (seb128) wrote :

the errors there look like indeed dbus not starting correctly

Revision history for this message
Paul Perkins (thirdspace) wrote :

I also on login (to Gnome) sometimes get messages about not being able to contact the dbus service,
appearing on screen and in various log files. Usually if I logout and login again, all looks normal on second login.
Sure looks like there is insufficient synchronization of the things that run during Gnome session startup.

Question: the comments on the packages dbus and dbus-x11 imply that both should be installed to use dbus with x11, but the dependencies say I can install one or the other but not both. I have never directly installed either one, but on my system here dbus is installed and dbus-x11 is not installed. A comment above mentions installing dbus-x11. Which dbus packages SHOULD I have installed to run a normal Gnome / Ubuntu Gutsy desktop?

logfile excerpts follow...

/var/log/user.log:
Feb 19 09:12:21 wolf gnome-power-manager: (paul) This program cannot start until you start the dbus session service. This is usually started automatically in X or gnome startup when you start a new session.

.xsession-errors:
Starting gtk-window-decorator
libnotify-Message: Unable to get session bus: Failed to connect to socket /tmp/dbus-rBO43T6etz: Connection refused
libnotify-Message: Unable to get session bus: Failed to connect to socket /tmp/dbus-rBO43T6etz: Connection refused
** Message: Not starting remote desktop server

Tracker version 0.6.3 Copyright (c) 2005-2007 by Jamie McCracken (<email address hidden>)

This program is free software and comes without any warranty.
It is licensed under version 2 or later of the General Public License which can
be viewed at http://www.gnu.org/licenses/gpl.txt

Initialising tracker...
Could not set idle IO priority...attempting best effort 7 priority
Throttle level is 0
libnotify-Message: Unable to get session bus: Failed to connect to socket /tmp/dbus-rBO43T6etz: Connection refused
system-config-printer-applet: unable to initialize pynotify
system-config-printer-applet: failed to connect to session D-Bus
ERROR: tracker_dbus_init() could not get the session bus
DBUS ERROR: org.freedesktop.DBus.Error.NoServer occurred with message Failed to connect to socket /tmp/dbus-rBO43T6etz: Connection refused
process 6021: arguments to dbus_connection_register_object_path() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5280.
This is normally a bug in some application using the D-Bus library.
evolution-alarm-notify-Message: Setting timeout for 53255 1203483600 1203430345
evolution-alarm-notify-Message: Wed Feb 20 00:00:00 2008

evolution-alarm-notify-Message: Tue Feb 19 09:12:25 2008

libnotify-Message: Unable to get session bus: Failed to connect to socket /tmp/dbus-rBO43T6etz: Connection refused
Initializing gnome-mount extension

Revision history for this message
Nick Fishman (bsdlogical) wrote :

Paul,

I had a very similar error message. As suggested by Henriël Veldtmann in bug #146946, installing the dbus-X11 package _in addition to_ the dbus package fixed the error. It seems like there's a missing dependency with one of the Gnome packages (gnome-session, from what I can tell, is the best choice).

Try installing dbus-X11 and see if that fixes it.

Revision history for this message
Nick Fishman (bsdlogical) wrote :

Just to clarify, that's dbus-x11 with a lowercase x.

Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

I've not been getting problems about this for months, and now I just discovered I have the dbus-x11 package installed, so that package seems to fix the issue.

Revision history for this message
Paul Perkins (thirdspace) wrote :

As suggested by Nick and several others, I've installed dbus-x11. It may be awhile before I know if this fixes my symptom reported above, but it looks like there is a bug in the package dependency declarations anyway. When the dbus package was split into dbus and dbus-x11, some other packages (gnome-session seems like a likely candidate) should have had their depends-on link to the dbus package changed to the dbus-x11 package, but didn't.

Revision history for this message
Nick Fishman (bsdlogical) wrote :

Yeah, it definitely seems that way.

We should try to get this change into backports, at least.

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.