Consolekit crashes due to /var/dbus/system_bus_socket
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| consolekit (Ubuntu) |
Undecided
|
Unassigned |
Bug Description
Binary package hint: consolekit
Hi Martin Pitt,
I am assigning this directly to you because you seem to be the developer in charge of all these issues. I am experiencing a lot of these bugs: they all have in common that I cannot acces /var/dbus or Permission Error and such:
Bug #270330: /var/run/dbus (new - not triaged -unassigned)
I encountered a problem with dpkg-reconfigure -a. When I get to configure dash, I am asked use dash or bash. Whatever I choose, the command stops and I am in the rootterminal again. dpkg-reconfigure dash gives me the same screen, accepts my choice and reverts to rootterminal without notifications. If I run it again, it has saved my previous choice. When I restart dpkg-reconfigure -a, the problem reoccurs. Error messages: /var/run/dbus does not exist chown cannot acces, no permission, user 'messagebus' already exists. I cannot use touch /var/run/dbus + chmod 777 + chown 1000 or root with any success, that is: the problem remains. I now get: cannot create /var/run/dbus, file exists.
Bug #254238: update manager crashes on upgrade (critical - unassigned - incomplete)
thomas@thomas:~$ sudo dpkg-reconfigure hal
Failed to open connection to system message bus: Failed to connect to socket /var/run/
Connection refused
invoke-rc.d: initscript dbus, action "force-reload" failed.
polkit-auth: This operation requires the system message bus and Consolekit to be running
/usr/lib/
lookup error: /usr/lib/
undefined symbol: kit-getpwnam
polkit-auth: Not Authorized To Read Authorizations For Other Users:
uid 0 is not authorized to read authorizations for uid 111
(requires org.freedesktop
thomas@
update-rc.d: warning: multiuser is deprecated ; specify runlevels manually
You can find these errors mostly in the /var/log files.
For instance Kernel.log:
Oct 15 00:38:47 thomas-laptop su[5264]: + console root:clamav
Oct 15 00:38:47 thomas-laptop su[5264]: pam_unix(
Oct 15 00:38:47 thomas-laptop su[5264]: pam_unix(
Oct 15 00:39:32 thomas-laptop gdm[5922]: pam_unix(
Oct 15 00:39:32 thomas-laptop gdm[5922]: pam_ck_
Oct 15 00:39:33 thomas-laptop gdm[5922]: gnome-keyring-
Oct 15 00:39:33 thomas-laptop gdm[5922]: Autolaunch error: X11 initialization failed.
Oct 15 00:39:33 thomas-laptop gdm[5922]: )gnome-
Oct 15 00:39:33 thomas-laptop gdm[5922]: Autolaunch error: X11 initialization failed.
Oct 15 00:39:33 thomas-laptop gdm[5922]: )gnome-
Oct 15 00:39:33 thomas-laptop gdm[5922]: Autolaunch error: X11 initialization failed.
Oct 16 00:25:56 thomas-laptop kernel: [ 201.312043] type=1503 audit(122411315
Oct 16 00:25:56 thomas-laptop kernel: [ 201.367837] type=1503 audit(122411315
Oct 16 00:25:57 thomas-laptop kernel: [ 202.374242] type=1503 audit(122411315
Oct 16 00:25:57 thomas-laptop kernel: [ 202.422640] type=1503 audit(122411315
Oct 16 00:25:57 thomas-laptop kernel: [ 202.435629] type=1503 audit(122411315
Oct 16 00:25:57 thomas-laptop kernel: [ 202.435690] type=1503 audit(122411315
Oct 16 00:25:57 thomas-laptop kernel: [ 202.435708] type=1503 audit(122411315
Oct 16 00:25:57 thomas-laptop kernel: [ 202.435725] type=1503 audit(122411315
Oct 16 00:25:57 thomas-laptop kernel: [ 202.435742] type=1503 audit(122411315
and user.log:
Oct 15 17:31:42 thomas-laptop usbmount[18587]: cannot read from /dev/sdb
Oct 15 20:04:35 thomas-laptop usbmount[4327]: cannot read from /dev/sdb
Oct 15 20:04:38 thomas-laptop dhcdbd: Started up.
Oct 15 20:05:21 thomas-laptop pulseaudio[6568]: ltdl-bind-now.c: Failed to find original dlopen loader.
Oct 15 20:05:21 thomas-laptop pulseaudio[6574]: main.c: setrlimit(
Oct 15 20:05:21 thomas-laptop pulseaudio[6574]: main.c: setrlimit(
Oct 15 21:27:42 thomas-laptop bonobo-
Oct 15 21:29:12 thomas-laptop dhcdbd: Started up.
Oct 15 21:29:46 thomas-laptop pulseaudio[6315]: ltdl-bind-now.c: Failed to find original dlopen loader.
Oct 15 21:29:46 thomas-laptop pulseaudio[6323]: main.c: setrlimit(
Oct 15 21:29:46 thomas-laptop pulseaudio[6323]: main.c: setrlimit(
Oct 15 21:51:02 thomas-laptop dhcdbd: Started up.
Oct 16 00:20:52 thomas-laptop bonobo-
Oct 16 00:23:30 thomas-laptop dhcdbd: Started up.
Oct 16 00:24:22 thomas-laptop pulseaudio[6333]: ltdl-bind-now.c: Failed to find original dlopen loader.
Oct 16 00:24:22 thomas-laptop pulseaudio[6341]: main.c: setrlimit(
Oct 16 00:24:22 thomas-laptop pulseaudio[6341]: main.c: setrlimit(
Oct 16 00:39:08 thomas-laptop dhcdbd: Started up.
Oct 16 13:06:21 thomas-laptop bonobo-
Oct 16 13:06:21 thomas-laptop bonobo-
Oct 16 13:12:45 thomas-laptop dhcdbd: Started up.
Oct 16 13:13:23 thomas-laptop pulseaudio[6318]: ltdl-bind-now.c: Failed to find original dlopen loader.
Oct 16 13:13:23 thomas-laptop pulseaudio[6326]: main.c: setrlimit(
Oct 16 13:13:23 thomas-laptop pulseaudio[6326]: main.c: setrlimit(
Oct 16 13:45:07 thomas-laptop dhcdbd: Started up.
Oct 16 14:32:21 thomas-laptop bonobo-
Most of my outstanding bug reports have dbus errors:
jockey-gtk
canberra-gtk-play with pulseaudio crashes
(BTW the hal-volume-monitor crash was probably something similar - also dbus related)
I suspect many of my fatal system crashes were due to permission errors and the inability to access /var/run/
A lot of my network-manager crashes.
And so on and so forth ...
If you want to verify something on my pc through ssh, just let me know.
I can also upload half a ton of /var/log files with dbus error things. (daemon.log sys.log debug.log dpkg.log auth.log ...)
I cannot often succesfully use Valgrind for that, because usually the crash is either fatal or not possible to trigger at will.
Cheers,
Thomas
tdflanders (thomasdelbeke) wrote : | #1 |
tdflanders (thomasdelbeke) wrote : | #2 |
tdflanders (thomasdelbeke) wrote : | #3 |
/home/$USER/.dbus:
# This file allows processes on the machine with id 00e2e23118afd71
# display :0.0 to find the D-Bus session bus with the below address.
# If the DBUS_SESSION_
# be used rather than this file.
# See "man dbus-launch" for more details.
DBUS_SESSION_
DBUS_SESSION_
DBUS_SESSION_
Changed in consolekit: | |
assignee: | nobody → pitti |
James Westby (james-w) wrote : | #4 |
Again, please refrain from assigning bugs to people without their
permission.
Is this bug report just a collection of pointers to other bug reports you
have filed?
James
Changed in consolekit: | |
assignee: | pitti → nobody |
tdflanders (thomasdelbeke) wrote : | #5 |
No,
This bug is about consolekit crashing after it fails to access /var/run/
I am currently trying to make a backtrace of this.
tdflanders (thomasdelbeke) wrote : | #6 |
Hi,
this seems to be triggered by incorrect ownership of the following files:
thomas@
-rwxrwxrwx 1 thomas root 467 2008-10-18 12:12 /home/thomas/
-rwxrwxrwx 1 thomas thomas 28 2008-10-15 21:29 /home/thomas/.dmrc
/home/thomas/.dbus:
total 12
drwxrwxrwx 3 thomas root 4096 2008-10-03 00:57 .
drwxrwxrwx 73 thomas thomas 4096 2008-10-18 13:07 ..
drwxrwxrwx 2 thomas root 4096 2008-10-03 00:57 session-bus
/home/thomas/
total 12
drwxrwxrwx 2 thomas root 4096 2008-10-03 00:57 .
drwxrwxrwx 3 thomas root 4096 2008-10-03 00:57 ..
-rwxrwxrwx 1 thomas root 467 2008-10-18 12:12 00e2e23118afd71
thomas@
$ gedit /home/$USER/.dmrc:
[Desktop]
Session=default
$ gedit /home/$
# This file allows processes on the machine with id 00e2e23118afd71
# display :0.0 to find the D-Bus session bus with the below address.
# If the DBUS_SESSION_
# be used rather than this file.
# See "man dbus-launch" for more details.
DBUS_SESSION_
DBUS_SESSION_
DBUS_SESSION_
tdflanders (thomasdelbeke) wrote : | #7 |
The problem here is conflicting PAM settings, along with faulty permission settings of the above files.
tdflanders (thomasdelbeke) wrote : | #8 |
If you run dpkg-reconfigure debconf -p low and select text mode and priority low, followed by dpkg-reconfigure -ap low you will get configuration questions of the type: use: 1. unix authentication 2. consolekit 3. likewise 4. ... The choices should be seperated by a space: 1 2 3 If you select everything and then change your /home folder: sudo chmod -cR 777 /home* ; sudo -cR chown -cR 1000 /home/* you will get faulty ~/.dmrc and ~/.dbus settings.
Many users will do that because they cannot remove installation files from their home folder through nautilus gui (to save space for instance). If you start: $ sudo nautilus you can change the permissions, but only one by one. I suspect that is the problem. Since your different authentication methods conflict, you experience a wide variety of crashes. To get a backtrace you should start valgrind 'previously crashed process' and then gdb 2>&1 | gdb-<previously
The problem is that most crashes are fatal, requiring reboot and which application will crash is unpredictable. I have not been able to backtrace this properly, I am currently searching the proper debug symbols: 'apt-cache search <packagename> | grep "dbg"'. Could you try this out on VirtualBox or VMWare or a dedicated testing machine, or better yet a server with many partitions? It could work, I promise.
tdflanders (thomasdelbeke) wrote : | #9 |
Hi,
There is a problem with authentication under 8.10, which a lot of users experience.
I have started a thread about this on launchpad. It is a bundle of my crashes so far, due to dbus and unsafe ownership of /home/$USER.
The bug squad team have great difficulties tracking down these bugs because they have a different system setup. Also the developers cannot reproduce most of these crashes because of the same reason.
The problem is that they use their system in a way that Newbies do not.
What lies at the cause of this problem is the following:
A) If you download packages through the gnome-terminal you will have to call root: '$ sudo apt-get ...'. The default download folder for this /home/$USER. This means that all packages you download their are owned by root.
If you open nautilus in the gui, you will in fact open '$ nautilus ...' and not '$ sudo nautilus ...'. This means that you cannot move any source packages to the waste bin. If you open '$ sudo nautilus' you can change read and write permissions through the gui (right click > properties > permissions) but you still cannot change ownership in group. That is: you have to snipe out every individual file, you cannot use ctrl+A and ctrl-left_click to unselect.
This makes it very tempting for newbies to just: '$ cd ; sudo chmod -cR 777 . ; sudo chown -cR 1000 .'. An experienced user would never do that. I read an idea in the idea pool to make a filesystem permissions and ownership back up tool, dating back to 2006. To may best knowledge nothing has become of it so far.
Anyway, the above command leads to unsafe ownership of a number of hidden files:
thomas@
-rwxrwxrwx 1 thomas thomas 28 2008-10-15 21:29 /home/thomas/.dmrc
-rwxrwxrwx 1 thomas thomas 28 2008-10-03 00:49 /home/thomas/
-rwxrwxrwx 1 thomas thomas 0 2008-10-03 00:49 /home/thomas/
-rwxrwxrwx 1 thomas thomas 0 2008-10-03 00:49 /home/thomas/
-rwxrwxrwx 1 thomas thomas 40 2008-10-03 00:49 /home/thomas/
-rwxrwxrwx 1 thomas thomas 21293 2008-10-19 21:07 /home/thomas/
-rwxrwxrwx 1 thomas thomas 55 2008-10-03 10:02 /home/thomas/
-rwxrwxrwx 1 thomas thomas 1 2008-10-03 10:02 /home/thomas/
-rwxrwxrwx 1 thomas thomas 872 2008-10-19 19:00 /home/thomas/
-rwxrwxrwx 1 thomas thomas 173 2008-10-17 04:27 /home/thomas/
/home/thomas/
total 20
drwxrwxrwx 3 thomas thomas 4096 2008-10-03 00:27 .
drwxrwxrwx 92 thomas thomas 12288 2008-10-20 00:31 ..
drwxrwxrwx 2 thomas thomas 4096 2008-10-09 16:00 session
/home/thomas/
total 12
drwxrwxrwx 2 thomas root 4096 2008-10-03 00:57 .
drwxrwxrwx 3 thomas root 4096 2008-10-03 00:57 ..
-rwxrwxrwx 1 thomas root 465 2008-10-19 22:58 00e2e23118afd71
/home/thomas/.gvfs:
total 12
dr-x------ 2 thomas thomas 0 2008-10-19 21:07 .
drwxrwxrwx 92 thomas thomas 12288 2008-10-20 00:31 ..
thomas@
B) Another problem may be that users activate too many...
tdflanders (thomasdelbeke) wrote : | #10 |
Re: Testing system for Consolekit libpam dbus bugs
You can also try to ask people who seemingly post non reproducible bugs on the forum to list the permission settings of the affected /home/$USER/files. Or you can ask them if they remember having received any of the following error messages:
1) On startup, after the login window:
User's $HOME/.dmrc file is being ignored.This prevents the default session and language from being saved. File should be owned by user and have 644 permissions. User's $HOME directory must be owned by user and not writeable by other users.
2) gpg: WARNING: unsafe ownership on configuration file `/home/
Oh yeah: please change bug title to [...] /var/run/
James Westby (james-w) wrote : Re: [Bug 284653] Re: Consolekit crashes due to /var/dbus/system_bus_socket | #11 |
On Mon, 2008-10-20 at 01:03 +0000, tdflanders wrote:
> A) If you download packages through the gnome-terminal you will have to
> call root: '$ sudo apt-get ...'. The default download folder for this
> /home/$USER. This means that all packages you download their are owned
> by root.
There is no need to run "sudo apt-get source", "apt-get source" works
fine as a normal user.
>
> If you open nautilus in the gui, you will in fact open '$ nautilus ...'
> and not '$ sudo nautilus ...'. This means that you cannot move any
> source packages to the waste bin. If you open '$ sudo nautilus' you can
> change read and write permissions through the gui (right click >
> properties > permissions) but you still cannot change ownership in
> group. That is: you have to snipe out every individual file, you cannot
> use ctrl+A and ctrl-left_click to unselect.
If you are running "apt-get source" from a terminal I would assume
you can run "sudo rm" to remove files that you don't want.
> This makes it very tempting for newbies to just: '$ cd ; sudo chmod -cR
> 777 . ; sudo chown -cR 1000 .'. An experienced user would never do that.
An experienced user would never do that because it is a terrible idea.
I don't understand why you repeatedly do this if you know that it breaks
things. I also have no idea why you chose those particular permissions.
> C) If you use your system in this way it will become highly unstable and
> you will experience a number of crashes that the bug squad can not
> easily verify.
Probably, as permissions are important, and changing all of them is
going to cause problems. Packages could perhaps be made to fail a little
more gracefully, but they cannot be made to work if you change
permissions on every file.
Thanks,
James
Sorry if this distracts you, do not break your head over it and sent it to a triager if you do not have time. I am just trying to help. Cheers, Thomas
thomas@ thomas- laptop: ~$ lsb_release -rd ; uname -a ; apt-cache policy linux linux-image linux-source-2.6.27 linux-headers- generic linux-restricte d-modules update-manager network-manager compiz apport-gtk xserver-xorg x-session-manager jockey-gtk gvfs nautilus consolekit gb.archive. ubuntu. com intrepid/restricted Packages dpkg/status gb.archive. ubuntu. com intrepid/main Packages dpkg/status 2.6.27: gb.archive. ubuntu. com intrepid/main Packages dpkg/status generic: gb.archive. ubuntu. com intrepid/main Packages dpkg/status d-modules: gb.archive. ubuntu. com intrepid/restricted Packages dpkg/status gb.archive. ubuntu. com intrepid/main Packages dpkg/status 5t224738- 0ubuntu1 5t224738- 0ubuntu1 5t224738- 0ubuntu1 0 gb.archive. ubuntu. com intrepid/main Packages dpkg/status gb.archive. ubuntu. com intrepid/main Packages dpkg/status gb.archive. ubuntu. com intrepid/main Packages dpkg/status gb.archive. ubuntu. com intrepid/main Packages dpkg/status gb.archive. ubuntu. com intrepid/main Packages dpkg/status gb.archive. ubuntu. com intrepid/main Packages dpkg/status
Description: Ubuntu intrepid (development branch)
Release: 8.10
Linux thomas-laptop 2.6.27-7-generic #1 SMP Tue Oct 14 18:40:44 UTC 2008 i686 GNU/Linux
linux:
Installed: 2.6.27.7.10
Candidate: 2.6.27.7.10
Version table:
*** 2.6.27.7.10 0
500 http://
100 /var/lib/
linux-image:
Installed: 2.6.27.7.10
Candidate: 2.6.27.7.10
Version table:
*** 2.6.27.7.10 0
500 http://
100 /var/lib/
linux-source-
Installed: 2.6.27-7.11
Candidate: 2.6.27-7.11
Version table:
*** 2.6.27-7.11 0
500 http://
100 /var/lib/
linux-headers-
Installed: 2.6.27.7.10
Candidate: 2.6.27.7.10
Version table:
*** 2.6.27.7.10 0
500 http://
100 /var/lib/
linux-restricte
Installed: 2.6.27.7.10
Candidate: 2.6.27.7.10
Version table:
*** 2.6.27.7.10 0
500 http://
100 /var/lib/
update-manager:
Installed: 1:0.93.26
Candidate: 1:0.93.26
Version table:
*** 1:0.93.26 0
500 http://
100 /var/lib/
network-manager:
Installed: 0.7~~svn2008101
Candidate: 0.7~~svn2008101
Version table:
*** 0.7~~svn2008101
500 http://
100 /var/lib/
compiz:
Installed: 1:0.7.8-0ubuntu3
Candidate: 1:0.7.8-0ubuntu3
Version table:
*** 1:0.7.8-0ubuntu3 0
500 http://
100 /var/lib/
apport-gtk:
Installed: 0.117
Candidate: 0.117
Version table:
*** 0.117 0
500 http://
100 /var/lib/
xserver-xorg:
Installed: 1:7.4~5ubuntu1
Candidate: 1:7.4~5ubuntu1
Version table:
*** 1:7.4~5ubuntu1 0
500 http://
100 /var/lib/
x-session-manager:
Installed: (none)
Candidate: (none)
Version table:
jockey-gtk:
Installed: 0.5~beta3-0ubuntu1
Candidate: 0.5~beta3-0ubuntu1
Version table:
*** 0.5~beta3-0ubuntu1 0
500 http://
100 /var/lib/
gvfs:
Installed: 1.0.1-0ubuntu5
Candidate: 1.0.1-0ubuntu5
Version table:
*** 1.0.1-0ubuntu5 0
500 http://
100 /var/lib/
nautilus:
Installed: 1:2.24.0-0ubuntu2
Candidate: 1:2.24.0-0ubuntu2
...